3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2026-06-26 10:38:47 +00:00

Merge pull request #5981 from YosysHQ/krys/equiv_opt_unknown

equiv_opt: Add ignore-unknown-cells
This commit is contained in:
KrystalDelusion 2026-06-23 19:58:30 +00:00 committed by GitHub
commit a07c484ce1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

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