-
Notifications
You must be signed in to change notification settings - Fork 907
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
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,15 +5,15 @@ module addr_gen | |
) ( input en, clk, rst, | ||
output reg [AWIDTH-1:0] addr | ||
); | ||
initial addr <= 0; | ||
initial addr = 0; | ||
|
||
// 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 commentThe 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). |
||
addr <= 0; | ||
else | ||
addr <= addr + 1; | ||
|
@@ -57,7 +57,7 @@ module fifo | |
); | ||
|
||
// status signals | ||
initial count <= 0; | ||
initial count = 0; | ||
|
||
always @(posedge clk or posedge rst) begin | ||
if (rst) | ||
|
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
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
Oops, something went wrong.
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.
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.
Although it does make the first image slightly more complex
![image](https://private-user-images.githubusercontent.com/93062060/383387518-f9b6f7c7-7877-4e8c-bc9b-108e2bfae3b3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkyNzU1ODgsIm5iZiI6MTczOTI3NTI4OCwicGF0aCI6Ii85MzA2MjA2MC8zODMzODc1MTgtZjliNmY3YzctNzg3Ny00ZThjLWJjOWItMTA4ZTJiZmFlM2IzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTElMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjExVDEyMDEyOFomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWRmZDFiN2NmM2Q2NjBiOGMyOTI2M2Q1OWNhNmZlZGY1ODk3NGNhNjc0NTU3ZjNmMWQ4OTEzYWUxZDBmYTc0MzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.U8Vb1d-ZPxWT9vEwtZ4vR0UAr-NUxiQbp3qGVGg-UTs)
(left is preview, right is latest)