search/parasitics: AOCV depth-based derate hook + SI-window coupling-cap setter#383
search/parasitics: AOCV depth-based derate hook + SI-window coupling-cap setter#383saurav-fermions wants to merge 2 commits into
Conversation
Add a flag-gated hook (AocvDepthDerate interface + Search::deratedDelayData) so the OCV derate applied to data-path combinational arcs during forward arrival propagation can be selected by the path's accumulated combinational depth instead of the flat SDC factor. When no hook is installed (the default) deratedDelayData forwards verbatim to deratedDelay, so timing is byte-identical to upstream. Only data-path combinational cell arcs are depth-derated; clock/reg/latch/check arcs keep the flat derate. Depth is the count of combinational arcs on the live from_path prev chain + 1. All edits marked // OpenROAD-fork: AOCV. clang-format not run on src/sta/*. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
Add Parasitics::setCapacitorValue (default no-op) and a ConcreteParasitics override / ConcreteParasiticDevice::setValue so the OpenROAD timing-window aware coupling derate can scale individual coupling caps. Only invoked from the OpenROAD window path; stock OpenSTA behavior is unchanged. Signed-off-by: Saurav Singh <saurav.singh@fermions.co>
|
|
There was a problem hiding this comment.
Code Review
This pull request introduces support for setting individual coupling capacitor values to enable timing-window aware coupling derating, and adds an abstract hook (AocvDepthDerate) to support AOCV-style depth-dependent OCV derating during forward arrival propagation. The review feedback suggests adding a defensive null check for the capacitor pointer in ConcreteParasitics::setCapacitorValue to prevent potential null pointer dereferences. Additionally, it points out that traversing the path prefix chain in Search::aocvDataDepth results in O(N^2) complexity, which could become a performance bottleneck for deep combinational paths, and suggests caching or documenting this behavior.
| void | ||
| ConcreteParasitics::setCapacitorValue(ParasiticCapacitor *capacitor, | ||
| float value) | ||
| { | ||
| ConcreteParasiticCapacitor *ccapacitor = | ||
| static_cast<ConcreteParasiticCapacitor*>(capacitor); | ||
| ccapacitor->setValue(value); | ||
| } |
There was a problem hiding this comment.
To prevent potential null pointer dereferences and crashes, it is highly recommended to add a defensive null check for the capacitor pointer before casting and dereferencing it.
void
ConcreteParasitics::setCapacitorValue(ParasiticCapacitor *capacitor,
float value)
{
if (capacitor == nullptr)
return;
ConcreteParasiticCapacitor *ccapacitor =
static_cast<ConcreteParasiticCapacitor*>(capacitor);
ccapacitor->setValue(value);
}| int | ||
| Search::aocvDataDepth(const Path *from_path) const | ||
| { | ||
| int depth = 1; // the arc about to be derated is the next stage | ||
| const Path *p = from_path; | ||
| while (p) { | ||
| const TimingArc *arc = p->prevArc(this); | ||
| if (arc && arc->role() == TimingRole::combinational()) | ||
| depth++; | ||
| p = p->prevPath(); | ||
| } | ||
| return depth; | ||
| } |
There was a problem hiding this comment.
Traversing the path prefix chain backwards at every combinational arc propagation step results in
Summary
Two flag-gated, default-no-op OpenSTA hooks that let an external driver (OpenROAD dbSta/rcx) refine timing without changing stock OpenSTA behavior. With no hook installed, timing is byte-identical to upstream.
1. AOCV depth-based derate (
search/Search.{hh,cc})Adds an abstract
AocvDepthDeratehook andSearch::deratedDelayDataso the OCV derate applied to data-path combinational arcs during forward arrival propagation can be selected by the path's accumulated combinational depth instead of the flat SDC factor.deratedDelayDataforwards verbatim toderatedDelay→ byte-identical to upstream.from_pathprev chain + 1.lateActive()/earlyActive()per-side gate prevents a late-only table from silently zeroing a user'sset_timing_derate -earlyon the min path.2. SI-window per-coupling-capacitor value setter (
parasitics/*)Adds
Parasitics::setCapacitorValue(default no-op) plus aConcreteParasiticsoverride /ConcreteParasiticDevice::setValue, so a timing-window-aware coupling derate can scale individual coupling caps. Only invoked from the external window path; stock OpenSTA behavior is unchanged.Testing
tcl.power.vcd_detailed) is a pre-existing last-digit floating-point rounding diff in the power module that fails identically on unmodifiedmaster(unrelated to this change).Notes
clang-formatintentionally not run onsrc/sta/*per project convention.