From 746ed77193c7fea31c823262bde0b244d1c68f99 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Sun, 26 Jul 2020 21:41:19 -0700 Subject: [PATCH] get_property liberty_port drive_resistance --- search/Property.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/search/Property.cc b/search/Property.cc index f77e0889..d56a1447 100644 --- a/search/Property.cc +++ b/search/Property.cc @@ -36,6 +36,7 @@ namespace sta { using std::string; +using std::max; static PropertyValue pinSlewProperty(const Pin *pin, @@ -690,6 +691,11 @@ getProperty(const LibertyPort *port, } else if (stringEqual(property, "is_register_clock")) return PropertyValue(port->isRegClk()); + else if (stringEqual(property, "drive_resistance")) { + float drive = max(port->driveResistance(RiseFall::rise(), MinMax::max()), + port->driveResistance(RiseFall::fall(), MinMax::max())); + return PropertyValue(drive); + } else if (stringEqual(property, "drive_resistance_rise_min")) return PropertyValue(port->driveResistance(RiseFall::rise(), MinMax::min()));