Avoid throwing out_of_range in log_fmax when related clocks lack Fmax entries

This commit is contained in:
Bengt Sjölén 2025-11-18 20:28:26 +01:00
parent 900573c778
commit d64a92f4f5
1 changed files with 7 additions and 1 deletions

View File

@ -300,8 +300,14 @@ static void log_fmax(Context *ctx, TimingResult &result, bool warn_on_failure)
target = clock_fmax.at(clock_a).constraint;
} else if (!clock_fmax.count(clock_a) && clock_fmax.count(clock_b)) {
target = clock_fmax.at(clock_b).constraint;
} else if (clock_fmax.count(clock_a) && clock_fmax.count(clock_b)) {
target = std::min(clock_fmax.at(clock_a).constraint, clock_fmax.at(clock_b).constraint);
} else {
target = std::min(clock_fmax.at(clock_a).constraint, clock_fmax.at(clock_b).constraint);
// Neither clock has an Fmax entry; just skip or fall back
log_warning("No Fmax for related clocks '%s' and '%s', skipping.\n",
ctx->nameOf(clock_a),
ctx->nameOf(clock_b));
continue;
}
bool passed = target < fmax;