CsrPlugin add printCsr

This commit is contained in:
Charles Papon 2020-01-13 20:44:55 +01:00
parent 4c7025b964
commit f01da9c73b
1 changed files with 10 additions and 0 deletions

View File

@ -368,6 +368,16 @@ class CsrPlugin(val config: CsrPluginConfig) extends Plugin[VexRiscv] with Excep
val csrMapping = new CsrMapping() val csrMapping = new CsrMapping()
//Print CSR mapping
def printCsr() {
for ((address, things) <- csrMapping.mapping) {
println("0x" + address.toHexString + " => ")
for (thing <- things) {
println(" - " + thing)
}
}
}
//Interruption and exception data model //Interruption and exception data model
case class Delegator(var enable : Bool, privilege : Int) case class Delegator(var enable : Bool, privilege : Int)
case class InterruptSpec(var cond : Bool, id : Int, privilege : Int, delegators : List[Delegator]) case class InterruptSpec(var cond : Bool, id : Int, privilege : Int, delegators : List[Delegator])