[clocking] Drive all buses directly from the asyncClockGroup
This commit is contained in:
@@ -36,17 +36,35 @@ case class CoherentMulticlockBusTopologyParams(
|
|||||||
(SBUS, L2, TLBusWrapperConnection(xType = NoCrossing, driveClockFromMaster = Some(true), nodeBinding = BIND_STAR)()),
|
(SBUS, L2, TLBusWrapperConnection(xType = NoCrossing, driveClockFromMaster = Some(true), nodeBinding = BIND_STAR)()),
|
||||||
(L2, MBUS, TLBusWrapperConnection.crossTo(
|
(L2, MBUS, TLBusWrapperConnection.crossTo(
|
||||||
xType = sbusToMbusXType,
|
xType = sbusToMbusXType,
|
||||||
driveClockFromMaster = Some(true),
|
driveClockFromMaster = None,
|
||||||
nodeBinding = BIND_QUERY))
|
nodeBinding = BIND_QUERY))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
// This differs from upstream only in that it does not use the legacy crossTo
|
||||||
|
// and crossFrom functions to ensure driveClockFromMaster = None
|
||||||
|
case class HierarchicalMulticlockBusTopologyParams(
|
||||||
|
pbus: PeripheryBusParams,
|
||||||
|
fbus: FrontBusParams,
|
||||||
|
cbus: PeripheryBusParams,
|
||||||
|
xTypes: SubsystemCrossingParams
|
||||||
|
) extends TLBusWrapperTopology(
|
||||||
|
instantiations = List(
|
||||||
|
(PBUS, pbus),
|
||||||
|
(FBUS, fbus),
|
||||||
|
(CBUS, cbus)),
|
||||||
|
connections = List(
|
||||||
|
(SBUS, CBUS, TLBusWrapperConnection(xType = xTypes.sbusToCbusXType, nodeBinding = BIND_STAR)()),
|
||||||
|
(CBUS, PBUS, TLBusWrapperConnection(xType = xTypes.cbusToPbusXType, nodeBinding = BIND_STAR)()),
|
||||||
|
(FBUS, SBUS, TLBusWrapperConnection(xType = xTypes.fbusToSbusXType, nodeBinding = BIND_QUERY, flipRendering = true)()))
|
||||||
|
)
|
||||||
|
|
||||||
// For subsystem/Configs.scala
|
// For subsystem/Configs.scala
|
||||||
|
|
||||||
class WithMulticlockCoherentBusTopology extends Config((site, here, up) => {
|
class WithMulticlockCoherentBusTopology extends Config((site, here, up) => {
|
||||||
case TLNetworkTopologyLocated(InSubsystem) => List(
|
case TLNetworkTopologyLocated(InSubsystem) => List(
|
||||||
JustOneBusTopologyParams(sbus = site(SystemBusKey)),
|
JustOneBusTopologyParams(sbus = site(SystemBusKey)),
|
||||||
HierarchicalBusTopologyParams(
|
HierarchicalMulticlockBusTopologyParams(
|
||||||
pbus = site(PeripheryBusKey),
|
pbus = site(PeripheryBusKey),
|
||||||
fbus = site(FrontBusKey),
|
fbus = site(FrontBusKey),
|
||||||
cbus = site(ControlBusKey),
|
cbus = site(ControlBusKey),
|
||||||
|
|||||||
@@ -56,6 +56,23 @@ class ChipyardSubsystem(implicit p: Parameters) extends BaseSubsystem
|
|||||||
case b: BoomTile => b.module.core.coreMonitorBundle
|
case b: BoomTile => b.module.core.coreMonitorBundle
|
||||||
}.toList
|
}.toList
|
||||||
|
|
||||||
|
|
||||||
|
// Relying on [[TLBusWrapperConnection]].driveClockFromMaster for
|
||||||
|
// bus-couplings that are not asynchronous strips the bus name from the sink
|
||||||
|
// ClockGroup. This makes it impossible to determine which clocks are driven
|
||||||
|
// by which bus based on the member names, which is problematic when there is
|
||||||
|
// a rational crossing between two buses. Instead, provide all bus clocks
|
||||||
|
// directly from the asyncClockGroupsNode in the subsystem to ensure bus
|
||||||
|
// names are always preserved in the top-level clock names.
|
||||||
|
//
|
||||||
|
// For example, using a RationalCrossing between the Sbus and Cbus, and
|
||||||
|
// driveClockFromMaster = Some(true) results in all cbus-attached device and
|
||||||
|
// bus clocks to be given names of the form "subsystem_sbus_[0-9]*".
|
||||||
|
// Conversly, if an async crossing is used, they instead receive names of the
|
||||||
|
// form "subsystem_cbus_[0-9]*". The assignment below the latter names in all cases.
|
||||||
|
Seq(PBUS, FBUS, MBUS, CBUS).foreach { loc =>
|
||||||
|
tlBusWrapperLocationMap.lift(loc).foreach { _.clockGroupNode := asyncClockGroupsNode }
|
||||||
|
}
|
||||||
override lazy val module = new ChipyardSubsystemModuleImp(this)
|
override lazy val module = new ChipyardSubsystemModuleImp(this)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user