Conversation
9827916 to
5a4ca1a
Compare
poemonsense
left a comment
There was a problem hiding this comment.
Please let @xiaokamikami have a review. I may not have enough time to review the details in the future
Suggestion:
Since now we are defining the SimTop in Chisel, some logic in top.v should be moved into Chisel under SimTop, especially the module connections. For example, the clock and clock gate can be moved into Chisel.
src/main/scala/Difftest.scala
Outdated
| FileControl.write(difftestV, "DifftestMacros.svh") | ||
| } | ||
|
|
||
| def generateClockGate(): Unit = { |
There was a problem hiding this comment.
For verilog modules whose design do not depend on run-time arguments, they should be put in src directory.
There was a problem hiding this comment.
We originally put clockgate under generate to simplify include-path management across different build configs. It is used not only by FPGA/FPGA_SIM but also when Delta is enabled, so it may be hard to give it an appropriate path under src.
In addition, files under src need to be explicitly copied into fpga-release, it may be simplified when put it in generate.
On FPGA, |
To prepare for upcoming pipeline refactoring, this change decouples clockgate and ref_clock from fpga_sim. In addition to FPGA AXI, clockgate can now also be reused by the Delta, enabling Difftest to process data from a single DUT cycle across multiple cycles.
|
In this PR, since pipeline-based backpressure had not yet been introduced, The pipeline-based refactoring in PR #802 corrected the clocking to match the |
In PR #797, Gateway was switched to use the ungated ref_clock. Before the pipeline-based backpressure support introduced in PR #802, this caused fpga_sim failures. This change temporarily reverts Gateway to use the gated clock to ensure correct behavior. Gateway will switch back to ref_clock after the pipeline refactoring in PR #802 is merged.
In PR #797, Gateway was switched to use the ungated ref_clock. Before the pipeline-based backpressure support introduced in PR #802, this caused fpga_sim failures. This change temporarily reverts Gateway to use the gated clock to ensure correct behavior. Gateway will switch back to ref_clock after the pipeline refactoring in PR #802 is merged.
To prepare for upcoming pipeline refactoring, this change decouples clockgate
and ref_clock from fpga_sim. In addition to FPGA AXI, clockgate can now also be
reused by the Delta, enabling Difftest to process data from a single DUT cycle
across multiple cycles.