From fc8d7fad67e8f103e6bb5ee1adb3bdc0dd602c9a Mon Sep 17 00:00:00 2001 From: James Cherry Date: Thu, 15 Jan 2026 16:30:52 -0700 Subject: [PATCH] Sta::isConstant Signed-off-by: James Cherry --- include/sta/Sta.hh | 2 ++ search/Sta.cc | 9 +++++++++ 2 files changed, 11 insertions(+) diff --git a/include/sta/Sta.hh b/include/sta/Sta.hh index e0f30787..4026a59e 100644 --- a/include/sta/Sta.hh +++ b/include/sta/Sta.hh @@ -538,6 +538,8 @@ public: Sdc *sdc); void removeDisable(TimingArcSet *arc_set, Sdc *sdc); + [[nodiscard]] bool isConstant(const Pin *pin, + const Mode *mode) const; // Edge is disabled by constant. [[nodiscard]] bool isDisabledConstant(Edge *edge, const Mode *mode); diff --git a/search/Sta.cc b/search/Sta.cc index b79a74c9..92a57470 100644 --- a/search/Sta.cc +++ b/search/Sta.cc @@ -1715,6 +1715,15 @@ Sta::isDisabledConstraint(Edge *edge, || sdc->isDisabledConstraint(edge); } +bool +Sta::isConstant(const Pin *pin, + const Mode *mode) const +{ + Sim *sim = mode->sim(); + sim->ensureConstantsPropagated(); + return sim->isConstant(pin); +} + bool Sta::isDisabledConstant(Edge *edge, const Mode *mode)