You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a signal is defined inside a function defined within a module, any signals defined outside the function with the same name will be connected to the declaration in the function, not at the module level. This applies to the behavior in the F12 goto_definition command and the content of the tooltip you get when you hover over a variable.
Example:
module Foo();
function bar (
input logic[7:0] a,
output logic[7:0] b);
b = a; // hovering over 'a' shows "input logic[7:0] a" in the tooltip
endfunction
logic a; // hovering over 'a' shows "input logic[7:0] a" in the tooltip
...
endmodule
However, if we put the signal definition first, we get the correct definitions in their respective scopes.
module Foo();
logic a; // hovering over 'a' shows "logic a" in the tooltip
function bar (
input logic[7:0] a,
output logic[7:0] b);
b = a; // hovering over 'a' shows "input logic[7:0] a" in the tooltip
endfunction
assign a = 1'b1; // hovering over 'a' shows "logic a" in the tooltip
...
endmodule
The text was updated successfully, but these errors were encountered:
When a signal is defined inside a function defined within a module, any signals defined outside the function with the same name will be connected to the declaration in the function, not at the module level. This applies to the behavior in the F12
goto_definition
command and the content of the tooltip you get when you hover over a variable.Example:
However, if we put the signal definition first, we get the correct definitions in their respective scopes.
The text was updated successfully, but these errors were encountered: