3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-07-24 13:18:56 +00:00

abc9: make re-entrant (#2993)

* Add testcase

* Cleanup some state at end of abc9

* Re-assign abc9_box_id from scratch

* Suppress delete unless prep_bypass did something
This commit is contained in:
Eddie Hung 2021-09-09 10:06:31 -07:00 committed by GitHub
parent 65316ec926
commit 96b6410dcb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 29 additions and 9 deletions

20
tests/techmap/bug2972.ys Normal file
View file

@ -0,0 +1,20 @@
read_verilog -specify <<EOT
(* abc9_box, blackbox*)
module box(input clk, d, output reg q, output do);
parameter P = 0;
always @(posedge clk)
q <= d;
assign do = d;
specify
(posedge clk => (q : d)) = 1;
(d => do) = 1;
endspecify
endmodule
module top(input clk, d, output q);
box i1(clk, d, q);
endmodule
EOT
hierarchy
abc9 -lut 4
abc9 -lut 4