[firechip] Add MIDAS environments for all targets
This commit is contained in:
@@ -10,10 +10,14 @@ import freechips.rocketchip.subsystem._
|
||||
import freechips.rocketchip.devices.tilelink.BootROMParams
|
||||
import freechips.rocketchip.devices.debug.DebugModuleParams
|
||||
import boom.system.BoomTilesKey
|
||||
import testchipip.{WithBlockDevice, BlockDeviceKey, BlockDeviceConfig}
|
||||
import testchipip.{BlockDeviceKey, BlockDeviceConfig}
|
||||
import sifive.blocks.devices.uart.{PeripheryUARTKey, UARTParams}
|
||||
import icenet._
|
||||
|
||||
import firesim.util.{EndpointKey, TieOffDebug}
|
||||
import firesim.endpoints._
|
||||
import firesim.configs.WithDefaultMemModel
|
||||
|
||||
class WithBootROM extends Config((site, here, up) => {
|
||||
case BootROMParams => {
|
||||
val chipyardBootROM = new File(s"./generators/testchipip/bootrom/bootrom.rv${site(XLen)}.img")
|
||||
@@ -33,13 +37,33 @@ class WithPeripheryBusFrequency(freq: BigInt) extends Config((site, here, up) =>
|
||||
})
|
||||
|
||||
class WithUARTKey extends Config((site, here, up) => {
|
||||
case PeripheryUARTKey => List(UARTParams(
|
||||
case EndpointKey => up(EndpointKey) ++ Seq(UARTEndpoint)
|
||||
case PeripheryUARTKey => List(UARTParams(
|
||||
address = BigInt(0x54000000L),
|
||||
nTxEntries = 256,
|
||||
nRxEntries = 256))
|
||||
})
|
||||
|
||||
class WithSerialEndpoint extends Config((site, here, up) => {
|
||||
case EndpointKey => up(EndpointKey) ++ Seq(SerialEndpoint)
|
||||
})
|
||||
|
||||
class WithTracerVEndpoint extends Config((site, here, up) => {
|
||||
case EndpointKey => up(EndpointKey) ++ Seq(TracerVEndpoint)
|
||||
})
|
||||
|
||||
class WithBlockDevice extends Config(
|
||||
new Config((site, here, up) => {
|
||||
case EndpointKey => up(EndpointKey) ++ Seq(BlockDevEndpoint, firesim.util.FASEDEndpointMatcher)
|
||||
}) ++ new testchipip.WithBlockDevice
|
||||
)
|
||||
|
||||
class WithTieOffDebug extends Config((site, here, up) => {
|
||||
case EndpointKey => up(EndpointKey) ++ Seq(TieOffDebug)
|
||||
})
|
||||
|
||||
class WithNICKey extends Config((site, here, up) => {
|
||||
//case EndpointKey => up(EndpointKey) ++ Seq(NICEndpoint)
|
||||
case NICKey => NICConfig(
|
||||
inBufFlits = 8192,
|
||||
ctrlQueueDepth = 64)
|
||||
@@ -97,6 +121,10 @@ class FireSimRocketChipConfig extends Config(
|
||||
new WithRocketL2TLBs(1024) ++
|
||||
new WithPerfCounters ++
|
||||
new WithoutClockGating ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithSerialEndpoint ++
|
||||
new WithTracerVEndpoint ++
|
||||
new WithTieOffDebug ++
|
||||
new freechips.rocketchip.system.DefaultConfig)
|
||||
|
||||
class WithNDuplicatedRocketCores(n: Int) extends Config((site, here, up) => {
|
||||
@@ -136,6 +164,10 @@ class FireSimBoomConfig extends Config(
|
||||
new WithBlockDevice ++
|
||||
new WithBoomL2TLBs(1024) ++
|
||||
new WithoutClockGating ++
|
||||
new WithDefaultMemModel ++
|
||||
new WithSerialEndpoint ++
|
||||
new WithTracerVEndpoint ++
|
||||
new WithTieOffDebug ++
|
||||
// Using a small config because it has 64-bit system bus, and compiles quickly
|
||||
new boom.system.SmallBoomConfig)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user