mirror of
https://github.com/The-OpenROAD-Project/OpenSTA.git
synced 2026-09-03 02:44:03 +02:00
ExpandedExceptionVisitor
Signed-off-by: James Cherry <[email protected]>
This commit is contained in:
+32
-34
@@ -2146,9 +2146,8 @@ ExpandedExceptionVisitor::expandThrus(ExceptionFrom *expanded_from)
|
||||
ExceptionThruSeq *thrus = exception_->thrus();
|
||||
if (thrus) {
|
||||
// Use tail recursion to expand the exception points in the thrus.
|
||||
ExceptionThruSeq::Iterator thru_iter(thrus);
|
||||
ExceptionThruSeq expanded_thrus;
|
||||
expandThru(expanded_from, thru_iter, &expanded_thrus);
|
||||
expandThru(expanded_from, 0, &expanded_thrus);
|
||||
}
|
||||
else
|
||||
expandTo(expanded_from, nullptr);
|
||||
@@ -2156,42 +2155,41 @@ ExpandedExceptionVisitor::expandThrus(ExceptionFrom *expanded_from)
|
||||
|
||||
void
|
||||
ExpandedExceptionVisitor::expandThru(ExceptionFrom *expanded_from,
|
||||
ExceptionThruSeq::Iterator &thru_iter,
|
||||
size_t next_thru_idx,
|
||||
ExceptionThruSeq *expanded_thrus)
|
||||
{
|
||||
if (exception_->thrus()) {
|
||||
if (thru_iter.hasNext()) {
|
||||
ExceptionThru *thru = thru_iter.next();
|
||||
const RiseFallBoth *rf = thru->transition();
|
||||
if (thru->pins()) {
|
||||
for (const Pin *pin : *thru->pins()) {
|
||||
PinSet pins(network_);
|
||||
pins.insert(pin);
|
||||
ExceptionThru expanded_thru(&pins, nullptr, nullptr, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, thru_iter, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
ExceptionThruSeq *thrus = exception_->thrus();
|
||||
if (next_thru_idx < thrus->size()) {
|
||||
ExceptionThru *thru = (*thrus)[next_thru_idx];
|
||||
const RiseFallBoth *rf = thru->transition();
|
||||
if (thru->pins()) {
|
||||
for (const Pin *pin : *thru->pins()) {
|
||||
PinSet pins(network_);
|
||||
pins.insert(pin);
|
||||
ExceptionThru expanded_thru(&pins, nullptr, nullptr, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, next_thru_idx + 1, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
if (thru->nets()) {
|
||||
for (const Net *net : *thru->nets()) {
|
||||
NetSet nets(network_);
|
||||
nets.insert(net);
|
||||
ExceptionThru expanded_thru(nullptr, &nets, nullptr, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, thru_iter, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
}
|
||||
if (thru->nets()) {
|
||||
for (const Net *net : *thru->nets()) {
|
||||
NetSet nets(network_);
|
||||
nets.insert(net);
|
||||
ExceptionThru expanded_thru(nullptr, &nets, nullptr, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, next_thru_idx + 1, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
if (thru->instances()) {
|
||||
for (const Instance *inst : *thru->instances()) {
|
||||
InstanceSet insts(network_);
|
||||
insts.insert(inst);
|
||||
ExceptionThru expanded_thru(nullptr, nullptr, &insts, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, thru_iter, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
}
|
||||
if (thru->instances()) {
|
||||
for (const Instance *inst : *thru->instances()) {
|
||||
InstanceSet insts(network_);
|
||||
insts.insert(inst);
|
||||
ExceptionThru expanded_thru(nullptr, nullptr, &insts, rf, false, network_);
|
||||
expanded_thrus->push_back(&expanded_thru);
|
||||
expandThru(expanded_from, next_thru_idx + 1, expanded_thrus);
|
||||
expanded_thrus->pop_back();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user