From aff11271f681db817abc9092994e362adc8052f1 Mon Sep 17 00:00:00 2001 From: Akash Levy Date: Wed, 13 Nov 2024 16:48:50 -0800 Subject: [PATCH] Add `port_direction`/`pin_direction` SDC property aliases --- search/Property.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/search/Property.cc b/search/Property.cc index 568ec68c..a98740c4 100644 --- a/search/Property.cc +++ b/search/Property.cc @@ -769,7 +769,8 @@ getProperty(const Port *port, if (stringEqual(property, "name") || stringEqual(property, "full_name")) return PropertyValue(network->name(port)); - else if (stringEqual(property, "direction")) + else if (stringEqual(property, "direction") + || stringEqual(property, "port_direction")) return PropertyValue(network->direction(port)->name()); else if (stringEqual(property, "liberty_port")) return PropertyValue(network->libertyPort(port)); @@ -868,7 +869,8 @@ getProperty(const LibertyPort *port, return PropertyValue(port->name()); else if (stringEqual(property, "lib_cell")) return PropertyValue(port->libertyCell()); - else if (stringEqual(property, "direction")) + else if (stringEqual(property, "direction") + || stringEqual(property, "port_direction")) return PropertyValue(port->direction()->name()); else if (stringEqual(property, "capacitance")) { float cap = port->capacitance(RiseFall::rise(), MinMax::max()); @@ -974,7 +976,8 @@ getProperty(const Pin *pin, return PropertyValue(network->portName(pin)); else if (stringEqual(property, "full_name")) return PropertyValue(network->pathName(pin)); - else if (stringEqual(property, "direction")) + else if (stringEqual(property, "direction") + || stringEqual(property, "pin_direction")) return PropertyValue(network->direction(pin)->name()); else if (stringEqual(property, "is_hierarchical")) return PropertyValue(network->isHierarchical(pin));