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

Question: Using comments at end of line in AUTOINST #1322

Closed
veripoolbot opened this issue Jul 5, 2018 · 3 comments
Closed

Question: Using comments at end of line in AUTOINST #1322

veripoolbot opened this issue Jul 5, 2018 · 3 comments
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: arun kumar
Original Redmine Message: 2581 from https://www.veripool.org


Hi

Is there a way to add comment in an autoinst.

[[https://www.veripool.org/boards/15/topics/2488?r=2490#message-2490]] was a good technique.

But how to add to end of the port line.

For example

a u_a (
     .unconnected_port ( ), // spyglass disable Warning_unconnected_port
);

Thanks

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-07-05T19:22:33Z


Sorry, I don't understand, what you showed should work fine.

a u_a (
.unconnected_port ( ), // spyglass disable Warning_unconnected_port
/AUTOINST/
etc
);

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: arun kumar
Original Date: 2018-07-06T06:11:06Z


a AUTO_TEMPLATE (
         .unconnected_port ( ), // spyglass disable Warning_unconnected_port
); 


the above code results in the following

a u_a (
     .unconnected_port ( ), // Templated
     /*AUTOINST*/
     etc
);


Instead is there a way to add comments specific to a port in AUTO_TEMPLATE

a AUTO_TEMPLATE (
         .unconnected_port ( ), // print comment as "spyglass disable Warning_unconnected_port"
); 


so that following is the result


a u_a (
     .unconnected_port ( ), // spyglass disable Warning_unconnected_port
     /*AUTOINST*/
     etc
);


@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2018-07-06T14:16:44Z


There is not a way to do this, sorry. An alternative methodology I advocate is:

/AUTOWIRE/
...
a AUTO_TEMPLATE (
.unconnected_port (_unconnected_wire ),
);

Then teach your linter (or wrapper script) to automatically suppress any unconnected warnings which have "_unconnected" in their name.

The advantage of this is it makes the intent clear, and also the code would work with any lint tool without updating meta comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant