Skip to content

I don't understand something about the notes of InstanceSymbol::resolvePortConnections #374

Answered by MikePopoloski
luckyhorse1 asked this question in Q&A
Discussion options

You must be logged in to vote

I'm not sure what to tell you; the function is in fact reentrant when making port connections. The full test example that shows this is:

interface I #(parameter int i) ();
endinterface

module M(I iface, input logic [iface.i - 1 : 0] foo);
    localparam int j = $bits(foo);
endmodule

module test;
    I #(17) i();
    M m(i, 1);
endmodule

Setting a break point in resolvePortConnections will show you the call stack where this occurs.

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@luckyhorse1
Comment options

Comment options

You must be logged in to vote
1 reply
@luckyhorse1
Comment options

Answer selected by luckyhorse1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants