Skip to content

Conversation

seldridge
Copy link
Member

@seldridge seldridge commented Mar 15, 2025

Change the existing VCD waveform CLI API to also enable waves. There was enough infrastructure there to do this and this is actually a way better API.

Add FSDB and VPD CLI emission. These require VCS and will throw an IllegalArgumentException if you try to use them with Verilator.

Release Notes

  • Add ChiselSim traits which can be used to add Scalatest CLI support for compiling in FSDB and VPD waveform support into a test.
  • Modify existing Scalatest CLI traits to both compile and enable waves. These can be accessed with -DemitVcd=1, -DemitVpd=1, and -DemitFsdb=1.

@seldridge seldridge added the Feature New feature, will be included in release notes label Mar 15, 2025
@seldridge seldridge force-pushed the dev/seldridge/chiselsim-add-cli-traits branch from 82ecfed to a9ab593 Compare March 15, 2025 03:34
@seldridge seldridge changed the base branch from main to dev/seldridge/chiselsim-support-plusargs March 15, 2025 03:35
@seldridge seldridge changed the title [chiselsim] Add CLI traits for enabling FSDB and VPD waveform support [chiselsim] Add CLI FSDB, VPD support, enable waves (VCD, too) Mar 15, 2025
@seldridge seldridge requested a review from jackkoenig March 15, 2025 03:38
Fix a bug where modifications applied via command line arguments would not
be reflected by ChiselSim.  This was an issue of not using the modified
settings.

This additionally changes it so that the CLI modifications are always
applied _last_.  I.e., they could overwrite anything earlier or specified
in Chisel.  This seems to make the most sens as I would like to, as a
user, be able to change the behavior of a test on the command line.
Nothing else should override this.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add an option to turn on waves at time zero via the runtime simulation
settings.  This option has no effect, yet.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Hook up a new option coming from svsim's simulation configuration that
causes waveforms to be enabled at time zero.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add a trait that can be used to allow for FSDB waveform support to be
specified via a Scalatest option.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Add a trait that can be mixed into a test to give it access to compiling
in VPD waveform support via a Scalatest option.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
Change the three waveform CLI APIs (for FSDB, VCD, and VPD) to not just
compile with waveform support, but to also enable waves.  Now that
enabling waves (via the Control API) requires compilation with waveform
support, a command line option to enable the compilation with waves
doesn't do much.

These are additional _much_ better CLI APIs than before.  This also
matches the way that these were used internally.

Signed-off-by: Schuyler Eldridge <schuyler.eldridge@sifive.com>
@seldridge seldridge force-pushed the dev/seldridge/chiselsim-support-plusargs branch from 0be252d to 5f119d1 Compare March 15, 2025 19:57
@seldridge seldridge force-pushed the dev/seldridge/chiselsim-add-cli-traits branch from f71254e to 624fa12 Compare March 15, 2025 19:58
Copy link
Contributor

@jackkoenig jackkoenig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Base automatically changed from dev/seldridge/chiselsim-support-plusargs to main March 15, 2025 21:11
@seldridge seldridge marked this pull request as ready for review March 15, 2025 21:11
@seldridge seldridge added Feature New feature, will be included in release notes and removed Feature New feature, will be included in release notes labels Mar 15, 2025
@seldridge seldridge merged commit 624fa12 into main Mar 15, 2025
16 checks passed
@seldridge seldridge deleted the dev/seldridge/chiselsim-add-cli-traits branch March 15, 2025 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature, will be included in release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants