Skip to content

Conversation

@seldridge
Copy link
Member

@seldridge seldridge commented Sep 17, 2025

Disable Temporal layers (either internal or those that use the
HasTemporalInlineLayer trait) when use ChiselSim with Verilator via the
Cli.Simulator trait.

This required adding a number of additional functions to the CliOption class
that can be used to control what happens when an option is not set. This was
a big hole in this API as it created a discontinuity between arguments like
-Dsimulator=verilator which would run settings modification functions and the
absence of any simulator being specified which would not run any settings
modifications. If the settings modifications were non-identity, then this was
incongruous.

Closes #5023.

Release Notes

Disable Temporal layers (either internal or those that use the
HasTemporalInlineLayer trait) when use ChiselSim with Verilator via the
Cli.Simulator trait.

When using the CLI Simulator options, set the default explicitly, as
opposed to relying on the default simulator in the `HasSimulator` class.
This will avoid possible mistakes where this could be changed outside of
the mechanisms that are visible to the CLI Simulator.  This will also just
be more clear.

Signed-off-by: Schuyler Eldridge <[email protected]>
Modify the way that `CliOption`s are specified to include the ability to
set _default_ behavior when that option is _not_ specified.  This fixes a
hole in this API where there was no way to modify the settings unless an
option was specified on the command line.  This was particularly
problematic for thiings like the `-Dsimulator` argument which would
default to Verilator.  Due to the addition of temporal layers, we want to
disable these for Verilator.  However, we can only do that if the user
specified a `-Dsimulator=verilator` argument and not in the unspecified
case.  This provides an API to make this change to the `Cli.Simulator`
possible.

Signed-off-by: Schuyler Eldridge <[email protected]>
When running Verilator via the provided `Cli.Simulator` trait, disbale all
`Temporal` layers that may exist.  This is done because these layers are
supposed to guard against temporal properties which are not supported in
Verilator.

This default-disabled behavior is intentionally only changes for the
`Cli.Simulator` as users should use more the standard ChiselSim settings
to disable the layers they want to disable.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge added Feature New feature, will be included in release notes and removed API Modification labels Sep 18, 2025
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, I need to get binary compatibility checking working again just to make doing this right easier.

@seldridge seldridge enabled auto-merge (squash) September 18, 2025 01:12
@seldridge seldridge merged commit 35bc32e into main Sep 18, 2025
15 checks passed
@seldridge seldridge deleted the dev/seldridge/chiselsim-disable-temporal-layers-in-cli-verilator branch September 18, 2025 01:32
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.

3 participants