3
0
Fork 0
mirror of https://github.com/YosysHQ/yosys synced 2025-05-08 00:05:48 +00:00

Optimizing DFFs whose initial value prevents their value from changing

This is a proof of concept implementation that invokes SAT solver via Pass::call
method.
This commit is contained in:
Bogdan Vukobratovic 2019-05-28 08:48:21 +02:00
parent 92dde319fc
commit 9a468f81c4
4 changed files with 78 additions and 3 deletions

View file

@ -1548,6 +1548,7 @@ struct SatPass : public Pass {
print_proof_failed();
tip_failed:
design->scratchpad_set_bool("sat.success", false);
if (verify) {
log("\n");
log_error("Called with -verify and proof did fail!\n");
@ -1555,6 +1556,7 @@ struct SatPass : public Pass {
if (0)
tip_success:
design->scratchpad_set_bool("sat.success", true);
if (falsify) {
log("\n");
log_error("Called with -falsify and proof did succeed!\n");
@ -1628,6 +1630,7 @@ struct SatPass : public Pass {
if (sathelper.solve())
{
design->scratchpad_set_bool("sat.success", false);
if (max_undef) {
log("SAT model found. maximizing number of undefs.\n");
sathelper.maximize_undefs();
@ -1667,6 +1670,7 @@ struct SatPass : public Pass {
}
else
{
design->scratchpad_set_bool("sat.success", true);
if (sathelper.gotTimeout)
goto timeout;
if (rerun_counter)