exception -from/-to [all_regs] speedup
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
287623b23f
commit
710d5be4ed
|
|
@ -49,6 +49,8 @@ public:
|
||||||
int priority,
|
int priority,
|
||||||
const char *comment);
|
const char *comment);
|
||||||
virtual ~ExceptionPath();
|
virtual ~ExceptionPath();
|
||||||
|
size_t id() const { return id_; }
|
||||||
|
void setId(size_t id);
|
||||||
virtual bool isFalse() const { return false; }
|
virtual bool isFalse() const { return false; }
|
||||||
virtual bool isLoop() const { return false; }
|
virtual bool isLoop() const { return false; }
|
||||||
virtual bool isMultiCycle() const { return false; }
|
virtual bool isMultiCycle() const { return false; }
|
||||||
|
|
@ -128,6 +130,7 @@ protected:
|
||||||
const MinMaxAll *min_max_;
|
const MinMaxAll *min_max_;
|
||||||
bool own_pts_;
|
bool own_pts_;
|
||||||
int priority_;
|
int priority_;
|
||||||
|
size_t id_; // Unique ID assigned by Sdc.
|
||||||
ExceptionState *states_;
|
ExceptionState *states_;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1369,6 +1369,7 @@ protected:
|
||||||
InstanceSet disabled_clk_gating_checks_inst_;
|
InstanceSet disabled_clk_gating_checks_inst_;
|
||||||
PinSet disabled_clk_gating_checks_pin_;
|
PinSet disabled_clk_gating_checks_pin_;
|
||||||
ExceptionPathSet exceptions_;
|
ExceptionPathSet exceptions_;
|
||||||
|
size_t exception_id_; // Unique ID for exceptions.
|
||||||
|
|
||||||
bool have_thru_hpin_exceptions_;
|
bool have_thru_hpin_exceptions_;
|
||||||
// First pin/clock/instance/net/edge exception point to exception set map.
|
// First pin/clock/instance/net/edge exception point to exception set map.
|
||||||
|
|
|
||||||
|
|
@ -107,12 +107,8 @@ class ExceptionState;
|
||||||
class ExceptionStateLess
|
class ExceptionStateLess
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ExceptionStateLess(const Network *network);
|
|
||||||
bool operator()(const ExceptionState *state1,
|
bool operator()(const ExceptionState *state1,
|
||||||
const ExceptionState *state2) const;
|
const ExceptionState *state2) const;
|
||||||
|
|
||||||
private:
|
|
||||||
const Network *network_;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class ExceptionPath;
|
class ExceptionPath;
|
||||||
|
|
|
||||||
|
|
@ -90,7 +90,8 @@ ExceptionPath::ExceptionPath(ExceptionFrom *from,
|
||||||
to_(to),
|
to_(to),
|
||||||
min_max_(min_max),
|
min_max_(min_max),
|
||||||
own_pts_(own_pts),
|
own_pts_(own_pts),
|
||||||
priority_(priority)
|
priority_(priority),
|
||||||
|
id_(0)
|
||||||
{
|
{
|
||||||
makeStates();
|
makeStates();
|
||||||
}
|
}
|
||||||
|
|
@ -125,6 +126,12 @@ ExceptionPath::asString(const Network *network) const
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
ExceptionPath::setId(size_t id)
|
||||||
|
{
|
||||||
|
id_ = id;
|
||||||
|
}
|
||||||
|
|
||||||
ExceptionPt *
|
ExceptionPt *
|
||||||
ExceptionPath::firstPt()
|
ExceptionPath::firstPt()
|
||||||
{
|
{
|
||||||
|
|
@ -2247,19 +2254,14 @@ ExceptionState::hash() const
|
||||||
return hashSum(exception_->hash(), index_);
|
return hashSum(exception_->hash(), index_);
|
||||||
}
|
}
|
||||||
|
|
||||||
ExceptionStateLess::ExceptionStateLess(const Network *network) :
|
|
||||||
network_(network)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
ExceptionStateLess::operator()(const ExceptionState *state1,
|
ExceptionStateLess::operator()(const ExceptionState *state1,
|
||||||
const ExceptionState *state2) const
|
const ExceptionState *state2) const
|
||||||
{
|
{
|
||||||
const ExceptionPath *except1 = state1->exception();
|
const ExceptionPath *except1 = state1->exception();
|
||||||
const ExceptionPath *except2 = state2->exception();
|
const ExceptionPath *except2 = state2->exception();
|
||||||
ExceptionPathLess except_less(network_);
|
return except1->id() < except2->id()
|
||||||
return except_less(except1, except2)
|
//return except1 < except2
|
||||||
|| (except1 == except2
|
|| (except1 == except2
|
||||||
&& state1->index() < state2->index());
|
&& state1->index() < state2->index());
|
||||||
}
|
}
|
||||||
|
|
|
||||||
11
sdc/Sdc.cc
11
sdc/Sdc.cc
|
|
@ -110,6 +110,7 @@ Sdc::Sdc(StaState *sta) :
|
||||||
disabled_wire_edges_(network_),
|
disabled_wire_edges_(network_),
|
||||||
disabled_clk_gating_checks_inst_(network_),
|
disabled_clk_gating_checks_inst_(network_),
|
||||||
disabled_clk_gating_checks_pin_(network_),
|
disabled_clk_gating_checks_pin_(network_),
|
||||||
|
exception_id_(0),
|
||||||
have_thru_hpin_exceptions_(false),
|
have_thru_hpin_exceptions_(false),
|
||||||
first_thru_edge_exceptions_(0, PinPairHash(network_), PinPairEqual()),
|
first_thru_edge_exceptions_(0, PinPairHash(network_), PinPairEqual()),
|
||||||
path_delay_internal_startpoints_(network_),
|
path_delay_internal_startpoints_(network_),
|
||||||
|
|
@ -4552,6 +4553,7 @@ void
|
||||||
Sdc::recordException(ExceptionPath *exception)
|
Sdc::recordException(ExceptionPath *exception)
|
||||||
{
|
{
|
||||||
exceptions_.insert(exception);
|
exceptions_.insert(exception);
|
||||||
|
exception->setId(++exception_id_);
|
||||||
recordMergeHashes(exception);
|
recordMergeHashes(exception);
|
||||||
recordExceptionFirstPts(exception);
|
recordExceptionFirstPts(exception);
|
||||||
checkForThruHpins(exception);
|
checkForThruHpins(exception);
|
||||||
|
|
@ -4813,6 +4815,7 @@ void
|
||||||
Sdc::deleteExceptions()
|
Sdc::deleteExceptions()
|
||||||
{
|
{
|
||||||
exceptions_.deleteContentsClear();
|
exceptions_.deleteContentsClear();
|
||||||
|
exception_id_ = 0;
|
||||||
|
|
||||||
first_from_pin_exceptions_.deleteContentsClear();
|
first_from_pin_exceptions_.deleteContentsClear();
|
||||||
first_from_clk_exceptions_.deleteContentsClear();
|
first_from_clk_exceptions_.deleteContentsClear();
|
||||||
|
|
@ -5203,7 +5206,7 @@ Sdc::exceptionFromStates(const ExceptionPathSet *exceptions,
|
||||||
// but flush all other exception states because they are lower
|
// but flush all other exception states because they are lower
|
||||||
// priority.
|
// priority.
|
||||||
if (states == nullptr)
|
if (states == nullptr)
|
||||||
states = new ExceptionStateSet(network_);
|
states = new ExceptionStateSet();
|
||||||
states->clear();
|
states->clear();
|
||||||
states->insert(state);
|
states->insert(state);
|
||||||
// No need to examine other exceptions from this
|
// No need to examine other exceptions from this
|
||||||
|
|
@ -5211,7 +5214,7 @@ Sdc::exceptionFromStates(const ExceptionPathSet *exceptions,
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (states == nullptr)
|
if (states == nullptr)
|
||||||
states = new ExceptionStateSet(network_);
|
states = new ExceptionStateSet();
|
||||||
states->insert(state);
|
states->insert(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5258,7 +5261,7 @@ Sdc::filterRegQStates(const Pin *to_pin,
|
||||||
&& exception->matchesFirstPt(to_rf, min_max)) {
|
&& exception->matchesFirstPt(to_rf, min_max)) {
|
||||||
ExceptionState *state = exception->firstState();
|
ExceptionState *state = exception->firstState();
|
||||||
if (states == nullptr)
|
if (states == nullptr)
|
||||||
states = new ExceptionStateSet(network_);
|
states = new ExceptionStateSet();
|
||||||
states->insert(state);
|
states->insert(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -5302,7 +5305,7 @@ Sdc::exceptionThruStates(const ExceptionPathSet *exceptions,
|
||||||
if (exception->matchesFirstPt(to_rf, min_max)) {
|
if (exception->matchesFirstPt(to_rf, min_max)) {
|
||||||
ExceptionState *state = exception->firstState();
|
ExceptionState *state = exception->firstState();
|
||||||
if (states == nullptr)
|
if (states == nullptr)
|
||||||
states = new ExceptionStateSet(network_);
|
states = new ExceptionStateSet();
|
||||||
states->insert(state);
|
states->insert(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -703,7 +703,7 @@ Genclks::makeTag(const Clock *gclk,
|
||||||
// from the get go.
|
// from the get go.
|
||||||
if (master_pin == gclk->srcPin())
|
if (master_pin == gclk->srcPin())
|
||||||
state = state->nextState();
|
state = state->nextState();
|
||||||
ExceptionStateSet *states = new ExceptionStateSet(network_);
|
ExceptionStateSet *states = new ExceptionStateSet();
|
||||||
states->insert(state);
|
states->insert(state);
|
||||||
ClkInfo *clk_info = search_->findClkInfo(master_clk->edge(master_rf),
|
ClkInfo *clk_info = search_->findClkInfo(master_clk->edge(master_rf),
|
||||||
master_pin, true, nullptr, true,
|
master_pin, true, nullptr, true,
|
||||||
|
|
|
||||||
|
|
@ -428,7 +428,7 @@ PrevPathVisitor::unfilteredTag(const Tag *tag) const
|
||||||
ExceptionPath *except = state->exception();
|
ExceptionPath *except = state->exception();
|
||||||
if (!except->isFilter()) {
|
if (!except->isFilter()) {
|
||||||
if (unfiltered_states == nullptr)
|
if (unfiltered_states == nullptr)
|
||||||
unfiltered_states = new ExceptionStateSet(network_);
|
unfiltered_states = new ExceptionStateSet();
|
||||||
unfiltered_states->insert(state);
|
unfiltered_states->insert(state);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2563,7 +2563,7 @@ Search::mutateTag(Tag *from_tag,
|
||||||
// Second pass to apply state changes and add updated existing
|
// Second pass to apply state changes and add updated existing
|
||||||
// states to new states.
|
// states to new states.
|
||||||
if (new_states == nullptr)
|
if (new_states == nullptr)
|
||||||
new_states = new ExceptionStateSet(network_);
|
new_states = new ExceptionStateSet();
|
||||||
for (auto state : *from_states) {
|
for (auto state : *from_states) {
|
||||||
ExceptionPath *exception = state->exception();
|
ExceptionPath *exception = state->exception();
|
||||||
// One edge may traverse multiple hierarchical thru pins.
|
// One edge may traverse multiple hierarchical thru pins.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue