3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-08 00:05:48 +00:00

Merge branch 'YosysHQ:main' into main

This commit is contained in:
Akash Levy 2024-11-21 00:34:49 -08:00 committed by GitHub
commit f855b39dbb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 4870 additions and 128 deletions

15
tests/opt/bug4610.ys Normal file
View file

@ -0,0 +1,15 @@
read_rtlil <<EOT
autoidx 1
module \top
wire output 1 \Y
cell $reduce_or $reduce_or$rtl.v:29$20
parameter \A_SIGNED 0
parameter \A_WIDTH 0
parameter \Y_WIDTH 1
connect \A { }
connect \Y \Y
end
end
EOT
equiv_opt -assert opt_demorgan

View file

@ -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