RocketChip: Get rid of FixedClockBroadcast module

14 views
Skip to first unread message

Dieter

unread,
May 28, 2024, 12:54:14 PMMay 28
to Chipyard
For testing purposes, I would like to drive all clocks in the design from the TestHarness clock -- That is, create a simple design where everything is under the same clock domain and driven by one clock from the TestHarness. Because of limitations in the tooling that I am working with, I want to avoid "derived clocks", in particular I cannot seems to use the FixedClockBroadcast module

I tried to create the configuration below in the hope that it would just pass through the harness clock -- but it still uses the FixedClockBroadcast module. Can I get rid of that?
Ideally, without using a fixed frequency either (instead letting the frequency be dictated by the clock of the TestHarness?

Thanks!
```
class MinimalBaseConfig extends Config(
  // The HarnessBinders control generation of hardware in the TestHarness
  new chipyard.harness.WithClockAndResetFromHarness ++             // all Clock/Reset I/O in ChipTop should be driven by harnessClockInstantiator
  new chipyard.harness.WithAllClocksFromHarnessClockInstantiator ++
    new chipyard.harness.WithHarnessBinderClockFreqMHz(1000) ++
  //new chipyard.harness.WithAbsoluteFreqHarnessClockInstantiator ++ // generate clocks in harness with unsynthesizable ClockSourceAtFreqMHz
    // By default, punch out IOs to the Harness
  new chipyard.clocking.WithPassthroughClockGenerator ++
  new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", Seq(""), Seq("tile"))) ++
  //new chipyard.clocking.WithClockGroupsCombinedByName(("uncore", Seq("sbus", "mbus", "pbus", "fbus", "cbus", "implicit"), Seq("tile"))) ++
  new chipyard.config.WithPeripheryBusFrequency(1000.0) ++           // Default 500 MHz pbus
  new chipyard.config.WithMemoryBusFrequency(1000.0) ++              // Default 500 MHz mbus

```

Jerry Zhao

unread,
May 28, 2024, 3:32:45 PMMay 28
to chip...@googlegroups.com
I thought an example showing this was done already, but the PR was never merged. I've updated the PR here: https://github.com/ucb-bar/chipyard/pull/1461

This doesn't use the FixedClockBroadcast feature of rocketchip, but it accomplishes what you are asking for I think. Look at the SingleClockBroadcastRocketConfig.

-Jerry

--
You received this message because you are subscribed to the Google Groups "Chipyard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chipyard+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/chipyard/fab85cd7-3b22-4a39-a6a2-17b693042458n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages