2 module test(input a, output [1:0] y);
3 assign y = {a,1'b0} + 1'b1;
8 equiv_opt -assert opt_expr -fine
10 select -assert-count 1 t:$pos
11 select -assert-none t:$pos t:* %D
16 module test(input a, output [1:0] y);
17 assign y = {a,1'b1} + 1'b1;
22 select -assert-count 1 t:$alu
23 select -assert-none t:$alu t:* %D
28 module test(input a, output [1:0] y);
29 assign y = {a,1'b1} - 1'b1;
33 equiv_opt -assert opt_expr -fine
35 select -assert-count 1 t:$pos
36 select -assert-none t:$pos t:* %D
41 module test(input a, output [3:0] y);
42 assign y = {a,3'b101} - 1'b1;
46 equiv_opt -assert opt_expr -fine
48 select -assert-count 1 t:$pos
49 select -assert-none t:$pos t:* %D
54 module test(input a, output [3:0] y);
55 assign y = {a,3'b101} - 1'b1;
60 equiv_opt -assert opt_expr -fine
62 select -assert-count 1 t:$not
63 select -assert-none t:$not %% t:* %D
68 module test(input [1:0] a, output [3:0] y);
69 assign y = -{a[1], 2'b10, a[0]};
74 equiv_opt -assert opt -fine
76 select -assert-count 1 t:$alu
77 select -assert-count 1 t:$alu r:Y_WIDTH=3 %i
78 select -assert-count 1 t:$not
79 select -assert-none t:$alu t:$not t:* %D %D
84 module test(input [3:0] a, input [2:0] b, output [5:0] y);
85 assign y = {a[3:2], 1'b1, a[1:0]} + {b[2], 2'b11, b[1:0]};
90 equiv_opt -assert opt -fine
93 select -assert-count 2 t:$alu
94 select -assert-count 1 t:$alu r:Y_WIDTH=2 %i
95 select -assert-count 1 t:$alu r:Y_WIDTH=3 %i
96 select -assert-none t:$alu t:* %D
101 module test(input [3:0] a, input [3:0] b, output [5:0] y);
102 assign y = {a[3:2], 1'b0, a[1:0]} + {b[3:2], 1'b0, b[1:0]};
107 equiv_opt -assert opt -fine
109 select -assert-count 2 t:$alu
110 select -assert-count 2 t:$alu r:Y_WIDTH=3 %i
111 select -assert-none t:$alu t:* %D
115 read_verilog -icells <<EOT
116 module test(input [3:0] a, output [3:0] y, output [3:0] x, output [3:0] co);
118 .A_WIDTH(4), .B_WIDTH(4), .Y_WIDTH(4),
119 .A_SIGNED(0), .B_SIGNED(0),
122 .BI(1'b0), .CI(1'b0),
123 .Y(y), .X(x), .CO(co),
128 equiv_opt -assert opt
130 select -assert-none t:$alu
134 read_verilog -icells <<EOT
135 module test(input [3:0] a, output [3:0] y, output [3:0] x, output [3:0] co);
137 .A_WIDTH(4), .B_WIDTH(4), .Y_WIDTH(4),
138 .A_SIGNED(0), .B_SIGNED(0),
141 .BI(1'b1), .CI(1'b1),
142 .Y(y), .X(x), .CO(co),
147 equiv_opt -assert opt
149 select -assert-none t:$alu
153 read_verilog -icells <<EOT
154 module test(input [3:0] a, output [3:0] y, output [3:0] x, output [3:0] co);
156 .A_WIDTH(4), .B_WIDTH(4), .Y_WIDTH(4),
157 .A_SIGNED(0), .B_SIGNED(0),
160 .BI(1'b0), .CI(1'b0),
161 .Y(y), .X(x), .CO(co),
166 equiv_opt -assert opt
168 select -assert-none t:$alu