diff options
author | Eddie Hung <eddie@fpgeh.com> | 2020-03-31 14:50:32 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-31 14:50:32 -0700 |
commit | 1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837 (patch) | |
tree | d5c81a98367cb0509ac1726d3599162e5e24dda2 /tests/opt/opt_merge_init.ys | |
parent | 05f74d4f315eab0fa0c7e83627482f5160113ba5 (diff) | |
parent | cdf17c445525c0f665473dfcf342a5a1ecac2c6b (diff) | |
download | yosys-1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837.tar.gz yosys-1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837.tar.bz2 yosys-1bb5a5215fc3e1e84af3cb77bb26cc5705ab7837.zip |
Merge pull request #1761 from YosysHQ/eddie/opt_merge_speedup
opt_merge: speedup
Diffstat (limited to 'tests/opt/opt_merge_init.ys')
-rw-r--r-- | tests/opt/opt_merge_init.ys | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/opt/opt_merge_init.ys b/tests/opt/opt_merge_init.ys index a29c29df6..0176f09c7 100644 --- a/tests/opt/opt_merge_init.ys +++ b/tests/opt/opt_merge_init.ys @@ -20,6 +20,7 @@ endmodule EOT opt_merge +select -assert-count 1 t:$dff select -assert-count 1 a:init=1'0 @@ -46,4 +47,31 @@ endmodule EOT opt_merge +select -assert-count 1 t:$dff select -assert-count 1 a:init=2'bx1 + + +design -reset +read_verilog -icells <<EOT +module top(input clk, i, (* init = 1'b0 *) output o, /* NB: no init here! */ output 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 +select -assert-count 2 t:$dff |