mirror of
https://github.com/YosysHQ/yosys
synced 2025-07-24 05:08: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:
parent
65316ec926
commit
96b6410dcb
3 changed files with 29 additions and 9 deletions
|
@ -289,8 +289,10 @@ struct Abc9Pass : public ScriptPass
|
|||
run("scc -specify -set_attr abc9_scc_id {}");
|
||||
if (help_mode)
|
||||
run("abc9_ops -prep_bypass [-prep_dff]", "(option if -dff)");
|
||||
else
|
||||
else {
|
||||
active_design->scratchpad_unset("abc9_ops.prep_bypass.did_something");
|
||||
run(stringf("abc9_ops -prep_bypass %s", dff_mode ? "-prep_dff" : ""));
|
||||
}
|
||||
if (dff_mode) {
|
||||
run("design -copy-to $abc9_map @$abc9_flops", "(only if -dff)");
|
||||
run("select -unset $abc9_flops", " (only if -dff)");
|
||||
|
@ -450,6 +452,9 @@ struct Abc9Pass : public ScriptPass
|
|||
run("design -delete $abc9_unmap");
|
||||
if (saved_designs.count("$abc9_holes") || help_mode)
|
||||
run("design -delete $abc9_holes");
|
||||
if (help_mode || active_design->scratchpad_get_bool("abc9_ops.prep_bypass.did_something"))
|
||||
run("delete =*_$abc9_byp");
|
||||
run("setattr -mod -unset abc9_box_id");
|
||||
}
|
||||
}
|
||||
} Abc9Pass;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue