Add unsigned case
authorEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 07:07:17 +0000 (00:07 -0700)
committerEddie Hung <eddie@fpgeh.com>
Wed, 11 Sep 2019 07:07:17 +0000 (00:07 -0700)
tests/various/peepopt.ys

index 33555264d3e37b19baac2ad9adaf8ea11179bc3d..e930015a4c96538e5f5c295ee9c4953494c44c1d 100644 (file)
@@ -47,6 +47,23 @@ select -assert-count 0 t:*
 
 ####################
 
+design -reset
+read_verilog <<EOT
+module peepopt_dffmuxext_unsigned(input clk, ce, input [1:0] i, output reg [3:0] o);
+    always @(posedge clk) if (ce) o <= i;
+endmodule
+EOT
+
+prep -nokeepdc
+equiv_opt -assert peepopt
+design -load postopt
+clean
+select -assert-count 1 t:$dff r:WIDTH=2 %i
+select -assert-count 1 t:$mux r:WIDTH=2 %i
+select -assert-count 0 t:$dff t:$mux %% t:* %D
+
+####################
+
 design -reset
 read_verilog <<EOT
 module peepopt_dffmuxext_signed(input clk, ce, input signed [1:0] i, output reg signed [3:0] o);