Skip to content

Commit d66535c

Browse files
authored
Merge pull request #10656 from oharboe/cts-deterministic-dummy-cell
cts: tie-break dummy-cell sort for deterministic output
2 parents e01bdad + 2ce6561 commit d66535c

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/cts/src/TritonCTS.cpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2473,7 +2473,12 @@ void TritonCTS::findCandidateDummyCells(
24732473
std::ranges::sort(
24742474
dummyCandidates,
24752475
[](const sta::LibertyCell* cell1, const sta::LibertyCell* cell2) {
2476-
return (getInputCap(cell1) < getInputCap(cell2));
2476+
const float cap1 = getInputCap(cell1);
2477+
const float cap2 = getInputCap(cell2);
2478+
if (cap1 != cap2) {
2479+
return cap1 < cap2;
2480+
}
2481+
return cell1->id() < cell2->id();
24772482
});
24782483

24792484
if (logger_->debugCheck(utl::CTS, "dummy load", 1)) {

0 commit comments

Comments
 (0)