1 ### Always-active SRST removal.
3 read_verilog -icells <<EOT
14 $sdff #(.CLK_POLARITY(1'b1), .SRST_POLARITY(1'b1), .SRST_VALUE(2'h2), .WIDTH(2)) ff0 (.CLK(CLK), .SRST(1'b1), .D(D), .Q(Q[1:0]));
15 $sdffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff1 (.CLK(CLK), .SRST(1'b0), .EN(EN), .D(D), .Q(Q[3:2]));
16 $sdffce #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff2 (.CLK(CLK), .SRST(1'b0), .EN(EN), .D(D), .Q(Q[5:4]));
17 $sdff #(.CLK_POLARITY(1'b1), .SRST_POLARITY(1'b1), .SRST_VALUE(2'h2), .WIDTH(2)) ff3 (.CLK(CLK), .SRST(1'bx), .D(D), .Q(Q[7:6]));
18 $sdffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff4 (.CLK(CLK), .SRST(1'bx), .EN(EN), .D(D), .Q(Q[9:8]));
19 $sdffce #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff5 (.CLK(CLK), .SRST(1'bx), .EN(EN), .D(D), .Q(Q[11:10]));
28 equiv_opt -undef -assert -multiclock opt_dff
30 select -assert-count 0 t:$sdff
31 select -assert-count 0 t:$sdffe
32 select -assert-count 0 t:$sdffce
33 select -assert-count 4 t:$dff
34 select -assert-count 2 t:$dffe
38 equiv_opt -undef -assert -multiclock opt_dff -keepdc
40 select -assert-count 1 t:$sdff
41 select -assert-count 1 t:$sdffe
42 select -assert-count 1 t:$sdffce
43 select -assert-count 2 t:$dff
44 select -assert-count 1 t:$dffe
49 equiv_opt -undef -assert -multiclock opt_dff
51 select -assert-none t:$_SDFF_???_
52 select -assert-none t:$_SDFFE_????_
53 select -assert-none t:$_SDFFCE_????_
54 select -assert-count 8 t:$_DFF_?_
55 select -assert-count 4 t:$_DFFE_??_
60 equiv_opt -undef -assert -multiclock opt_dff -keepdc
62 select -assert-count 2 t:$_SDFF_???_
63 select -assert-count 2 t:$_SDFFE_????_
64 select -assert-count 2 t:$_SDFFCE_????_
65 select -assert-count 4 t:$_DFF_?_
66 select -assert-count 2 t:$_DFFE_??_
71 ### Never-active SRST removal.
73 read_verilog -icells <<EOT
83 $sdff #(.CLK_POLARITY(1'b1), .SRST_POLARITY(1'b1), .SRST_VALUE(2'h2), .WIDTH(2)) ff0 (.CLK(CLK), .SRST(1'b0), .D(D), .Q(Q[1:0]));
84 $sdffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff1 (.CLK(CLK), .SRST(1'b1), .EN(EN), .D(D), .Q(Q[3:2]));
85 $sdffce #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .SRST_POLARITY(1'b0), .SRST_VALUE(2'h2), .WIDTH(2)) ff2 (.CLK(CLK), .SRST(1'b1), .EN(EN), .D(D), .Q(Q[5:4]));
93 equiv_opt -undef -assert -multiclock opt_dff
95 select -assert-none t:$sdff
96 select -assert-none t:$sdffe
97 select -assert-none t:$sdffce
98 select -assert-count 1 t:$dff
99 select -assert-count 2 t:$dffe
104 equiv_opt -undef -assert -multiclock opt_dff
106 select -assert-none t:$_SDFF_???_
107 select -assert-none t:$_SDFFE_????_
108 select -assert-none t:$_SDFFCE_????_
109 select -assert-count 2 t:$_DFF_P_
110 select -assert-count 4 t:$_DFFE_PP_