Skip to content

Conversation

@seldridge
Copy link
Member

Add a new methodcalled overrideOption which behaves like addOption,
excpet it is requiring that you are overriding an existing option. This
is intended to be used internally to allow for us to do some more
complicated overrides of the simulator options.

Release Notes

Add overrideOption method to allow ChiselSim CLIs to override an existing
option. This is primarily used for changing the "modifications" of the
Simulator upstream option.

Add a new methodcalled `overrideOption` which behaves like `addOption`,
excpet it is requiring that you are overriding an existing option.  This
is intended to be used internally to allow for us to do some more
complicated overrides of the simulator options.

Signed-off-by: Schuyler Eldridge <[email protected]>
@seldridge seldridge added the Feature New feature, will be included in release notes label Sep 17, 2025
s"unable to override existing option with name '${option.name}' because this option was not previously defined"
)

options += option.name -> option
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
options += option.name -> option
options(option.name) = option

I think using the setter makes the intent here more obvious (even though you have already done the check).

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.

This could use a test

@seldridge seldridge deleted the dev/seldridge/chiselsim-allow-overriding-a-cli-option branch October 10, 2025 20:35
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