mirror of
https://github.com/YosysHQ/yosys
synced 2025-04-23 00:55:32 +00:00
verilog: allow null gen-if then block
This commit is contained in:
parent
584780d776
commit
8f9bba1bbf
3 changed files with 23 additions and 1 deletions
13
tests/various/gen_if_null.v
Normal file
13
tests/various/gen_if_null.v
Normal file
|
@ -0,0 +1,13 @@
|
|||
module test(x, y, z);
|
||||
localparam OFF = 0;
|
||||
generate
|
||||
if (OFF) ;
|
||||
else input x;
|
||||
if (!OFF) input y;
|
||||
else ;
|
||||
if (OFF) ;
|
||||
else ;
|
||||
if (OFF) ;
|
||||
input z;
|
||||
endgenerate
|
||||
endmodule
|
4
tests/various/gen_if_null.ys
Normal file
4
tests/various/gen_if_null.ys
Normal file
|
@ -0,0 +1,4 @@
|
|||
read_verilog gen_if_null.v
|
||||
select -assert-count 1 test/x
|
||||
select -assert-count 1 test/y
|
||||
select -assert-count 1 test/z
|
Loading…
Add table
Add a link
Reference in a new issue