mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-18 02:16:41 +00:00
opt_merge: speedup
This commit is contained in:
parent
a0cc795e85
commit
9f30d7f843
3 changed files with 189 additions and 127 deletions
64
tests/opt/opt_merge_keep.ys
Normal file
64
tests/opt/opt_merge_keep.ys
Normal file
|
@ -0,0 +1,64 @@
|
|||
read_verilog -icells <<EOT
|
||||
module top(input clk, i, output o, p);
|
||||
(* keep *)
|
||||
\$_DFF_P_ ffo (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(o)
|
||||
);
|
||||
\$_DFF_P_ ffp (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(p)
|
||||
);
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
opt_merge
|
||||
select -assert-count 1 t:$_DFF_P_
|
||||
select -assert-count 1 a:keep
|
||||
|
||||
|
||||
design -reset
|
||||
read_verilog -icells <<EOT
|
||||
module top(input clk, i, output o, p);
|
||||
\$_DFF_P_ ffo (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(o)
|
||||
);
|
||||
(* keep *)
|
||||
\$_DFF_P_ ffp (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(p)
|
||||
);
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
opt_merge
|
||||
select -assert-count 1 t:$_DFF_P_
|
||||
select -assert-count 1 a:keep
|
||||
|
||||
|
||||
design -reset
|
||||
read_verilog -icells <<EOT
|
||||
module top(input clk, i, output o, p);
|
||||
(* keep *)
|
||||
\$_DFF_P_ ffo (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(o)
|
||||
);
|
||||
(* keep *)
|
||||
\$_DFF_P_ ffp (
|
||||
.C(clk),
|
||||
.D(i),
|
||||
.Q(p)
|
||||
);
|
||||
endmodule
|
||||
EOT
|
||||
|
||||
opt_merge
|
||||
select -assert-count 2 t:$_DFF_P_
|
||||
select -assert-count 2 a:keep
|
Loading…
Add table
Add a link
Reference in a new issue