Skip to content

Commit e748b23

Browse files
authored
Add port_direction/pin_direction SDC property aliases (#127)
1 parent e56d0e2 commit e748b23

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

search/Property.cc

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,8 @@ getProperty(const Port *port,
769769
if (stringEqual(property, "name")
770770
|| stringEqual(property, "full_name"))
771771
return PropertyValue(network->name(port));
772-
else if (stringEqual(property, "direction"))
772+
else if (stringEqual(property, "direction")
773+
|| stringEqual(property, "port_direction"))
773774
return PropertyValue(network->direction(port)->name());
774775
else if (stringEqual(property, "liberty_port"))
775776
return PropertyValue(network->libertyPort(port));
@@ -868,7 +869,8 @@ getProperty(const LibertyPort *port,
868869
return PropertyValue(port->name());
869870
else if (stringEqual(property, "lib_cell"))
870871
return PropertyValue(port->libertyCell());
871-
else if (stringEqual(property, "direction"))
872+
else if (stringEqual(property, "direction")
873+
|| stringEqual(property, "port_direction"))
872874
return PropertyValue(port->direction()->name());
873875
else if (stringEqual(property, "capacitance")) {
874876
float cap = port->capacitance(RiseFall::rise(), MinMax::max());
@@ -974,7 +976,8 @@ getProperty(const Pin *pin,
974976
return PropertyValue(network->portName(pin));
975977
else if (stringEqual(property, "full_name"))
976978
return PropertyValue(network->pathName(pin));
977-
else if (stringEqual(property, "direction"))
979+
else if (stringEqual(property, "direction")
980+
|| stringEqual(property, "pin_direction"))
978981
return PropertyValue(network->direction(pin)->name());
979982
else if (stringEqual(property, "is_hierarchical"))
980983
return PropertyValue(network->isHierarchical(pin));

0 commit comments

Comments
 (0)