Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
James Cherry 2023-06-29 17:06:07 -07:00
parent 8ed0b258bc
commit 099936561d
4 changed files with 19 additions and 21 deletions

View File

@ -322,8 +322,7 @@ public:
virtual void mergeInto(ExceptionPt *pt,
const Network *network) = 0;
// All pins and instance/net pins.
virtual void allPins(const Network *network,
PinSet *pins) = 0;
virtual PinSet allPins(const Network *network) = 0;
virtual int typePriority() const = 0;
virtual const char *asString(const Network *network) const = 0;
virtual size_t objectCount() const = 0;
@ -378,8 +377,7 @@ public:
bool hasObjects() const;
void deleteObjects(ExceptionFromTo *pt,
const Network *network);
virtual void allPins(const Network *network,
PinSet *pins);
virtual PinSet allPins(const Network *network);
bool equal(ExceptionFromTo *from_to) const;
virtual int compare(ExceptionPt *pt,
const Network *network) const;
@ -505,8 +503,7 @@ public:
bool hasObjects() const;
void deleteObjects(ExceptionThru *pt,
const Network *network);
virtual void allPins(const Network *network,
PinSet *pins);
virtual PinSet allPins(const Network *network);
bool matches(const Pin *from_pin,
const Pin *to_pin,
const RiseFall *to_rf,

View File

@ -1,3 +1,4 @@
// OpenSTA, Static Timing Analyzer
// Copyright (c) 2023, Parallax Software, Inc.
//
@ -933,24 +934,25 @@ ExceptionFromTo::hasObjects() const
return hasPins() || hasClocks() || hasInstances();
}
void
ExceptionFromTo::allPins(const Network *network,
PinSet *pins)
PinSet
ExceptionFromTo::allPins(const Network *network)
{
PinSet pins(network);
if (pins_) {
for (const Pin *pin : *pins_)
pins->insert(pin);
pins.insert(pin);
}
if (insts_) {
for (const Instance *inst : *insts_) {
InstancePinIterator *pin_iter = network->pinIterator(inst);
while (pin_iter->hasNext()) {
const Pin *pin = pin_iter->next();
pins->insert(pin);
pins.insert(pin);
}
delete pin_iter;
}
}
return pins;
}
void
@ -1777,20 +1779,20 @@ ExceptionThru::deleteEdge(const EdgePins &edge)
edges_->erase(edge);
}
void
ExceptionThru::allPins(const Network *network,
PinSet *pins)
PinSet
ExceptionThru::allPins(const Network *network)
{
PinSet pins(network);
if (pins_) {
for (const Pin *pin : *pins_)
pins->insert(pin);
pins.insert(pin);
}
if (insts_) {
for (const Instance *inst : *insts_) {
InstancePinIterator *pin_iter = network->pinIterator(inst);
while (pin_iter->hasNext()) {
Pin *pin = pin_iter->next();
pins->insert(pin);
pins.insert(pin);
}
delete pin_iter;
}
@ -1800,11 +1802,12 @@ ExceptionThru::allPins(const Network *network,
NetConnectedPinIterator *pin_iter = network->connectedPinIterator(net);
while (pin_iter->hasNext()) {
const Pin *pin = pin_iter->next();
pins->insert(pin);
pins.insert(pin);
}
delete pin_iter;
}
}
return pins;
}
bool

View File

@ -800,8 +800,7 @@ PathGroups::makeGroupPathEnds(ExceptionTo *to,
else {
// Only visit -to filter pins.
VertexSet endpoints(graph_);
PinSet pins(network);
to->allPins(network, &pins);
PinSet pins = to->allPins(network);
PinSet::Iterator pin_iter(pins);
while (pin_iter.hasNext()) {
const Pin *pin = pin_iter.next();

View File

@ -651,8 +651,7 @@ Search::seedFilterStarts()
{
ExceptionPt *first_pt = filter_->firstPt();
if (first_pt) {
PinSet first_pins(network_);
first_pt->allPins(network_, &first_pins);
PinSet first_pins = first_pt->allPins(network_);
for (const Pin *pin : first_pins) {
if (network_->isHierarchical(pin)) {
SeedFaninsThruHierPin visitor(graph_, this);