Skip to content

Commit efe551e

Browse files
suhr25suhr25
authored andcommitted
rsz: fix load cap computation in hold buffer insertion guard
In repairEndHold(), the buffer delay guard used loadCap() on the wrong pin (end_vertex, a sink) to estimate the inserted buffer's load capacitance. This returned near-zero cap, making the guard trivially permissive and relying entirely on the post-insertion journal rollback. Replacing it with loadCap() on the driver pin (path_vertex) is semantically more correct but overestimates the buffer load: it includes the full pre-split net parasitics, which are absent on the shorter post-split net. This causes buffer_delays to be overestimated, valid hold buffer insertions to be rejected by the guard, and consequently worse slew and capacitance slack. Fix: compute load_cap directly as the sum of pin capacitances of load_pins — the exact set of pins the inserted buffer will drive. This avoids counting parasitics from net segments that will not exist after splitting, giving an accurate and non-pessimistic guard estimate. Signed-off-by: Suhrid Marwah <suhridmarwah07@gmail.com>
1 parent 33c72bf commit efe551e

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

src/rsz/src/RepairHold.cc

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,6 @@ void RepairHold::repairEndHold(sta::Vertex* end_vertex,
572572
sta::PinSeq load_pins;
573573
Slacks slacks;
574574
mergeInit(slacks);
575-
float excluded_cap = 0.0;
576575
bool loads_have_out_port = false;
577576
sta::VertexOutEdgeIterator edge_iter(path_vertex, graph_);
578577
while (edge_iter.hasNext()) {
@@ -590,11 +589,6 @@ void RepairHold::repairEndHold(sta::Vertex* end_vertex,
590589
&& network_->isTopLevelPort(load_pin)) {
591590
loads_have_out_port = true;
592591
}
593-
} else {
594-
sta::LibertyPort* load_port = network_->libertyPort(load_pin);
595-
if (load_port) {
596-
excluded_cap += load_port->capacitance();
597-
}
598592
}
599593
}
600594
}
@@ -611,9 +605,18 @@ void RepairHold::repairEndHold(sta::Vertex* end_vertex,
611605
delayAsString(slacks[fall_index_][max_index_], sta_),
612606
load_pins.size());
613607
sta::Scene* corner = sta_->cmdScene();
614-
float load_cap
615-
= graph_delay_calc_->loadCap(end_vertex->pin(), corner, max_)
616-
- excluded_cap;
608+
// Compute load cap as the sum of the pin capacitances that the
609+
// inserted hold buffer will drive. Using loadCap on the driver pin
610+
// would include the full original-net parasitics which are absent
611+
// on the post-split net, causing the guard below to over-reject
612+
// valid insertions.
613+
float load_cap = 0.0;
614+
for (const sta::Pin* load_pin : load_pins) {
615+
sta::LibertyPort* load_port = network_->libertyPort(load_pin);
616+
if (load_port) {
617+
load_cap += load_port->capacitance();
618+
}
619+
}
617620
sta::ArcDelay buffer_delays[sta::RiseFall::index_count];
618621
sta::Slew buffer_slews[sta::RiseFall::index_count];
619622
resizer_->bufferDelays(buffer_cell,

0 commit comments

Comments
 (0)