Fix FireChip compilation | Remove extra DefaultSerialTL in bridges

This commit is contained in:
Abraham Gonzalez
2021-03-03 07:25:49 +00:00
parent f850df7a9f
commit c52fce79ae
2 changed files with 15 additions and 13 deletions

View File

@@ -98,13 +98,13 @@ class WithUARTBridge extends OverrideHarnessBinder({
class WithBlockDeviceBridge extends OverrideHarnessBinder({ class WithBlockDeviceBridge extends OverrideHarnessBinder({
(system: CanHavePeripheryBlockDevice, th: FireSim, ports: Seq[ClockedIO[BlockDeviceIO]]) => { (system: CanHavePeripheryBlockDevice, th: FireSim, ports: Seq[ClockedIO[BlockDeviceIO]]) => {
implicit val p: Parameters = GetSystemParameters(system) implicit val p: Parameters = GetSystemParameters(system)
ports.map { b => BlockDevBridge(b.clock, b.bits, th.harnessReset.toBool) } ports.map { b => BlockDevBridge(b.clock, b.bits, th.harnessReset.asBool) }
Nil Nil
} }
}) })
class WithAXIOverSerialTLCombinedBridges extends OverrideHarnessBinder({ class WithAXIOverSerialTLCombinedBridges extends OverrideHarnessBinder({
(system: CanHavePeripheryTLSerial, th: FireSim, ports: Seq[SerialAndPassthroughClockResetIO]]]) => { (system: CanHavePeripheryTLSerial, th: FireSim, ports: Seq[SerialAndPassthroughClockResetIO]) => {
implicit val p = GetSystemParameters(system) implicit val p = GetSystemParameters(system)
p(SerialTLKey).map({ sVal => p(SerialTLKey).map({ sVal =>
@@ -113,7 +113,7 @@ class WithAXIOverSerialTLCombinedBridges extends OverrideHarnessBinder({
ports.map({ port => ports.map({ port =>
val offchipNetwork = SerialAdapter.connectHarnessMultiClockAXIRAM(system.serdesser.get, port, th.harnessReset) val offchipNetwork = SerialAdapter.connectHarnessMultiClockAXIRAM(system.serdesser.get, port, th.harnessReset)
SerialBridge(port.clocked_serial.clock, offchipNetwork.module.io.tsi_ser, MainMemoryConsts.globalName) SerialBridge(port.clocked_serial.clock, offchipNetwork.module.io.tsi_ser, Some(MainMemoryConsts.globalName))
// connect SimAxiMem // connect SimAxiMem
(offchipNetwork.mem_axi4 zip offchipNetwork.memAXI4Node.edges.in).map { case (axi4, edge) => (offchipNetwork.mem_axi4 zip offchipNetwork.memAXI4Node.edges.in).map { case (axi4, edge) =>

View File

@@ -74,10 +74,6 @@ class WithFireSimConfigTweaksWithoutClocking extends Config(
new chipyard.config.WithTraceIO ++ new chipyard.config.WithTraceIO ++
// Optional: Request 16 GiB of target-DRAM by default (can safely request up to 32 GiB on F1) // Optional: Request 16 GiB of target-DRAM by default (can safely request up to 32 GiB on F1)
new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 16L) ++ new freechips.rocketchip.subsystem.WithExtMemSize((1 << 30) * 16L) ++
// Required: Adds IO to attach SerialBridge. The SerialBridges is responsible
// for signalling simulation termination under simulation success. This fragment can
// be removed if you supply an auxiliary bridge that signals simulation termination
new testchipip.WithDefaultSerialTL ++
// Optional: Removing this will require using an initramfs under linux // Optional: Removing this will require using an initramfs under linux
new testchipip.WithBlockDevice ++ new testchipip.WithBlockDevice ++
// Required*: Scale default baud rate with periphery bus frequency // Required*: Scale default baud rate with periphery bus frequency
@@ -220,24 +216,30 @@ class FireSim16LargeBoomConfig extends Config(
new boom.common.WithNLargeBooms(16) ++ new boom.common.WithNLargeBooms(16) ++
new chipyard.config.AbstractConfig) new chipyard.config.AbstractConfig)
class WithAXIOverSerialTLCombinedBridges extends OverrideHarnessBinder({ // unsure if this needs to scale
class WithOffchipAXINoClksSetup(pbusFreqMHz: BigInt = 3200) extends Config( //new chipyard.config.WithUART((pbusFreqMHz / 100) * BigInt(115200L)) ++
//new chipyard.config.WithUART((pbusFreqMHz / 100) * BigInt(115200L)) ++
new chipyard.config.WithUART(BigInt(3686400L)) ++
)
//class FireSimDebugOffchipConfig extends Config( //class FireSimDebugOffchipConfig extends Config(
// new WithTracerV ++ // new WithTracerV ++
// new WithOffchipAXINoClksSetup(3200) ++ // new WithOffchipAXINoClksSetup(3200) ++
// new chipyard.DebugOffchipConfig // new chipyard.DebugOffchipConfig
//) //)
//
//class FireSimDebugOffchip2Config extends Config( //class FireSimDebugOffchip2Config extends Config(
// new WithTracerV ++ // new WithTracerV ++
// new WithOffchipAXINoClksSetup(3200) ++ // new WithOffchipAXINoClksSetup(3200) ++
// new chipyard.DebugOffchip2Config // new chipyard.DebugOffchip2Config
//) //)
class FireSimDebugOffchip2Config extends Config(
new chipyard.config.WithUART((4000 / 100) * BigInt(115200L)) ++
new WithAXIOverSerialTLCombinedBridges ++ // use combined bridge to connect to axi mem over serial
new WithDefaultFireSimBridges ++
new WithDefaultMemModel ++
new WithFireSimConfigTweaksWithoutClocking ++ // don't inherit firesim clocking
new chipyard.DebugOffchip3Config
)
class FireSimDebugOffchip3Config extends Config( class FireSimDebugOffchip3Config extends Config(
new WithAXIOverSerialTLCombinedBridges ++ // use combined bridge to connect to axi mem over serial new WithAXIOverSerialTLCombinedBridges ++ // use combined bridge to connect to axi mem over serial
new WithDefaultFireSimBridges ++ new WithDefaultFireSimBridges ++