3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-10-01 05:29:29 +00:00

opt_hier: Fix two optimizations conflicting

Fix a conflict between the following two:

 * propagation of tied-together inputs in
 * propagation of unused inputs out
This commit is contained in:
Martin Povišer 2025-09-29 12:26:43 +02:00
parent 69770a844e
commit ffe2f7a16d
2 changed files with 37 additions and 5 deletions

23
tests/opt/bug5398.ys Normal file
View file

@ -0,0 +1,23 @@
read_verilog <<EOF
module tag_2x4(
input R0_clk,
input W0_clk,
output x,
);
assign x = !W0_clk;
endmodule
module top(input clock, output x, output flag);
tag_2x4 tag_ext(
.R0_clk (clock),
.W0_clk (clock),
.x (x)
);
assign flag = x ^ clock;
endmodule
EOF
hierarchy -top top
opt_hier
flatten
sat -verify -prove flag 1