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

Name collision of unnamed blocks #567

Closed
veripoolbot opened this issue Oct 13, 2012 · 3 comments
Closed

Name collision of unnamed blocks #567

veripoolbot opened this issue Oct 13, 2012 · 3 comments
Labels
resolution: fixed Closed; fixed

Comments

@veripoolbot
Copy link
Contributor


Author Name: Chandan Egbert
Original Redmine Issue: 567 from https://www.veripool.org
Original Date: 2012-10-13
Original Assignee: Chandan Egbert


This code

module sub();
endmodule


module un(input logic a, input logic b,
           output logic x, output logic y);

     always_comb begin
         integer i;

         x = a;
     end

     sub u0();

     always_comb begin
         integer j;

         y = b;
     end
     
endmodule

causes Verilator 3.841 to bail out with the following error:

%Error: unnamedblk.v:16: Duplicate declaration of block: unnamedblk1
%Error: unnamedblk.v:8: ... Location of original declaration

removing the instantiation of the sub module "sub" or removing the declaration of one of the variables i or j makes the error message go away.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Chandan Egbert
Original Date: 2012-10-16T23:57:46Z


I tried fixing the problem. Not sure if my fix is 100% correct, but here is a patch to V3LinkDot.cpp that seems to work.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-11-03T00:31:45Z


Thanks for the correct patch, committed to git towards 3.842.

@veripoolbot
Copy link
Contributor Author


Original Redmine Comment
Author Name: Wilson Snyder (@wsnyder)
Original Date: 2012-11-04T00:24:50Z


In 3.842.

@veripoolbot veripoolbot added the resolution: fixed Closed; fixed label Dec 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
resolution: fixed Closed; fixed
Projects
None yet
Development

No branches or pull requests

1 participant