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

AUTOINST uses the wrong AUTO_TEMPLATE #445

Closed
veripoolbot opened this issue Feb 29, 2012 · 1 comment
Closed

AUTOINST uses the wrong AUTO_TEMPLATE #445

veripoolbot opened this issue Feb 29, 2012 · 1 comment
Assignees
Labels

Comments

@veripoolbot
Copy link
Collaborator


Author Name: Matthias Wagner
Original Redmine Issue: 445 from https://www.veripool.org
Original Date: 2012-02-29
Original Assignee: Wilson Snyder (@wsnyder)


The documentation for AUTOINST says:
Templates go ABOVE the instantiation(s). When an instantiation is expanded `verilog-mode' simply searches up for the closest template.

My expectation is that instantiations without previous AUTO_TEMPLATE will use the default port / wire names and that the search stops at the top of the file.

The following example shows that the template for demob_1 is also used for demob_0.

    /*AUTOWIRE*/
    // Beginning of automatic wires (for undeclared instantiated-module outputs)
    wire                 xxx;                    // From demob_0 of demob.v, ...
    wire                 yyy;                    // From demob_0 of demob.v, ...
    // End of automatics

    demob demob_0
      (/*AUTOINST*/
       // Outputs
       .b1                               (xxx),                   // Templated
       .b2                               (yyy));                   // Templated

    /* demob AUTO_TEMPLATE (
     .b1                               (xxx),
     .b2                               (yyy),
     );
     */
    demob demob_1
      (/*AUTOINST*/
       // Outputs
       .b1                               (xxx),                   // Templated
       .b2                               (yyy));                   // Templated

I have used version 789 to generate the example.

@veripoolbot
Copy link
Collaborator Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-02-29T12:50:18Z


Sorry, the documentation was missing this which I will add:

"(For backward compatibility if no template is found above, it will also look below, but do not use this behavior in new designs.)"

If you really want the next AUTOINST to use all defaults, just add a empty template above it.

     /* demob AUTO_TEMPLATE (); */

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