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

.PORT System Verilog autoinst naming #245

Closed
veripoolbot opened this issue Apr 18, 2010 · 3 comments
Closed

.PORT System Verilog autoinst naming #245

veripoolbot opened this issue Apr 18, 2010 · 3 comments
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: David Rogoff
Original Redmine Issue: 245 from https://www.veripool.org
Original Date: 2010-04-18
Original Assignee: Wilson Snyder (@wsnyder)


Hi Wilson.

I asked for this a year ago as along with the modport stuff you added (thanks!) in Issue #75. As I, and other engineers I work with, have done a ton more SV code, I'm going to ask again, since it would really help in spotting renaming of signals through hierarchies.

Original request:

Use, if specified (SVD variable??) .name port connections for any port connected to a signal with the same name, which would be anything in AUTOINST not using a template:

module top;
    myram myram0(
     /*AUTOINST*/
       // Interfaces
       .ram_if        (ram_if.slave),

       // Inputs
       .clk,
       .reset);

This is nice because it makes it obvious which ports connect to signals that have a different name. Of course you can just use .*, but I've threatened to shoot anyone in my group who uses that since it makes code totally unreadable.

You replied

I don't want to do this (yet) because it would break Verilog 2001 files, and there's no reliable way to tell which language is in use. Also, it would mess up AUTOWIRE.

I'd suggest again, that this could be a config variable for verilog-mode to enable.

Thanks,

David

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-04-19T12:42:42Z


I suppose....

Mostly for my reference there's three pieces; parsing .name before the AUTOINST to eliminate those connections (always on), generating .name for AUTOINST (defvar controlled), and reading .name for AUTOWIRE etc (always on).

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-04-20T13:16:05Z


So the catch with this is going to be that it requires verilog-auto-inst-vector.
That means it will only be of use when you're connecting to a scalar,
or the wire is pre-declared. IE it won't work with autowire.

This is because it can't know that a connection to "input [2:0] foo"
won't later join with a connection to "input [4:3] foo"; thus it must
use .foo(foo[2:0]) the first time.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2010-04-20T14:40:21Z


Fixed in r614.

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

2 participants