[ENG-2040] set_path_margin implementation in OpenSTA#57
Conversation
Greptile SummaryThis PR implements
Confidence Score: 4/5Safe to merge with awareness that set_path_delay + set_path_margin interactions are untested and the extra-args warning text is misleading. The core path-margin lookup correctly uses the path-aware exceptionTo overload (propagating -from/-through tag states), sign conventions are validated by the test, and the exception priority/override structure mirrors existing PathDelay patterns. The two open points — the PathEndPathDelay + PathMargin simultaneous application and the confusing warning message — are minor and don't affect the primary use case covered by the test. search/PathEnd.cc: the PathEndPathDelay path, which now also applies targetClkPathMargin on top of path_delay adjustments, deserves a test or a comment clarifying the intended interaction. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
TCL["set_path_margin Tcl proc\n(Sdc.tcl)"] --> SWIG["make_path_margin SWIG wrapper\n(Sdc.i)"]
SWIG --> STA["Sta::makePathMargin\n(Sta.cc)\narrivalsInvalid()"]
STA --> SDC["Sdc::makePathMargin\n(Sdc.cc)\naddException(PathMargin)"]
SDC --> EX["PathMargin exception\n(ExceptionPath.cc)\npriority = 500 + fromThruToPriority"]
VPE["VisitPathEnds\n(VisitPathEnds.cc)"] -->|"isPathMargin() → allow endpoint"| PE["PathEndClkConstrained\nPathEndOutputDelay\nPathEndPathDelay"]
PE --> TCA["targetClkArrivalNoCrpr()\n+ targetClkPathMargin()"]
TCA --> LOOKUP["Search::exceptionTo\n(path_margin type)\npath-aware lookup"]
LOOKUP --> EX
LOOKUP -->|"found"| SIGN{"checkRole == setup?"}
SIGN -->|"yes"| NEG["return -margin\n(tightens required time)"]
SIGN -->|"no"| POS["return +margin\n(tightens required time)"]
NEG --> RPT["reportClkUncertainty\n(ReportPath.cc)\nshows 'path margin' line"]
POS --> RPT
Reviews (3): Last reviewed commit: "better testing" | Re-trigger Greptile |
|
@greptile please review again |
Support for set_path_margin in OpenSTA
Overview of command
Main implementation details - full workflow
Various updates were made in some header files for class and function definitions.
Test case