Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FireSim DMI Bridge #1619

Closed
wants to merge 12 commits into from
14 changes: 14 additions & 0 deletions generators/firechip/src/main/scala/BridgeBinders.scala
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,18 @@ class WithTSIBridgeAndHarnessRAMOverSerialTL extends HarnessBinder({
}
})

class WithDMIBridge extends HarnessBinder({
case (th: FireSim, port: DMIPort) => {
// This assumes that:
// If ExtMem for the target is defined, then FASED bridge will be attached
// If FASED bridge is attached, loadmem widget is present
val hasMainMemory = th.chipParameters(th.p(MultiChipIdx))(ExtMem).isDefined
val mainMemoryName = Option.when(hasMainMemory)(MainMemoryConsts.globalName(th.p(MultiChipIdx)))
val nDMIAddrBits = port.io.dmi.req.bits.addr.getWidth
DMIBridge(th.harnessBinderClock, port.io, mainMemoryName, th.harnessBinderReset.asBool, nDMIAddrBits)
}
})

class WithNICBridge extends HarnessBinder({
case (th: FireSim, port: NICPort) => {
NICBridge(port.io.clock, port.io.bits)(th.p)
Expand Down Expand Up @@ -135,6 +147,7 @@ class WithSuccessBridge extends HarnessBinder({
// Shorthand to register all of the provided bridges above
class WithDefaultFireSimBridges extends Config(
new WithTSIBridgeAndHarnessRAMOverSerialTL ++
new WithDMIBridge ++
new WithNICBridge ++
new WithUARTBridge ++
new WithBlockDeviceBridge ++
Expand All @@ -148,6 +161,7 @@ class WithDefaultFireSimBridges extends Config(
// Shorthand to register all of the provided mmio-only bridges above
class WithDefaultMMIOOnlyFireSimBridges extends Config(
new WithTSIBridgeAndHarnessRAMOverSerialTL ++
new WithDMIBridge ++
new WithUARTBridge ++
new WithBlockDeviceBridge ++
new WithFASEDBridge ++
Expand Down
10 changes: 7 additions & 3 deletions generators/firechip/src/main/scala/TargetConfigs.scala
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,7 @@ class WithMinimalFireSimDesignTweaks extends Config(
// Required: Existing FAME-1 transform cannot handle black-box clock gates
new WithoutClockGating ++
// Required*: Removes thousands of assertions that would be synthesized (* pending PriorityMux bugfix)
new WithoutTLMonitors ++
// Required: Do not support debug module w. JTAG until FIRRTL stops emitting @(posedge ~clock)
new chipyard.config.WithNoDebug
new WithoutTLMonitors
)

// Non-frequency tweaks that are generally applied to all firesim configs
Expand Down Expand Up @@ -256,6 +254,12 @@ class FireSimSmallSystemConfig extends Config(
new freechips.rocketchip.subsystem.WithInclusiveCache(nWays = 2, capacityKB = 64) ++
new chipyard.RocketConfig)

class FireSimDmiRocketConfig extends Config(
new WithDefaultFireSimBridges ++
new WithDefaultMemModel ++
new WithFireSimConfigTweaks ++
new chipyard.dmiRocketConfig)

//*****************************************************************
// Boom config, base off chipyard's LargeBoomConfig
//*****************************************************************
Expand Down
Loading