3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-08-14 18:05:55 +00:00
yosys/tests/opt/bug6089.ys

21 lines
340 B
Text

read_verilog -sv <<EOT
module top (
input logic [1:0] in_2,
output logic [1:0] out_1
);
always @* begin
out_1 = 2'd0;
case ('d1 & in_2)
2'd0: out_1 = 2'd0;
2'd1: out_1 = in_2;
2'd2: out_1 = 2'd1;
2'd3: out_1 = 2'd3;
default: out_1 = 2'd0;
endcase
end
endmodule
EOT
hierarchy -top top
proc
equiv_opt -assert synth