Default to 8 PMPs; support 0 PMPs
This commit is contained in:
parent
97006ab396
commit
17b1ee3037
@ -26,7 +26,7 @@ case class GroundTestTileParams(
|
|||||||
val icache = None
|
val icache = None
|
||||||
val btb = None
|
val btb = None
|
||||||
val rocc = Nil
|
val rocc = Nil
|
||||||
val core = rocket.RocketCoreParams() //TODO remove this
|
val core = rocket.RocketCoreParams(nPMPs = 0) //TODO remove this
|
||||||
val cached = if(dcache.isDefined) 1 else 0
|
val cached = if(dcache.isDefined) 1 else 0
|
||||||
val dataScratchpadBytes = 0
|
val dataScratchpadBytes = 0
|
||||||
}
|
}
|
||||||
|
@ -667,7 +667,7 @@ class CSRFile(perfEventSets: EventSets = new EventSets(Seq()))(implicit p: Param
|
|||||||
when (decoded_addr(CSRs.tdata2)) { bp.address := wdata }
|
when (decoded_addr(CSRs.tdata2)) { bp.address := wdata }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (((pmp, next), i) <- (reg_pmp zip (reg_pmp.tail :+ reg_pmp.last)) zipWithIndex) {
|
if (reg_pmp.nonEmpty) for (((pmp, next), i) <- (reg_pmp zip (reg_pmp.tail :+ reg_pmp.last)) zipWithIndex) {
|
||||||
require(xLen % pmp.cfg.getWidth == 0)
|
require(xLen % pmp.cfg.getWidth == 0)
|
||||||
when (decoded_addr(CSRs.pmpcfg0 + pmpCfgIndex(i)) && !pmp.locked) {
|
when (decoded_addr(CSRs.pmpcfg0 + pmpCfgIndex(i)) && !pmp.locked) {
|
||||||
pmp.cfg := new PMPConfig().fromBits(wdata >> ((i * pmp.cfg.getWidth) % xLen))
|
pmp.cfg := new PMPConfig().fromBits(wdata >> ((i * pmp.cfg.getWidth) % xLen))
|
||||||
|
@ -136,7 +136,7 @@ class PMPChecker(lgMaxSize: Int)(implicit p: Parameters) extends CoreModule()(p)
|
|||||||
val x = Bool(OUTPUT)
|
val x = Bool(OUTPUT)
|
||||||
}
|
}
|
||||||
|
|
||||||
val default = io.prv > PRV.S
|
val default = if (io.pmp.isEmpty) true.B else io.prv > PRV.S
|
||||||
val pmp0 = Wire(init = 0.U.asTypeOf(new PMP))
|
val pmp0 = Wire(init = 0.U.asTypeOf(new PMP))
|
||||||
pmp0.cfg.r := default
|
pmp0.cfg.r := default
|
||||||
pmp0.cfg.w := default
|
pmp0.cfg.w := default
|
||||||
|
@ -18,7 +18,7 @@ case class RocketCoreParams(
|
|||||||
useAtomics: Boolean = true,
|
useAtomics: Boolean = true,
|
||||||
useCompressed: Boolean = true,
|
useCompressed: Boolean = true,
|
||||||
nBreakpoints: Int = 1,
|
nBreakpoints: Int = 1,
|
||||||
nPMPs: Int = 16,
|
nPMPs: Int = 8,
|
||||||
nPerfCounters: Int = 0,
|
nPerfCounters: Int = 0,
|
||||||
nCustomMRWCSRs: Int = 0,
|
nCustomMRWCSRs: Int = 0,
|
||||||
mtvecInit: Option[BigInt] = Some(BigInt(0)),
|
mtvecInit: Option[BigInt] = Some(BigInt(0)),
|
||||||
|
Loading…
Reference in New Issue
Block a user