Skip to content

Commit

Permalink
fix #16 add --pyhsical-width xyz
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Jun 21, 2024
1 parent e991b31 commit 05ed94c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/main/scala/vexiiriscv/Param.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ParamSimple(){
var withDispatcherBuffer = false
var hartCount = 1
var withMmu = false
var physicalWidth = 32
var resetVector = 0x80000000l
var decoders = 1
var lanes = 1
Expand Down Expand Up @@ -323,6 +324,7 @@ class ParamSimple(){
opt[Unit]("debug-triggers-lsu") action { (v, c) => privParam.debugTriggersLsu = true }
opt[Unit]("debug-jtag-tap") action { (v, c) => embeddedJtagTap = true }
opt[Unit]("with-boot-mem-init") action { (v, c) => bootMemClear = true }
opt[Int]("physical-width") action {(v, c) => physicalWidth = v}
}

def plugins(hartId : Int = 0) = pluginsArea(hartId).plugins
Expand All @@ -334,10 +336,10 @@ class ParamSimple(){

plugins += new riscv.RiscvPlugin(xlen, hartCount, rvf = withRvf, rvd = withRvd, rvc = withRvc)
withMmu match {
case false => plugins += new memory.StaticTranslationPlugin(32)
case false => plugins += new memory.StaticTranslationPlugin(physicalWidth)
case true => plugins += new memory.MmuPlugin(
spec = if (xlen == 32) MmuSpec.sv32 else MmuSpec.sv39,
physicalWidth = 32
physicalWidth = physicalWidth
)
}

Expand Down

0 comments on commit 05ed94c

Please sign in to comment.