mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-09-06 17:21:05 +02:00
get_prpperty PathEnd points, PathRef arrival, required, slack, pin
This commit is contained in:
+19
-1
@@ -1795,6 +1795,8 @@ proc get_property_cmd { cmd type_key cmd_args } {
|
||||
return [edge_property $object $attr]
|
||||
} elseif { $object_type == "PathEnd" } {
|
||||
return [path_end_property $object $attr]
|
||||
} elseif { $object_type == "PathRef" } {
|
||||
return [path_ref_property $object $attr]
|
||||
} else {
|
||||
sta_error "$cmd unsupported object type $object_type."
|
||||
}
|
||||
@@ -1838,7 +1840,9 @@ proc edge_property { edge property } {
|
||||
}
|
||||
|
||||
proc path_end_property { path_end property } {
|
||||
if { $property == "startpoint" } {
|
||||
if { $property == "points" } {
|
||||
return [$path_end points]
|
||||
} elseif { $property == "startpoint" } {
|
||||
return [$path_end startpoint]
|
||||
} elseif { $property == "startpoint_clock" } {
|
||||
return [$path_end startpoint_clock]
|
||||
@@ -1855,6 +1859,20 @@ proc path_end_property { path_end property } {
|
||||
}
|
||||
}
|
||||
|
||||
proc path_ref_property { path property } {
|
||||
if { $property == "pin" } {
|
||||
return [$path pin]
|
||||
} elseif { $property == "arrival" } {
|
||||
return [time_sta_ui [$path arrival]]
|
||||
} elseif { $property == "required" } {
|
||||
return [time_sta_ui [$path required]]
|
||||
} elseif { $property == "slack" } {
|
||||
return [time_sta_ui [$path slack]]
|
||||
} else {
|
||||
return ""
|
||||
}
|
||||
}
|
||||
|
||||
proc get_object_type { obj } {
|
||||
set object_type [object_type $obj]
|
||||
if { $object_type == "Clock" } {
|
||||
|
||||
@@ -1808,6 +1808,22 @@ using namespace sta;
|
||||
Tcl_SetObjResult(interp, obj);
|
||||
}
|
||||
|
||||
%typemap(out) PathRefSeq* {
|
||||
Tcl_Obj *obj = SWIG_NewInstanceObj($1, $1_descriptor, false);
|
||||
Tcl_SetObjResult(interp, obj);
|
||||
|
||||
Tcl_Obj *list = Tcl_NewListObj(0, NULL);
|
||||
PathRefSeq *paths = $1;
|
||||
PathRefSeq::Iterator path_iter(paths);
|
||||
while (path_iter.hasNext()) {
|
||||
PathRef *path = &path_iter.next();
|
||||
Tcl_Obj *obj = SWIG_NewInstanceObj(path, SWIGTYPE_p_PathRef, false);
|
||||
Tcl_ListObjAppendElement(interp, list, obj);
|
||||
}
|
||||
delete paths;
|
||||
Tcl_SetObjResult(interp, list);
|
||||
}
|
||||
|
||||
%typemap(out) MinPulseWidthCheck* {
|
||||
Tcl_Obj *obj = SWIG_NewInstanceObj($1, $1_descriptor, false);
|
||||
Tcl_SetObjResult(interp, obj);
|
||||
@@ -6289,6 +6305,20 @@ endpoint_clock_pin()
|
||||
return self->targetClkPath()->pin(sta);
|
||||
}
|
||||
|
||||
PathRefSeq *
|
||||
points()
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
PathExpanded expanded(self->path(), sta);
|
||||
PathRefSeq *paths = new PathRefSeq;
|
||||
for (int i = expanded.startIndex(); i < expanded.size(); i++) {
|
||||
PathRef *path = expanded.path(i);
|
||||
PathRef *copy = new PathRef(path);
|
||||
paths->push_back(copy);
|
||||
}
|
||||
return paths;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
%extend MinPulseWidthCheckSeqIterator {
|
||||
@@ -6312,6 +6342,20 @@ required()
|
||||
return delayAsFloat(self->required(sta));
|
||||
}
|
||||
|
||||
float
|
||||
slack()
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
return delayAsFloat(self->slack(sta));
|
||||
}
|
||||
|
||||
Pin *
|
||||
pin()
|
||||
{
|
||||
Sta *sta = Sta::sta();
|
||||
return self->pin(sta);
|
||||
}
|
||||
|
||||
TmpPinSeq *
|
||||
pins()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user