Skip to content

Commit

Permalink
opt_reduce: add test for constant $reduce_and/or not being zero width
Browse files Browse the repository at this point in the history
  • Loading branch information
georgerennie committed Sep 25, 2024
1 parent 023f029 commit 0572f88
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/opt/opt_reduce_andor.ys
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Check that opt_reduce doesn't produce zero width $reduce_or/$reduce_and,

read_verilog <<EOT
module reduce_const(output wire o, output wire a);
wire [3:0] zero = 4'b0000;
wire [3:0] ones = 4'b1111;
assign o = |zero;
assign a = &ones;
endmodule
EOT

equiv_opt -assert opt_reduce
design -load postopt
select -assert-none r:A_WIDTH=0

0 comments on commit 0572f88

Please sign in to comment.