Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove embedded ClockGen in TestBench #826

Merged
merged 3 commits into from
Nov 5, 2024
Merged

Remove embedded ClockGen in TestBench #826

merged 3 commits into from
Nov 5, 2024

Conversation

FanShupei
Copy link
Contributor

@FanShupei FanShupei commented Nov 3, 2024

Proposed Design

This PR proposes we should try move simulation control logic (clock gen, dump wave, watch dog, etc) to TestDriver.sv. These features are inherently coupled with simulation platform. For VCS flow, it's best to address these in verilog code.

Current Design:

module TestBench; // top module, defined in Chisel
  ClockGen clockGen(.clock, .reset); // inlined in Chisel
endmodule

Proposed Design:

module TestDrvier; // top module, defined in sv
  // clock gen logic
  TestBench tb(.clock, .reset);
endmodule

module TestBench(input clock, input reset); // defined in Chisel
endmodule

Benefits

  • rapid iteration cycle: currently touch everything in ClockGen requires re-elaboration, which is painfully slow.
  • extensible to Arcilator in the future: I suppose we need a dedicated test driver for arc anyway, it's very unlike to reuse current ClockGen.

Future work: I plan do refacoring of simulation control code, the current code is too messy. This is the first step.

UPDATE: After discusssion, we reach consensus that no need to pull inner ClockGen to outer TestDriver. This PR only change inlined ClockGen to ExtModule.

@FanShupei FanShupei force-pushed the testdriver branch 2 times, most recently from 195aea6 to c70fc60 Compare November 4, 2024 11:47
@FanShupei FanShupei changed the title [WIP] Remove embedded ClockGen in TestBench Remove embedded ClockGen in TestBench Nov 4, 2024
@Avimitin Avimitin force-pushed the testdriver branch 3 times, most recently from 9142463 to 47b0e6f Compare November 4, 2024 17:55
@sequencer
Copy link
Member

Does verilator work now.

* add vsrc build support to nix
* rename innermostscope to self for more intuitive naming
* use fileset utils to filter only vsrc for emulator input
* add makeOverridable to sv-to-*emu function to reduce copy-pasting

Signed-off-by: Avimitin <[email protected]>
@sequencer sequencer merged commit 3300a0a into master Nov 5, 2024
129 checks passed
@sequencer sequencer deleted the testdriver branch November 5, 2024 04:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants