Skip to content

Commit 2862baa

Browse files
committed
rsz: Avoid filtered path search for latch output slack
Compute latch output slack directly from the output driver vertex instead of invoking findPathEnds with a temporary SDC exception per latch output pin. This avoids filtered-arrival state churn and heap allocation in the time-borrow effective slack path. Update the covered-borrow regression threshold so it remains covered under the direct vertex-slack calculation. Signed-off-by: Jaehyun Kim <jhkim@precisioninno.com>
1 parent 2557da2 commit 2862baa

4 files changed

Lines changed: 9 additions & 34 deletions

File tree

src/rsz/src/RepairTargetCollector.cc

Lines changed: 4 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -963,35 +963,10 @@ sta::Slack RepairTargetCollector::latchOutputWorstSlack(
963963
sta::Slack worst_slack = sta::INF;
964964

965965
for (const sta::Pin* output_pin : output_pins) {
966-
sta::PinSet* from_pins = new sta::PinSet(network_);
967-
from_pins->insert(output_pin);
968-
sta::ExceptionFrom* from = sdc_->makeExceptionFrom(
969-
from_pins, nullptr, nullptr, sta::RiseFallBoth::riseFall());
970-
971-
sta::StringSeq group_names;
972-
sta::PathEndSeq path_ends = search_->findPathEnds(from,
973-
nullptr,
974-
nullptr,
975-
false,
976-
sta_->scenes(),
977-
sta::MinMaxAll::max(),
978-
1,
979-
1,
980-
false,
981-
false,
982-
-sta::INF,
983-
sta::INF,
984-
true,
985-
group_names,
986-
true,
987-
false,
988-
true,
989-
true,
990-
true,
991-
true);
992-
993-
for (sta::PathEnd* path_end : path_ends) {
994-
worst_slack = std::min(worst_slack, path_end->slack(search_));
966+
sta::Vertex* output_vertex = graph_->pinDrvrVertex(output_pin);
967+
const sta::Slack output_slack = sta_->slack(output_vertex, max_);
968+
if (sta::delayLess(output_slack, worst_slack, sta_)) {
969+
worst_slack = output_slack;
995970
}
996971
}
997972

src/rsz/test/cpp/TestResizer.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,14 +272,14 @@ TEST_F(TestResizer, UncoveredBorrowReducesEffectiveSlack)
272272
EXPECT_LT(slack.effective_slack, slack.reported_slack - one_ps);
273273
}
274274

275-
// A smaller virtual-clock input delay (0.80) leaves enough downstream setup
275+
// A smaller virtual-clock input delay (0.65) leaves enough downstream setup
276276
// margin to fully cover the latch borrow (covered borrow).
277277
// getEndpointEffectiveSlack() must then leave the reported slack unchanged, so
278278
// that repair_timing does not spuriously optimize the already-covered latch D
279279
// endpoint.
280280
TEST_F(TestResizer, CoveredBorrowKeepsReportedSlack)
281281
{
282-
const SlackPair slack = latchDataSlack(0.80);
282+
const SlackPair slack = latchDataSlack(0.65);
283283
const float one_ps = staTime(0.001);
284284

285285
EXPECT_NEAR(slack.reported_slack, 0.0, one_ps);

src/rsz/test/inferred_clock_gator_time_borrow_covered.ok

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[INFO ODB-0131] Created 10 components and 52 component-terminals.
55
[INFO ODB-0133] Created 7 nets and 22 connections.
66
[WARNING STA-0450] virtual clock vclk can not be propagated.
7-
BEFORE_BORROW 0.3504
7+
BEFORE_BORROW 0.2004
88
[INFO RSZ-0100] Repair move sequence: UnbufferMove SizeUpMove BufferMove SplitLoadMove
99
[INFO RSZ-0098] No setup violations found
10-
AFTER_BORROW 0.3504
10+
AFTER_BORROW 0.2004

src/rsz/test/inferred_clock_gator_time_borrow_covered.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ read_def inferred_clock_gator_time_borrow.def
99

1010
create_clock -name clk -period 1.0 clk
1111
create_clock -name vclk -period 1.0
12-
set_input_delay -clock vclk 0.80 [get_ports en_in]
12+
set_input_delay -clock vclk 0.65 [get_ports en_in]
1313

1414
source Nangate45/Nangate45.rc
1515
source $layer_rc_file

0 commit comments

Comments
 (0)