Skip to content

Commit

Permalink
Update src/main/scala/devices/tilelink/MSWI.scala
Browse files Browse the repository at this point in the history
Co-authored-by: Hongren (Zenithal) Zheng <[email protected]>
  • Loading branch information
PorterLu and ZenithalHourlyRate authored May 18, 2023
1 parent c15a79e commit f852ea5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/scala/devices/tilelink/MSWI.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ class MSWI(mswiParams: MSWIParams, mtimerParams: MTIMERParams, isACLINT: Boolean
val rtcTick = (!isACLINT).option(Input(Bool()))
})

val timecmp = if (!isACLINT) { Seq.fill(nTiles) { Reg(UInt(MTIMERConsts.mtimeWidth.W))} } else { Seq.fill(nTiles){ Reg(UInt(0.W))} }
val time = if (!isACLINT) { RegInit(0.U(MTIMERConsts.mtimeWidth.W)) } else { RegInit(0.U(0.W)) }
val timecmp = (!isACLINT).option(Seq.fill(nTiles) { Reg(UInt(MTIMERConsts.mtimeWidth.W)) })
val time = (!isACLINT).option(RegInit(0.U(MTIMERConsts.mtimeWidth.W)))

io.rtcTick.map { tick =>
when (tick) { time := time + 1.U }
Expand Down

0 comments on commit f852ea5

Please sign in to comment.