Add debug Clock Tap IO
This commit is contained in:
@@ -22,5 +22,11 @@ trait CanHaveClockTap { this: BaseSubsystem =>
|
|||||||
val clockTap = ClockSinkNode(Seq(ClockSinkParameters(name=Some("clock_tap"))))
|
val clockTap = ClockSinkNode(Seq(ClockSinkParameters(name=Some("clock_tap"))))
|
||||||
val clockTapDivider = LazyModule(new ClockDivider(tapParams.divider))
|
val clockTapDivider = LazyModule(new ClockDivider(tapParams.divider))
|
||||||
clockTap := clockTapDivider.node := locateTLBusWrapper(tapParams.busWhere).fixedClockNode
|
clockTap := clockTapDivider.node := locateTLBusWrapper(tapParams.busWhere).fixedClockNode
|
||||||
|
clockTap
|
||||||
}
|
}
|
||||||
|
val clockTapIO = clockTapNode.map { node => InModuleBody {
|
||||||
|
val clock_tap = IO(Output(Clock()))
|
||||||
|
clock_tap := node.in.head._1.clock
|
||||||
|
clock_tap
|
||||||
|
}}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ package chipyard.clocking
|
|||||||
|
|
||||||
import chisel3._
|
import chisel3._
|
||||||
import chisel3.util._
|
import chisel3.util._
|
||||||
import chipyard.iobinders.{OverrideLazyIOBinder, GetSystemParameters, IOCellKey, ClockPort, ResetPort}
|
import chipyard.iobinders._
|
||||||
import freechips.rocketchip.prci._
|
import freechips.rocketchip.prci._
|
||||||
import freechips.rocketchip.diplomacy._
|
import freechips.rocketchip.diplomacy._
|
||||||
import freechips.rocketchip.subsystem._
|
import freechips.rocketchip.subsystem._
|
||||||
@@ -119,3 +119,12 @@ class WithPassthroughClockGenerator extends OverrideLazyIOBinder({
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
class WithClockTapIOCells extends OverrideIOBinder({
|
||||||
|
(system: CanHaveClockTap) => {
|
||||||
|
system.clockTapIO.map { tap =>
|
||||||
|
val (clock_tap_io, clock_tap_cell) = IOCell.generateIOFromSignal(tap.getWrappedValue, "clock_tap")
|
||||||
|
(Seq(ClockTapPort(() => clock_tap_io)), clock_tap_cell)
|
||||||
|
}.getOrElse((Nil, Nil))
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
@@ -51,9 +51,10 @@ class AbstractConfig extends Config(
|
|||||||
new chipyard.iobinders.WithUARTTSIPunchthrough ++
|
new chipyard.iobinders.WithUARTTSIPunchthrough ++
|
||||||
new chipyard.iobinders.WithNMITiedOff ++
|
new chipyard.iobinders.WithNMITiedOff ++
|
||||||
|
|
||||||
// By default, punch out IOs to the Harness
|
new chipyard.clocking.WithClockTapIOCells ++ // Default generate a clock tapio
|
||||||
new chipyard.clocking.WithPassthroughClockGenerator ++
|
new chipyard.clocking.WithPassthroughClockGenerator ++ // Default punch out IOs to the Harness
|
||||||
new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", Seq("sbus", "mbus", "pbus", "fbus", "cbus", "implicit"), Seq("tile"))) ++
|
new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", // Default merge all the bus clocks
|
||||||
|
Seq("sbus", "mbus", "pbus", "fbus", "cbus", "implicit"), Seq("tile"))) ++
|
||||||
new chipyard.config.WithPeripheryBusFrequency(500.0) ++ // Default 500 MHz pbus
|
new chipyard.config.WithPeripheryBusFrequency(500.0) ++ // Default 500 MHz pbus
|
||||||
new chipyard.config.WithMemoryBusFrequency(500.0) ++ // Default 500 MHz mbus
|
new chipyard.config.WithMemoryBusFrequency(500.0) ++ // Default 500 MHz mbus
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user