Skip to content

Commit

Permalink
#28 MIXED_WIDTH doesn't need an extra bit anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Sep 23, 2024
1 parent 1b44b20 commit 13da151
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/main/scala/vexiiriscv/fetch/PcPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ class PcPlugin(var resetVector : BigInt = 0x80000000l) extends FiberPlugin with
val self = new Area {
val id = Reg(Fetch.ID) init(0)
val flow = newJumpInterface(-1, laneAgeWidth = 0, aggregationPriority = 0)
val increment, fault = RegInit(False)
val increment = RegInit(False)
val fault = RegInit(False) simPublic()
val state = Reg(PC) init (resetVector) simPublic()
val pc = state + U(WORD_BYTES).andMask(increment)
flow.valid := True
Expand Down
2 changes: 1 addition & 1 deletion src/main/scala/vexiiriscv/memory/MmuPlugin.scala
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class MmuPlugin(var spec : MmuSpec,

PHYSICAL_WIDTH.set(physicalWidth)
VIRTUAL_WIDTH.set(spec.virtualWidth)
MIXED_WIDTH.set(VIRTUAL_WIDTH.get + (VIRTUAL_WIDTH < XLEN).toInt)
MIXED_WIDTH.set(VIRTUAL_WIDTH.get)
PC_WIDTH.set(MIXED_WIDTH)
TVAL_WIDTH.set(MIXED_WIDTH)
assert(VIRTUAL_WIDTH.get == XLEN.get || XLEN.get > VIRTUAL_WIDTH.get && VIRTUAL_WIDTH.get > physicalWidth)
Expand Down

0 comments on commit 13da151

Please sign in to comment.