Merge pull request #313 from The-OpenROAD-Project-staging/sta_fix_clktreedelay_crash
Some checks failed
Automatically sync branch from upstream. / Automatic sync 'master' from The-OpenROAD-Project/OpenSTA (push) Has been cancelled
Lint Bazel / Run buildifier format (push) Has been cancelled
Lint Bazel / Run buildifier lint (push) Has been cancelled
CI / build (push) Has been cancelled
Scan Code with pre commit trigger / Security-Scan (push) Has been cancelled

clkTreeDelay to check arc without assuming it exists
This commit is contained in:
Matt Liberty
2026-03-20 06:16:46 +00:00
committed by GitHub
3 changed files with 3 additions and 5 deletions

View File

@@ -2761,7 +2761,7 @@ LibertyPort::clkTreeDelay(float in_slew,
|| (arc_set->role() == TimingRole::clockTreePathMax()
&& min_max == MinMax::max())) {
const TimingArc *arc = arc_set->arcTo(to_rf);
if (arc->fromEdge()->asRiseFall() == from_rf) {
if (arc && arc->fromEdge()->asRiseFall() == from_rf) {
const GateTableModel *gate_model = dynamic_cast<GateTableModel*>(arc->model());
if (gate_model)
return gate_model->delayModel()->findValue(in_slew, 0.0, 0.0);

View File

@@ -24,6 +24,4 @@ Path Type: max
9.92 slack (MET)
Differences found at line 2.
.include "/workspace/sta/OpenSTA/spice/test/results/spice_out/mock_model.sp"
.include "/workspace/sta2/OpenSTA/spice/test/results/spice_out/mock_model.sp"
No differences found.

View File

@@ -47,4 +47,4 @@ write_path_spice \
-model_file $model_file \
-power VDD \
-ground VSS
diff_files $test_name.spok [file join $spice_dir path_1.sp]
diff_files $test_name.spok [file join $spice_dir path_1.sp] "mock_model.sp"