yosys/tests/opt/bug6089.ys

22 lines
340 B
Plaintext

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