flatten Clock::uncertainties
Signed-off-by: James Cherry <cherry@parallaxsw.com>
This commit is contained in:
parent
d4c13bb7cd
commit
7a236c38b7
|
|
@ -90,7 +90,7 @@ public:
|
|||
// Return values.
|
||||
float &slew,
|
||||
bool &exists) const;
|
||||
ClockUncertainties *uncertainties() const { return uncertainties_; }
|
||||
const ClockUncertainties &uncertainties() const { return uncertainties_; }
|
||||
void uncertainty(const SetupHold *setup_hold,
|
||||
// Return values.
|
||||
float &uncertainty,
|
||||
|
|
@ -180,7 +180,7 @@ protected:
|
|||
bool is_propagated_{false};
|
||||
RiseFallMinMax slews_;
|
||||
RiseFallMinMax slew_limits_[path_clk_or_data_count];
|
||||
ClockUncertainties *uncertainties_{nullptr};
|
||||
ClockUncertainties uncertainties_;
|
||||
bool is_generated_{false};
|
||||
// Generated clock variables.
|
||||
Pin *src_pin_{nullptr};
|
||||
|
|
|
|||
|
|
@ -169,6 +169,11 @@ public:
|
|||
static int cmp(const MinMaxValues *values1,
|
||||
const MinMaxValues *values2)
|
||||
{
|
||||
if (!values1->exists_[MinMax::minIndex()]
|
||||
&& !values2->exists_[MinMax::minIndex()]
|
||||
&& !values1->exists_[MinMax::maxIndex()]
|
||||
&& !values2->exists_[MinMax::maxIndex()])
|
||||
return 0;
|
||||
if (!values1->exists_[MinMax::minIndex()]
|
||||
&& values2->exists_[MinMax::minIndex()])
|
||||
return -1;
|
||||
|
|
|
|||
23
sdc/Clock.cc
23
sdc/Clock.cc
|
|
@ -240,42 +240,27 @@ Clock::uncertainty(const SetupHold *setup_hold,
|
|||
float &uncertainty,
|
||||
bool &exists) const
|
||||
{
|
||||
if (uncertainties_)
|
||||
uncertainties_->value(setup_hold, uncertainty, exists);
|
||||
else {
|
||||
uncertainty = 0.0F;
|
||||
exists = false;
|
||||
}
|
||||
uncertainties_.value(setup_hold, uncertainty, exists);
|
||||
}
|
||||
|
||||
void
|
||||
Clock::setUncertainty(const SetupHoldAll *setup_hold,
|
||||
float uncertainty)
|
||||
{
|
||||
if (uncertainties_ == nullptr)
|
||||
uncertainties_ = new ClockUncertainties;
|
||||
uncertainties_->setValue(setup_hold, uncertainty);
|
||||
uncertainties_.setValue(setup_hold, uncertainty);
|
||||
}
|
||||
|
||||
void
|
||||
Clock::setUncertainty(const SetupHold *setup_hold,
|
||||
float uncertainty)
|
||||
{
|
||||
if (uncertainties_ == nullptr)
|
||||
uncertainties_ = new ClockUncertainties;
|
||||
uncertainties_->setValue(setup_hold, uncertainty);
|
||||
uncertainties_.setValue(setup_hold, uncertainty);
|
||||
}
|
||||
|
||||
void
|
||||
Clock::removeUncertainty(const SetupHoldAll *setup_hold)
|
||||
{
|
||||
if (uncertainties_) {
|
||||
uncertainties_->removeValue(setup_hold);
|
||||
if (uncertainties_->empty()) {
|
||||
delete uncertainties_;
|
||||
uncertainties_ = nullptr;
|
||||
}
|
||||
}
|
||||
uncertainties_.removeValue(setup_hold);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
|
|
@ -379,7 +379,7 @@ PathEnd::checkTgtClkUncertainty(const Path *tgt_clk_path,
|
|||
if (tgt_clk_path && tgt_clk_path->isClock(sta))
|
||||
uncertainties = tgt_clk_path->clkInfo(sta)->uncertainties();
|
||||
else if (tgt_clk_edge)
|
||||
uncertainties = tgt_clk_edge->clock()->uncertainties();
|
||||
uncertainties = &tgt_clk_edge->clock()->uncertainties();
|
||||
float uncertainty = 0.0;
|
||||
if (uncertainties) {
|
||||
bool exists;
|
||||
|
|
|
|||
|
|
@ -1547,7 +1547,7 @@ Search::seedClkArrival(const Pin *pin,
|
|||
|
||||
const ClockUncertainties *uncertainties = sdc->clockUncertainties(pin);
|
||||
if (uncertainties == nullptr)
|
||||
uncertainties = clk->uncertainties();
|
||||
uncertainties = &clk->uncertainties();
|
||||
// Propagate liberty "pulse_clock" transition to transitive fanout.
|
||||
LibertyPort *port = network_->libertyPort(pin);
|
||||
const RiseFall *pulse_clk_sense = (port ? port->pulseClkSense() : nullptr);
|
||||
|
|
@ -1914,13 +1914,13 @@ Search::inputDelayTag(const Pin *pin,
|
|||
const Pin *clk_pin = nullptr;
|
||||
const RiseFall *clk_rf = nullptr;
|
||||
bool is_propagated = false;
|
||||
ClockUncertainties *clk_uncertainties = nullptr;
|
||||
const ClockUncertainties *clk_uncertainties = nullptr;
|
||||
if (clk_edge) {
|
||||
clk = clk_edge->clock();
|
||||
clk_rf = clk_edge->transition();
|
||||
clk_pin = clk->defaultPin();
|
||||
is_propagated = clk->isPropagated();
|
||||
clk_uncertainties = clk->uncertainties();
|
||||
clk_uncertainties = &clk->uncertainties();
|
||||
}
|
||||
|
||||
Sdc *sdc = scene->sdc();
|
||||
|
|
|
|||
Loading…
Reference in New Issue