From 370b4787aa85ecd8afde4dc25ec638fe149b218a Mon Sep 17 00:00:00 2001 From: James Cherry Date: Mon, 21 Jun 2021 18:35:34 -0700 Subject: [PATCH] clearLogicConstants() --- include/sta/Sta.hh | 3 +++ search/Sim.cc | 1 + search/Sta.cc | 7 +++++++ 3 files changed, 11 insertions(+) diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index c0522dfb..b67cca46 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -1052,6 +1052,9 @@ public: // Propagate liberty constant functions and pins tied high/low through // combinational logic and registers. void findLogicConstants(); + // Clear the constants found by findLogicConstants so they do not interfere + // with normal constant propagate for timing. + void clearLogicConstants(); // Iterator for instances sorted by max driver pin slew. // Caller owns iterator and iterator->container(). diff --git a/search/Sim.cc b/search/Sim.cc index dc19e8a0..52147c2c 100644 --- a/search/Sim.cc +++ b/search/Sim.cc @@ -569,6 +569,7 @@ Sim::findLogicConstants() enqueueConstantPinInputs(); setConstFuncPins(); propagateConstants(true); + valid_ = true; } void diff --git a/search/Sta.cc b/search/Sta.cc index f2fc200e..3a53274e 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -3447,9 +3447,16 @@ Sta::simLogicValue(const Pin *pin) void Sta::findLogicConstants() { + ensureGraph(); sim_->findLogicConstants(); } +void +Sta::clearLogicConstants() +{ + sim_->clear(); +} + void Sta::setPortExtPinCap(Port *port, const RiseFallBoth *rf,