3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-07 09:55:20 +00:00
yosys/tests/simple/genblk_port_shadow.v
Zachary Snow 1d5f3fe506 verlog: allow shadowing module ports within generate blocks
This is a somewhat obscure edge case I encountered while working on test
cases for earlier changes. Declarations in generate blocks should not be
checked against the list of ports. This change also adds a check
forbidding declarations within generate blocks being tagged as inputs or
outputs.
2021-02-07 11:48:39 -05:00

11 lines
138 B
Verilog

module top(x);
generate
if (1) begin : blk
wire x;
assign x = 0;
end
endgenerate
output wire x;
assign x = blk.x;
endmodule