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
Switch for file to read public signals from #1514
Comments
Original Redmine Comment Agreed, and suggest this should be handled by adding a config file parse rule to the bottom of verilog.y. Ideally we'd allow every Verilator metacomment attribute instead come from config files, not just the limited subset (lint/coverage/tracing) now in configs. Perhaps some refactoring of the parser would allow sharing the same rules for the metacomments and config parsing, rather than their being done differently (parser versus lexer) as is now. |
Original Redmine Comment I have started basic prototyping of this feature here: https://github.com/wallento/verilator/tree/vlt-attrs I believe the separation is good as it is as the comments directly dump into the Ast. Similar to the coverage/lint comments my prototype hooks up in the early stages and gets called for every AstVar (not every FileLine) to check if it has a configured public attribute, then adds it similarly to what the parser did. My original idea was to have identifiers of the elaborated design in the attribute directives, but then found that this would be a huge impact, so it is now based on (module,varname) tuples, which is probably more natural and waaay easiert to implement. Needs more polishing and testing of course, but getting there. Missing is public modules and then wildcards are probably useful and rather simple to add. Will look into other attributes as well. |
Original Redmine Comment Good work.
I don't think this is easily human readable. Maybe something like:?
I'm sure you intend to add something here - please have a FIXME in the code for incomplete stuff so can't get forgotten.
Please insert these in sorted order (within the section between newlines).
Likewise sorted in section.
I think this test needs to somehow make sure the public attributes got applied appropriately. One way would be to have a CPP file that checks the public applied. Perhaps a cleaner test would be to change expose the public attributes in the XML file (V3EmitXml) then just compare the XML against a golden file. |
* Add more directives to configuration files Allow to set the same directives in configuration files that can also be set by comment attributes (such as /* verilator public */ etc). * Add support for lint messsage waivers Add configuration file switch '-match' for lint_off. It takes a string with wildcards allowed and warnings will be matched against it (if rule and file also match). If it matches, the warning is waived. Fixes #1649 and #1514 Closes #2072
Author Name: Stefan Wallentowitz (@wallento)
Original Redmine Issue: 1514 from https://www.veripool.org
Original Assignee: Stefan Wallentowitz (@wallento)
We should have a switch that lets the user give a file with names of signals (including whitespaces) that are treated as public-flat-rw (or even beyond that allow to set flat/rw/clk). For example this could be such a file:
Just a quick braindump, this is just supposed to kick off the discussion.
The text was updated successfully, but these errors were encountered: