Skip to content

Commit

Permalink
VexRiscvSmpCluster add more debug trigger options
Browse files Browse the repository at this point in the history
  • Loading branch information
Dolu1990 committed Mar 5, 2024
1 parent 1943b25 commit 7812bc6
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/main/scala/vexriscv/demo/smp/VexRiscvSmpCluster.scala
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,9 @@ object VexRiscvSmpClusterGen {
withInstructionCache : Boolean = true,
forceMisa : Boolean = false,
forceMscratch : Boolean = false,
privilegedDebug : Boolean = false,
privilegedDebug: Boolean = false,
privilegedDebugTriggers: Int = 2,
privilegedDebugTriggersLsu: Boolean = false,
csrFull : Boolean = false
) = {
assert(iCacheSize/iCacheWays <= 4096, "Instruction cache ways can't be bigger than 4096 bytes")
Expand All @@ -264,7 +266,12 @@ object VexRiscvSmpClusterGen {

val misa = Riscv.misaToInt(s"ima${if(withFloat) "f" else ""}${if(withDouble) "d" else ""}${if(rvc) "c" else ""}${if(withSupervisor) "s" else ""}")
val csrConfig = if(withSupervisor){
var c = CsrPluginConfig.openSbi(mhartid = hartId, misa = misa).copy(utimeAccess = CsrAccess.READ_ONLY, withPrivilegedDebug = privilegedDebug)
var c = CsrPluginConfig.openSbi(mhartid = hartId, misa = misa).copy(
utimeAccess = CsrAccess.READ_ONLY,
withPrivilegedDebug = privilegedDebug,
debugTriggers = privilegedDebugTriggers,
debugTriggersLsu = privilegedDebugTriggersLsu
)
if(csrFull){
c = c.copy(
mcauseAccess = CsrAccess.READ_WRITE,
Expand Down

0 comments on commit 7812bc6

Please sign in to comment.