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

Upgrade verilator to support permissive args in the same way as vcs #565

Merged
merged 2 commits into from
May 26, 2020

Conversation

colinschmidt
Copy link
Contributor

Fixes #563

Release Notes
Verilator now supports +permissive and now can be passed its runtime arguments such as +verilator+rand+reset+0

It previously only supported them as the last argument.
Supporting them in this case would have removed some of
the DRY code that is able to handle both simulators.
@colinschmidt
Copy link
Contributor Author

You can now add verilator runtime arguments to EXTRA_SIM_FLAGS and it works as expected.

@jerryz123
Copy link
Contributor

If PERMISSIVE will be required for all simulation targets (VCS, Verilator), does it makes sense to remove the PERMISSIVE and PERMISSIVE_OFF variables defined in vcs/Makefile and verilator/Makefile?

@colinschmidt
Copy link
Contributor Author

Yeah I think we can hoist them out now.

@@ -160,6 +163,8 @@ int main(int argc, char** argv)
case 'r': rbb_port = atoi(optarg); break;
case 'V': verbose = true; break;
case 'D': dramsim = 1; break;
case 'p': opterr = 0; break;
Copy link
Contributor

Choose a reason for hiding this comment

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

why not just call this variable permissive? This isn't telling you that there was an options error right, just masking them?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I mirrored the variable name in htif/fesvr but I can name it whatever.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'll change this after the current CI run finishes in case I need to fix anything else.

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I see. I mean that's a fine reason to leave it as-is then; do whichever you like better

@@ -136,6 +136,8 @@ output_dir=$(sim_dir)/output/$(long_name)
#########################################################################################
# helper variables to run binaries
#########################################################################################
PERMISSIVE_ON=+permissive
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not just inline this instead of keeping around the two variables?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is slightly more DRY in my opinion. It should always be the same in both places and this will ensure that. If we inline it someone might change one or the other without realizing they need to change both.
That my opinion and if others think we should inline I'm ok with that.

Copy link
Contributor

Choose a reason for hiding this comment

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

Sounds good.

Copy link
Contributor

@abejgonzalez abejgonzalez left a comment

Choose a reason for hiding this comment

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

LGTM

@abejgonzalez abejgonzalez merged commit 540c529 into dev May 26, 2020
@alonamid alonamid mentioned this pull request May 30, 2020
@jerryz123 jerryz123 deleted the fix-verilator-permissive branch October 1, 2022 02:09
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.

4 participants