3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-07-03 14:06:09 +00:00

equiv_opt: Add ignore-unknown-cells

This commit is contained in:
Krystine Sherwin 2026-06-23 10:54:00 +12:00
parent 0bd04dbae3
commit de6aa77dc8
No known key found for this signature in database

View file

@ -69,7 +69,7 @@ struct EquivOptPass:public ScriptPass
} }
std::string command, techmap_opts, make_opts; std::string command, techmap_opts, make_opts;
bool assert, undef, multiclock, async2sync, nocheck; bool assert, undef, ignore_unknown_cells, multiclock, async2sync, nocheck;
void clear_flags() override void clear_flags() override
{ {
@ -78,6 +78,7 @@ struct EquivOptPass:public ScriptPass
make_opts = ""; make_opts = "";
assert = false; assert = false;
undef = false; undef = false;
ignore_unknown_cells = false;
multiclock = false; multiclock = false;
async2sync = false; async2sync = false;
nocheck = false; nocheck = false;
@ -114,6 +115,10 @@ struct EquivOptPass:public ScriptPass
undef = true; undef = true;
continue; continue;
} }
if (args[argidx] == "-ignore-unknown-cells") {
ignore_unknown_cells = true;
continue;
}
if (args[argidx] == "-nocheck") { if (args[argidx] == "-nocheck") {
nocheck = true; nocheck = true;
continue; continue;
@ -197,12 +202,16 @@ struct EquivOptPass:public ScriptPass
else else
opts = make_opts; opts = make_opts;
run("equiv_make" + opts + " gold gate equiv"); run("equiv_make" + opts + " gold gate equiv");
string induct_opts;
if (help_mode) if (help_mode)
run("equiv_induct [-undef] equiv"); induct_opts = " [-undef] [-ignore-unknown-cells]";
else if (undef) else {
run("equiv_induct -undef equiv"); if (undef)
else induct_opts += " -undef";
run("equiv_induct equiv"); if (ignore_unknown_cells)
induct_opts += " -ignore-unknown-cells";
}
run("equiv_induct" + induct_opts + " equiv");
if (help_mode) if (help_mode)
run("equiv_status [-assert] equiv"); run("equiv_status [-assert] equiv");
else if (assert) else if (assert)