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
Add a flag for disabling debug Verilog generation #694
Merged
whitequark
merged 2 commits into
amaranth-lang:main
from
Lunaphied:improve-platform-templates
Apr 5, 2022
Merged
Add a flag for disabling debug Verilog generation #694
whitequark
merged 2 commits into
amaranth-lang:main
from
Lunaphied:improve-platform-templates
Apr 5, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## main #694 +/- ##
==========================================
- Coverage 81.28% 81.09% -0.19%
==========================================
Files 49 49
Lines 6464 6479 +15
Branches 1526 1530 +4
==========================================
Hits 5254 5254
- Misses 1017 1032 +15
Partials 193 193
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
whitequark
requested changes
Apr 5, 2022
Lunaphied
force-pushed
the
improve-platform-templates
branch
from
April 5, 2022 21:37
19e98a3
to
a2f65a8
Compare
whitequark
requested changes
Apr 5, 2022
The existing functionality of get_override was poorly specified and ill-purposed for boolean flags. This change extracts the core variable retrieval logic to a helper function and adds a new handler `get_override_flag` which special cases boolean flags. The new behavior will also perform type checking on kwargs and inform the user of the desired type expected.
Lunaphied
force-pushed
the
improve-platform-templates
branch
from
April 5, 2022 21:43
a2f65a8
to
49b41df
Compare
whitequark
previously approved these changes
Apr 5, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Currently debug Verilog generation can take many 10's of seconds. A new override can now be passed as `AMARANTH_debug_verilog`=0 on the environment or by setting the `debug_verilog` keyword argument to `Platform.build()` or `Platform.prepare_toolchain()` to `False`. Fixes amaranth-lang#623.
Lunaphied
force-pushed
the
improve-platform-templates
branch
from
April 5, 2022 21:47
49b41df
to
2edd6e1
Compare
whitequark
approved these changes
Apr 5, 2022
Thank you! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently
get_override()
does not have a well defined interface and is not well designed for handling things like a flag todisable a feature cleanly. This PR implements
get_override_flag()
to provide this functionality whileget_override()
additionally gains improved type checking for keyword arguments.This is used to implement #623 which is now possible by providing a "false-like" value
("0", "no", "n", "false", "")
to it (case-insensitive).