-
Notifications
You must be signed in to change notification settings - Fork 895
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
Emphasise that read_verilog doesn't lint #4705
Conversation
Link to verilator in the introduction. Include `verilator --lint-only fifo.v` in the example synth doc. Fix linter warnings in fifo.v.
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.
What's the relation to the docs change? Is this to make verilator linting happy?
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.
Yeah verilator gave lint warnings so I figured it was easy enough to fix them (and this wasn't a guided tutorial of how to fix it yourself)
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.
|
||
// async reset | ||
// increment address when enabled | ||
always @(posedge clk or posedge rst) | ||
if (rst) | ||
addr <= 0; | ||
else if (en) begin | ||
if (addr == MAX_DATA-1) | ||
if ({'0, addr} == MAX_DATA-1) |
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.
I would not include this change, it's fine to get some linting messages from verilator IMO (gives people some idea of what to expect from verilator too).
README.md
Outdated
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.
does not perform any syntax checking
Is an exaggeration. Maybe: "does not perform robust syntax checking"?
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.
I see it more as a statement of intent. read_verilog
doesn't try to check if the input is correct or not, it just proceeds assuming it is correct. If that turns out to be a wrong assumption it will sometimes error out, but often not in a way that is particularly useful for the user for finding the problem. Sometimes it will also just continue, and end up with who knows what netlist. Given the history of this code and the alternatives, we think it would be a waste of effort to change that.
c0b31fd
to
d0e5677
Compare
What are the reasons/motivation for this change?
Users are often confused and/or surprised when the
read_verilog
frontend runs into syntactical edge cases that it doesn't handle well.Explain how this is achieved.
Mention Verilator (and
verilator --lint-only
) in a few places and reiterate thatread_verilog
does not lint, and you should lint your code before trying to use it.If applicable, please suggest to reviewers how they can test the change.
Preview available on readthedocs. Note that preview builds show todos, which are normally hidden.