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