if (GetSize(const_factor_cnst) > 20)
reject;
- if (shift->type.in($shift, $shiftx))
- if (GetSize(port(shift, \Y)) > const_factor)
- reject;
+ if (GetSize(port(shift, \Y)) > const_factor)
+ reject;
int factor_bits = ceil_log2(const_factor);
SigSpec mul_din = port(mul, const_factor_port == \A ? \B : \A);
design -reset
read_verilog <<EOT
module peepopt_shiftmul_1 (output [7:0] y, input [2:0] w);
-assign y = 1'b1 >> (w * (8'b110));
+assign y = 1'b1 >> (w * (3'b110));
endmodule
EOT
design -load postopt
clean
select -assert-count 1 t:$shr
-select -assert-count 0 t:$mul
+select -assert-count 1 t:$mul
select -assert-count 0 t:$shr t:$mul %% t:* %D
####################