diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/opt/opt_merge_init.ys | 50 | 
1 files changed, 50 insertions, 0 deletions
| diff --git a/tests/opt/opt_merge_init.ys b/tests/opt/opt_merge_init.ys index 20b6cabee..7ee7d3dd7 100644 --- a/tests/opt/opt_merge_init.ys +++ b/tests/opt/opt_merge_init.ys @@ -75,3 +75,53 @@ EOT  opt_merge  select -assert-count 2 t:$dff + +design -reset +read_verilog -icells <<EOT +module top(input clk, i, (* init = 1'b0 *) output o, p); +  \$dff  #( +    .CLK_POLARITY(1'h1), +    .WIDTH(32'd1) +  ) ffo  ( +    .CLK(clk), +    .D(i), +    .Q(o) +  ); +  \$dff  #( +    .CLK_POLARITY(1'h1), +    .WIDTH(32'd1) +  ) ffp  ( +    .CLK(clk), +    .D(i), +    .Q(p) +  ); +endmodule +EOT + +opt_merge -keepdc +select -assert-count 1 t:$dff + +design -reset +read_verilog -icells <<EOT +module top(input clk, i, output o, p); +  \$dff  #( +    .CLK_POLARITY(1'h1), +    .WIDTH(32'd1) +  ) ffo  ( +    .CLK(clk), +    .D(i), +    .Q(o) +  ); +  \$dff  #( +    .CLK_POLARITY(1'h1), +    .WIDTH(32'd1) +  ) ffp  ( +    .CLK(clk), +    .D(i), +    .Q(p) +  ); +endmodule +EOT + +opt_merge -keepdc +select -assert-count 2 t:$dff | 
