Search::pathClkPathArrival use ClkInfo:::crprClkPath

This commit is contained in:
James Cherry 2020-09-16 12:41:14 -07:00
parent 0eea513a90
commit 285dc50ce0
1 changed files with 12 additions and 12 deletions

View File

@ -2258,16 +2258,18 @@ Search::clkPathArrival(const Path *clk_path,
Arrival Arrival
Search::pathClkPathArrival(const Path *path) const Search::pathClkPathArrival(const Path *path) const
{ {
PathRef src_clk_path; // Use crpr clk path to find the clock arrival at the source register.
pathClkPathArrival1(path, src_clk_path); ClkInfo *clk_info = path->clkInfo(this);
if (!src_clk_path.isNull()) if (clk_info->isPropagated()) {
return clkPathArrival(&src_clk_path); PathVertexRep &crpr_clk_path = clk_info->crprClkPath();
else { if (!crpr_clk_path.isNull()) {
// Check for input arrival clock. return crpr_clk_path.arrival(this);
ClockEdge *clk_edge = path->clkEdge(this); }
if (clk_edge)
return clk_edge->time();
} }
// Check for input arrival clock.
ClockEdge *clk_edge = path->clkEdge(this);
if (clk_edge)
return clk_edge->time();
return 0.0; return 0.0;
} }
@ -2450,7 +2452,6 @@ Search::thruClkInfo(PathVertex *from_path,
// the clkinfo. // the clkinfo.
const Pin *gen_clk_src = nullptr; const Pin *gen_clk_src = nullptr;
if (from_clk_info->isGenClkSrcPath() if (from_clk_info->isGenClkSrcPath()
&& sdc_->crprActive()
&& sdc_->isClock(to_pin)) { && sdc_->isClock(to_pin)) {
// Don't care that it could be a regular clock root. // Don't care that it could be a regular clock root.
gen_clk_src = to_pin; gen_clk_src = to_pin;
@ -2458,8 +2459,7 @@ Search::thruClkInfo(PathVertex *from_path,
} }
PathVertex *to_crpr_clk_path = nullptr; PathVertex *to_crpr_clk_path = nullptr;
if (sdc_->crprActive() if (to_vertex->isRegClk()) {
&& to_vertex->isRegClk()) {
to_crpr_clk_path = from_path; to_crpr_clk_path = from_path;
changed = true; changed = true;
} }