Explicitly provide refClockFreqMHz to harnessClockInstantiator

This commit is contained in:
Jerry Zhao
2023-05-13 11:18:03 -07:00
parent a89b86c785
commit 2077e4304d
10 changed files with 23 additions and 7 deletions

View File

@@ -28,7 +28,7 @@ import chipyard.clocking._
*/
class FireSimClockBridgeInstantiator extends HarnessClockInstantiator {
// connect all clock wires specified to the RationalClockBridge
def instantiateHarnessClocks(refClock: Clock): Unit = {
def instantiateHarnessClocks(refClock: Clock, refClockFreqMHz: Double): Unit = {
val sinks = clockMap.map({ case (name, (freq, bundle)) =>
ClockSinkParameters(take=Some(ClockParameters(freqMHz=freq / (1000 * 1000))), name=Some(name))
}).toSeq
@@ -72,6 +72,7 @@ class FireSim(implicit val p: Parameters) extends RawModule with HasHarnessInsta
// In effect, the bridge counts the length of the reset in terms of this clock.
resetBridge.io.clock := harnessBinderClock
def referenceClockFreqMHz = 0.0
def referenceClock = false.B.asClock // unused
def referenceReset = resetBridge.io.reset
def success = { require(false, "success should not be used in Firesim"); false.B }