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

Comments not retained properly for last input/output declaration #917

Closed
veripoolbot opened this issue May 8, 2015 · 4 comments
Closed

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Raj G
Original Redmine Issue: 917 from https://www.veripool.org
Original Date: 2015-05-08


Consider the following example

module top(
input wire a, // First
output wire b // Second
);
// Third
endmodule

When I try to display the comments of each port/net, then it displays incorrectly.
Attached is the script that I used

The output of this script is as shown below
a Comment = // First
b Comment = // Third

As you can see, the comment is displayed as // Third, instead of // Second.
I'm using version 3.412

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Raj G
Original Date: 2015-05-08T08:58:06Z


Attaching the verilog file as well

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-05-09T15:45:01Z


I agree this is wrong, but unfortunately I don't see a straightforward way to fix it given the internal design. The problem is without a terminating , or ), the parser cannot know that a variable declaration has occurred, and until that happens it likewise can't attach a comment. Ideally comments could be ordered with the parser, but that would need a fundamental redesign.

If you know each comment is one line, you could use the filename and lineno attribute of each signal to read the specified filename and grab comments from that lineno, or make a custom comment callback to collect all the comments.

Sorry. Leaving it open in case some solution comes to me.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-06-25T13:56:30Z


Figured out how to work around this for the common cases.

Fixed in git towards 3.413.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2015-06-26T10:31:11Z


In 3.414.

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

No branches or pull requests

1 participant