rocket-chip icon indicating copy to clipboard operation
rocket-chip copied to clipboard

Migrate Debug to use BundleBrdige

Open sequencer opened this issue 2 years ago • 0 comments

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

  1. TLDebugModule.io.tl_clock
  2. TLDebugModule.io.debug_clock
  3. TLDebugModule.io.dmiClock
  4. dtm.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.

sequencer avatar Feb 27 '23 01:02 sequencer