aboutsummaryrefslogtreecommitdiffstats
path: root/passes/sat
diff options
context:
space:
mode:
authorBogdan Vukobratovic <bogdan.vukobratovic@gmail.com>2019-05-28 08:48:21 +0200
committerBogdan Vukobratovic <bogdan.vukobratovic@gmail.com>2019-05-28 08:48:21 +0200
commit9a468f81c412f8b63d25e739f28932815c6882fb (patch)
treed49e79388b32a59c24d40b600f551fc682648d82 /passes/sat
parent92dde319fc603223304a64a5a49bbbe6c1ec3045 (diff)
downloadyosys-9a468f81c412f8b63d25e739f28932815c6882fb.tar.gz
yosys-9a468f81c412f8b63d25e739f28932815c6882fb.tar.bz2
yosys-9a468f81c412f8b63d25e739f28932815c6882fb.zip
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.
Diffstat (limited to 'passes/sat')
-rw-r--r--passes/sat/sat.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/passes/sat/sat.cc b/passes/sat/sat.cc
index cbba738f0..453ae8cca 100644
--- a/passes/sat/sat.cc
+++ b/passes/sat/sat.cc
@@ -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)