Migrate Debug to use BundleBrdige
Type of issue: feature request
Impact: API modification
Development Phase: request
In the diplomacy-based SoC, we use BundleBridge for cross-hierarchy IO connection. However the current version of DebugModule doesn't use BundleBridge due to the historic reasons, we need to migrate to BundleBridge(maybe including ClockNode)
Basically we need to add a TLDebugModuleAttachParam to instantiate TLDebugModule, here is a sample example:
val debugAttachTo = locateTLBusWrapper(p(ExportDebug).slaveWhere)
val tlDM = LazyModule(new TLDebugModule(debugAttachTo.beatBytes))
tlDM.node := debugAttachTo.coupleTo("debug")(TLFragmenter(debugAttachTo) := _)
val debugCustomXbar = LazyModule(new DebugCustomXbar(outputRequiresInput = false))
tlDM.dmInner.dmInner.customNode := debugCustomXbar.node
tlDM.dmInner.dmInner.sb2tlOpt.foreach { sb2tl =>
locateTLBusWrapper(p(ExportDebug).masterWhere).coupleFrom("debug_sb") {
_ := TLWidthWidget(1) := sb2tl.node
}
}
add a JtagDTMAttachParam to instantiate DebugTransportModuleJTAG.
Create multiple ClockSinkNode for
TLDebugModule.io.tl_clockTLDebugModule.io.debug_clockTLDebugModule.io.dmiClockdtm.io.jtag_reset
Create DMIBundleBridge for connecting JtagDTM and TLDebugModule
Create JTAGBundleBridge for TDO,TDI,TMS,TCK make it forward to other LazyModule for creating IO.
Create JEDICBundleBridge for JEDIC codes configuration.