1 ### Always-active ARST removal.
3 read_verilog -icells <<EOT
13 $adff #(.CLK_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff0 (.CLK(CLK), .ARST(1'b1), .D(D), .Q(Q[1:0]));
14 $adffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .ARST_POLARITY(1'b0), .ARST_VALUE(2'h2), .WIDTH(2)) ff1 (.CLK(CLK), .ARST(1'b0), .EN(EN), .D(D), .Q(Q[3:2]));
15 $adlatch #(.EN_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff2 (.EN(EN), .ARST(1'b1), .D(D), .Q(Q[5:4]));
16 $adff #(.CLK_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff3 (.CLK(CLK), .ARST(1'bx), .D(D), .Q(Q[7:6]));
17 $adffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .ARST_POLARITY(1'b0), .ARST_VALUE(2'h2), .WIDTH(2)) ff4 (.CLK(CLK), .ARST(1'bx), .EN(EN), .D(D), .Q(Q[9:8]));
18 $adlatch #(.EN_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff5 (.EN(EN), .ARST(1'bx), .D(D), .Q(Q[11:10]));
27 equiv_opt -undef -assert -multiclock opt_dff
29 select -assert-none t:*
33 equiv_opt -undef -assert -multiclock opt_dff -keepdc
35 select -assert-count 1 t:$adff
36 select -assert-count 1 t:$adffe
37 select -assert-count 1 t:$adlatch
42 equiv_opt -undef -assert -multiclock opt_dff
44 select -assert-none t:*
49 equiv_opt -undef -assert -multiclock opt_dff -keepdc
51 select -assert-count 2 t:$_DFF_???_
52 select -assert-count 2 t:$_DFFE_????_
53 select -assert-count 2 t:$_DLATCH_???_
58 ### Never-active ARST removal.
60 read_verilog -icells <<EOT
70 $adff #(.CLK_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff0 (.CLK(CLK), .ARST(1'b0), .D(D), .Q(Q[1:0]));
71 $adffe #(.CLK_POLARITY(1'b1), .EN_POLARITY(1'b1), .ARST_POLARITY(1'b0), .ARST_VALUE(2'h2), .WIDTH(2)) ff1 (.CLK(CLK), .ARST(1'b1), .EN(EN), .D(D), .Q(Q[3:2]));
72 $adlatch #(.EN_POLARITY(1'b1), .ARST_POLARITY(1'b1), .ARST_VALUE(2'h2), .WIDTH(2)) ff2 (.EN(EN), .ARST(1'b0), .D(D), .Q(Q[5:4]));
80 equiv_opt -undef -assert -multiclock opt_dff
82 select -assert-none t:$adff
83 select -assert-none t:$adffe
84 select -assert-none t:$adlatch
85 select -assert-count 1 t:$dff
86 select -assert-count 1 t:$dffe
87 select -assert-count 1 t:$dlatch
92 equiv_opt -undef -assert -multiclock opt_dff
94 select -assert-none t:$_DFF_???_
95 select -assert-none t:$_DFFE_????_
96 select -assert-none t:$_DLATCH_???_
97 select -assert-count 2 t:$_DFF_P_
98 select -assert-count 2 t:$_DFFE_PP_
99 select -assert-count 2 t:$_DLATCH_P_