3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-04-23 09:05:32 +00:00

opt_clean: handle undriven and x-bit driven bits consistently

This commit is contained in:
Emil J. Tywoniak 2025-04-08 23:49:15 +02:00
parent 0c689091e2
commit 42c0f9f3a6
2 changed files with 38 additions and 6 deletions

14
tests/opt/opt_clean_x.ys Normal file
View file

@ -0,0 +1,14 @@
read_verilog <<EOT
module alu(
);
wire [1:0] p1, p2;
assign p1 = 2'bx1;
assign p2[0] = 1'b1;
endmodule
EOT
proc
opt_clean
dump
select -assert-count 1 w:p1 a:unused_bits=1 %i
select -assert-count 1 w:p2 a:unused_bits=1 %i