mutateTag cleanup
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
254115c06b
commit
c7debe5463
|
|
@ -946,11 +946,10 @@ public:
|
||||||
ExceptionStateSet *&states) const;
|
ExceptionStateSet *&states) const;
|
||||||
// Return hierarchical -thru exceptions that start between
|
// Return hierarchical -thru exceptions that start between
|
||||||
// from_pin and to_pin.
|
// from_pin and to_pin.
|
||||||
void exceptionThruStates(const Pin *from_pin,
|
ExceptionStateSet *exceptionThruStates(const Pin *from_pin,
|
||||||
const Pin *to_pin,
|
const Pin *to_pin,
|
||||||
const RiseFall *to_rf,
|
const RiseFall *to_rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max) const;
|
||||||
ExceptionStateSet *&states) const;
|
|
||||||
// Find the highest priority exception with first exception pt at
|
// Find the highest priority exception with first exception pt at
|
||||||
// pin/clk end.
|
// pin/clk end.
|
||||||
void exceptionTo(ExceptionPathType type,
|
void exceptionTo(ExceptionPathType type,
|
||||||
|
|
|
||||||
|
|
@ -5467,13 +5467,13 @@ Sdc::filterRegQStates(const Pin *to_pin,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
ExceptionStateSet *
|
||||||
Sdc::exceptionThruStates(const Pin *from_pin,
|
Sdc::exceptionThruStates(const Pin *from_pin,
|
||||||
const Pin *to_pin,
|
const Pin *to_pin,
|
||||||
const RiseFall *to_rf,
|
const RiseFall *to_rf,
|
||||||
const MinMax *min_max,
|
const MinMax *min_max) const
|
||||||
ExceptionStateSet *&states) const
|
|
||||||
{
|
{
|
||||||
|
ExceptionStateSet *states = nullptr;
|
||||||
if (first_thru_pin_exceptions_)
|
if (first_thru_pin_exceptions_)
|
||||||
exceptionThruStates(first_thru_pin_exceptions_->findKey(to_pin),
|
exceptionThruStates(first_thru_pin_exceptions_->findKey(to_pin),
|
||||||
to_rf, min_max, states);
|
to_rf, min_max, states);
|
||||||
|
|
@ -5489,6 +5489,7 @@ Sdc::exceptionThruStates(const Pin *from_pin,
|
||||||
exceptionThruStates(first_thru_inst_exceptions_->findKey(to_inst),
|
exceptionThruStates(first_thru_inst_exceptions_->findKey(to_inst),
|
||||||
to_rf, min_max, states);
|
to_rf, min_max, states);
|
||||||
}
|
}
|
||||||
|
return states;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
||||||
|
|
@ -2552,35 +2552,40 @@ Search::mutateTag(Tag *from_tag,
|
||||||
bool state_change = false;
|
bool state_change = false;
|
||||||
for (auto state : *from_states) {
|
for (auto state : *from_states) {
|
||||||
ExceptionPath *exception = state->exception();
|
ExceptionPath *exception = state->exception();
|
||||||
if (state->isComplete()
|
// One edge may traverse multiple hierarchical thru pins.
|
||||||
&& exception->isFalse()
|
while (state->matchesNextThru(from_pin,to_pin,to_rf,min_max,network_)) {
|
||||||
&& !from_is_clk)
|
// Found a -thru that we've been waiting for.
|
||||||
// Don't propagate a completed false path -thru unless it is a
|
state = state->nextState();
|
||||||
// clock (which ignores exceptions).
|
|
||||||
return nullptr;
|
|
||||||
|
|
||||||
if (state->matchesNextThru(from_pin,to_pin,to_rf,min_max,network_)) {
|
|
||||||
// Found a -thru that we've been waiting for.
|
|
||||||
if (state->nextState()->isComplete()
|
|
||||||
&& exception->isLoop())
|
|
||||||
// to_pin/edge completes a loop path.
|
|
||||||
return nullptr;
|
|
||||||
state_change = true;
|
state_change = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
if (state_change)
|
||||||
|
break;
|
||||||
|
|
||||||
|
// Don't propagate a completed false path -thru unless it is a
|
||||||
|
// clock. Clocks carry the completed false path to disable
|
||||||
|
// downstream paths that use the clock as data.
|
||||||
|
if ((state->isComplete()
|
||||||
|
&& exception->isFalse()
|
||||||
|
&& !from_is_clk)
|
||||||
|
// to_pin/edge completes a loop path.
|
||||||
|
|| (exception->isLoop()
|
||||||
|
&& state->isComplete()))
|
||||||
|
return nullptr;
|
||||||
|
|
||||||
// Kill path delay tags past the -to pin.
|
// Kill path delay tags past the -to pin.
|
||||||
if ((exception->isPathDelay()
|
if ((exception->isPathDelay()
|
||||||
&& sdc_->isCompleteTo(state, from_pin, from_rf, min_max))
|
&& sdc_->isCompleteTo(state, from_pin, from_rf, min_max))
|
||||||
// Kill loop tags at register clock pins.
|
// Kill loop tags at register clock pins.
|
||||||
|| (to_is_reg_clk
|
|| (exception->isLoop()
|
||||||
&& exception->isLoop())) {
|
&& to_is_reg_clk)) {
|
||||||
state_change = true;
|
state_change = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Get the set of -thru exceptions starting at to_pin/edge.
|
// Get the set of -thru exceptions starting at to_pin/edge.
|
||||||
sdc_->exceptionThruStates(from_pin, to_pin, to_rf, min_max, new_states);
|
new_states = sdc_->exceptionThruStates(from_pin, to_pin, to_rf, min_max);
|
||||||
if (new_states || state_change) {
|
if (new_states || state_change) {
|
||||||
// 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.
|
||||||
|
|
@ -2588,26 +2593,23 @@ Search::mutateTag(Tag *from_tag,
|
||||||
new_states = new ExceptionStateSet;
|
new_states = new ExceptionStateSet;
|
||||||
for (auto state : *from_states) {
|
for (auto state : *from_states) {
|
||||||
ExceptionPath *exception = state->exception();
|
ExceptionPath *exception = state->exception();
|
||||||
if (state->isComplete()
|
|
||||||
&& exception->isFalse()
|
|
||||||
&& !from_is_clk) {
|
|
||||||
// Don't propagate a completed false path -thru unless it is a
|
|
||||||
// clock. Clocks carry the completed false path to disable
|
|
||||||
// downstream paths that use the clock as data.
|
|
||||||
delete new_states;
|
|
||||||
return nullptr;
|
|
||||||
}
|
|
||||||
// One edge may traverse multiple hierarchical thru pins.
|
// One edge may traverse multiple hierarchical thru pins.
|
||||||
while (state->matchesNextThru(from_pin,to_pin,to_rf,min_max,network_))
|
while (state->matchesNextThru(from_pin,to_pin,to_rf,min_max,network_))
|
||||||
// Found a -thru that we've been waiting for.
|
// Found a -thru that we've been waiting for.
|
||||||
state = state->nextState();
|
state = state->nextState();
|
||||||
|
|
||||||
if (state->isComplete()
|
// Don't propagate a completed false path -thru unless it is a
|
||||||
&& exception->isLoop()) {
|
// clock. Clocks carry the completed false path to disable
|
||||||
// to_pin/edge completes a loop path.
|
// downstream paths that use the clock as data.
|
||||||
delete new_states;
|
if ((state->isComplete()
|
||||||
return nullptr;
|
&& exception->isFalse()
|
||||||
}
|
&& !from_is_clk)
|
||||||
|
// to_pin/edge completes a loop path.
|
||||||
|
|| (exception->isLoop()
|
||||||
|
&& state->isComplete())) {
|
||||||
|
delete new_states;
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
// Kill path delay tags past the -to pin.
|
// Kill path delay tags past the -to pin.
|
||||||
if (!((exception->isPathDelay()
|
if (!((exception->isPathDelay()
|
||||||
|
|
@ -2621,7 +2623,7 @@ Search::mutateTag(Tag *from_tag,
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
// Get the set of -thru exceptions starting at to_pin/edge.
|
// Get the set of -thru exceptions starting at to_pin/edge.
|
||||||
sdc_->exceptionThruStates(from_pin, to_pin, to_rf, min_max, new_states);
|
new_states = sdc_->exceptionThruStates(from_pin, to_pin, to_rf, min_max);
|
||||||
|
|
||||||
if (new_states)
|
if (new_states)
|
||||||
return findTag(to_rf, path_ap, to_clk_info, to_is_clk,
|
return findTag(to_rf, path_ap, to_clk_info, to_is_clk,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue