LibertyPortPair calls
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
274637ce46
commit
a419f0a721
|
|
@ -1367,17 +1367,14 @@ LibertyCell::makeTimingArcPortMaps()
|
|||
LibertyPort *from = arc_set->from();
|
||||
LibertyPort *to = arc_set->to();
|
||||
if (from && to) {
|
||||
LibertyPortPair from_to_pair(from, to);
|
||||
TimingArcSetSeq &sets = port_timing_arc_set_map_[from_to_pair];
|
||||
TimingArcSetSeq &sets = port_timing_arc_set_map_[{from, to}];
|
||||
sets.push_back(arc_set);
|
||||
}
|
||||
|
||||
LibertyPortPair from_pair(from, nullptr);
|
||||
TimingArcSetSeq &from_sets = port_timing_arc_set_map_[from_pair];
|
||||
TimingArcSetSeq &from_sets = port_timing_arc_set_map_[{from, nullptr}];
|
||||
from_sets.push_back(arc_set);
|
||||
|
||||
LibertyPortPair to_pair(nullptr, to);
|
||||
TimingArcSetSeq &to_sets = port_timing_arc_set_map_[to_pair];
|
||||
TimingArcSetSeq &to_sets = port_timing_arc_set_map_[{nullptr, to}];
|
||||
to_sets.push_back(arc_set);
|
||||
|
||||
const TimingRole *role = arc_set->role();
|
||||
|
|
@ -1411,8 +1408,7 @@ LibertyCell::timingArcSets(const LibertyPort *from,
|
|||
const LibertyPort *to) const
|
||||
{
|
||||
static const TimingArcSetSeq null_set;
|
||||
const LibertyPortPair port_pair(from, to);
|
||||
auto itr = port_timing_arc_set_map_.find(port_pair);
|
||||
auto itr = port_timing_arc_set_map_.find({from, to});
|
||||
return (itr == port_timing_arc_set_map_.end()) ? null_set : itr->second;
|
||||
}
|
||||
|
||||
|
|
@ -1437,8 +1433,8 @@ LibertyCell::timingArcSetCount() const
|
|||
bool
|
||||
LibertyCell::hasTimingArcs(LibertyPort *port) const
|
||||
{
|
||||
return port_timing_arc_set_map_.contains(LibertyPortPair(port, nullptr))
|
||||
|| port_timing_arc_set_map_.contains(LibertyPortPair(nullptr, port));
|
||||
return port_timing_arc_set_map_.contains({port, nullptr})
|
||||
|| port_timing_arc_set_map_.contains({nullptr, port});
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -96,18 +96,15 @@ DisabledPorts::setDisabledFromTo(LibertyPort *from,
|
|||
{
|
||||
if (from_to_ == nullptr)
|
||||
from_to_ = new LibertyPortPairSet;
|
||||
LibertyPortPair pair(from, to);
|
||||
from_to_->insert(pair);
|
||||
from_to_->insert({from, to});
|
||||
}
|
||||
|
||||
void
|
||||
DisabledPorts::removeDisabledFromTo(LibertyPort *from,
|
||||
LibertyPort *to)
|
||||
{
|
||||
if (from_to_) {
|
||||
LibertyPortPair from_to(from, to);
|
||||
from_to_->erase(from_to);
|
||||
}
|
||||
if (from_to_)
|
||||
from_to_->erase({from, to});
|
||||
}
|
||||
|
||||
bool
|
||||
|
|
@ -115,12 +112,11 @@ DisabledPorts::isDisabled(LibertyPort *from,
|
|||
LibertyPort *to,
|
||||
const TimingRole *role)
|
||||
{
|
||||
LibertyPortPair from_to(from, to);
|
||||
// set_disable_timing instance does not disable timing checks.
|
||||
return (all_ && !role->isTimingCheck())
|
||||
|| (from_ && from_->contains(from))
|
||||
|| (to_ && to_->contains(to))
|
||||
|| (from_to_ && from_to_->contains(from_to));
|
||||
|| (from_to_ && from_to_->contains({from, to}));
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////
|
||||
|
|
|
|||
Loading…
Reference in New Issue