Add a NoCore config - useful for testing
This commit is contained in:
@@ -54,6 +54,23 @@ class ChipyardSubsystem(implicit p: Parameters) extends BaseSubsystem
|
||||
case b: BoomTile => b.module.core.coreMonitorBundle
|
||||
}.toList
|
||||
|
||||
// No-tile configs have to be handled specially.
|
||||
if (tiles.size == 0) {
|
||||
// no PLIC, so sink interrupts to nowhere
|
||||
require(!p(PLICKey).isDefined)
|
||||
val intNexus = IntNexusNode(sourceFn = x => x.head, sinkFn = x => x.head)
|
||||
val intSink = IntSinkNode(IntSinkPortSimple())
|
||||
intSink := intNexus :=* ibus.toPLIC
|
||||
|
||||
// Need to have at least 1 driver to the tile notification sinks
|
||||
tileHaltXbarNode := IntSourceNode(IntSourcePortSimple())
|
||||
tileWFIXbarNode := IntSourceNode(IntSourcePortSimple())
|
||||
tileCeaseXbarNode := IntSourceNode(IntSourcePortSimple())
|
||||
|
||||
// Sink reset vectors to nowhere
|
||||
val resetVectorSink = BundleBridgeSink[UInt](Some(() => UInt(28.W)))
|
||||
resetVectorSink := tileResetVectorNode
|
||||
}
|
||||
|
||||
// Relying on [[TLBusWrapperConnection]].driveClockFromMaster for
|
||||
// bus-couplings that are not asynchronous strips the bus name from the sink
|
||||
|
||||
@@ -33,9 +33,10 @@ class TileResetSetter(address: BigInt, beatBytes: Int, tileNames: Seq[String], i
|
||||
Module(new AsyncResetRegVec(w=1, init=(if (initResetHarts.contains(i)) 1 else 0)))
|
||||
}
|
||||
})
|
||||
tlNode.regmap((0 until nTiles).map({ i =>
|
||||
i * 4 -> Seq(RegField.rwReg(1, r_tile_resets(i).io))
|
||||
}): _*)
|
||||
if (nTiles > 0)
|
||||
tlNode.regmap((0 until nTiles).map({ i =>
|
||||
i * 4 -> Seq(RegField.rwReg(1, r_tile_resets(i).io))
|
||||
}): _*)
|
||||
|
||||
val tileMap = tileNames.zipWithIndex.map({ case (n, i) =>
|
||||
n -> (tile_async_resets(i), r_tile_resets(i).io.q)
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
package chipyard
|
||||
|
||||
import freechips.rocketchip.config.{Config}
|
||||
|
||||
// A empty config with no cores. Useful for testing
|
||||
class NoCoresConfig extends Config(
|
||||
new chipyard.config.WithNoDebug ++
|
||||
new chipyard.config.WithNoPLIC ++
|
||||
new chipyard.config.AbstractConfig)
|
||||
@@ -5,7 +5,7 @@ import chisel3._
|
||||
import chisel3.util.{log2Up}
|
||||
|
||||
import freechips.rocketchip.config.{Config}
|
||||
import freechips.rocketchip.devices.tilelink.{BootROMLocated}
|
||||
import freechips.rocketchip.devices.tilelink.{BootROMLocated, PLICKey}
|
||||
import freechips.rocketchip.devices.debug.{Debug, ExportDebug, DebugModuleKey, DMI}
|
||||
import freechips.rocketchip.stage.phases.TargetDirKey
|
||||
import freechips.rocketchip.subsystem._
|
||||
@@ -77,5 +77,9 @@ class WithSerialTLBackingMemory extends Config((site, here, up) => {
|
||||
})
|
||||
|
||||
class WithExtMemIdBits(n: Int) extends Config((site, here, up) => {
|
||||
case ExtMem => up(ExtMem, site).map(x => x.copy(master = x.master.copy(idBits = n)))
|
||||
case ExtMem => up(ExtMem, site).map(x => x.copy(master = x.master.copy(idBits = n)))
|
||||
})
|
||||
|
||||
class WithNoPLIC extends Config((site, here, up) => {
|
||||
case PLICKey => None
|
||||
})
|
||||
|
||||
Submodule generators/rocket-chip updated: 3b5fb3c043...ab9adc006c
Reference in New Issue
Block a user