From fa650706827c4d42bef19ac0becb7dbe92bd98d2 Mon Sep 17 00:00:00 2001 From: James Cherry Date: Tue, 17 Oct 2023 14:29:38 -0700 Subject: [PATCH] write_timing_model unclocked register seg fault Signed-off-by: James Cherry --- search/ClkSkew.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/search/ClkSkew.cc b/search/ClkSkew.cc index 03c1019f..217b536c 100644 --- a/search/ClkSkew.cc +++ b/search/ClkSkew.cc @@ -370,14 +370,16 @@ ClkSkews::findClkDelays(const Clock *clk, while (path_iter.hasNext()) { PathVertex *path = path_iter.next(); const ClockEdge *path_clk_edge = path->clkEdge(this); - const RiseFall *clk_rf = path_clk_edge->transition(); - const Clock *path_clk = path_clk_edge->clock(); - if (path_clk == clk) { - Arrival arrival = path->arrival(this); - Delay clk_delay = delayAsFloat(arrival) - path_clk_edge->time(); - const MinMax *min_max = path->minMax(this); - const RiseFall *rf = path->transition(this); - delays[clk_rf->index()][rf->index()].setValue(min_max, clk_delay); + if (path_clk_edge) { + const RiseFall *clk_rf = path_clk_edge->transition(); + const Clock *path_clk = path_clk_edge->clock(); + if (path_clk == clk) { + Arrival arrival = path->arrival(this); + Delay clk_delay = delayAsFloat(arrival) - path_clk_edge->time(); + const MinMax *min_max = path->minMax(this); + const RiseFall *rf = path->transition(this); + delays[clk_rf->index()][rf->index()].setValue(min_max, clk_delay); + } } } }