Allow reset vector to be set dynamically
A chip's power-up sequence, or awake-from-sleep sequence, may wish to set the reset PC based upon dynamic properties, e.g., the settings of external pins. Support this by passing the reset vector to the Coreplex. ExampleTop simply hard-wires the reset vector, as was the case before. Additionally, allow MTVEC to *not* be reset. In most cases, including riscv-tests, pk, and bbl, overriding MTVEC is one of the first things that the boot sequence does. So the reset value is superfluous.
This commit is contained in:
@ -58,6 +58,7 @@ abstract class Coreplex(implicit val p: Parameters, implicit val c: CoreplexConf
|
||||
val debug = new DebugBusIO()(p).flip
|
||||
val clint = Vec(c.nTiles, new CoreplexLocalInterrupts).asInput
|
||||
val success: Option[Bool] = hasSuccessFlag.option(Bool(OUTPUT))
|
||||
val resetVector = UInt(INPUT, p(XLen))
|
||||
}
|
||||
|
||||
def hasSuccessFlag: Boolean = false
|
||||
@ -153,6 +154,7 @@ class DefaultCoreplex(tp: Parameters, tc: CoreplexConfig) extends Coreplex()(tp,
|
||||
tile.io.interrupts.seip.foreach(_ := plic.io.harts(plic.cfg.context(i, 'S')))
|
||||
tile.io.interrupts.debug := debugModule.io.debugInterrupts(i)
|
||||
tile.io.hartid := i
|
||||
tile.io.resetVector := io.resetVector
|
||||
}
|
||||
|
||||
val tileSlavePorts = (0 until tc.nTiles) map (i => s"int:dmem$i") filter (ioAddrMap contains _)
|
||||
|
Reference in New Issue
Block a user