From 287a860283b8d8d6a5f0304d4561b422caa77b02 Mon Sep 17 00:00:00 2001 From: gatecat Date: Sat, 18 Sep 2021 10:42:52 +0100 Subject: timing: Fix slack for unconstrained clocks Signed-off-by: gatecat --- common/timing.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/common/timing.cc b/common/timing.cc index 161769dc..85896f54 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -275,12 +275,13 @@ void TimingAnalyser::setup_port_domains() if (launch_data.key.clock != capture_data.key.clock) continue; IdString clk = launch_data.key.clock; - if (!ctx->nets.count(clk)) - continue; - NetInfo *clk_net = ctx->nets.at(clk).get(); - if (!clk_net->clkconstr) - continue; - delay_t period = clk_net->clkconstr->period.minDelay(); + delay_t period = ctx->getDelayFromNS(1.0e9 / ctx->setting("target_freq")); + if (ctx->nets.count(clk)) { + NetInfo *clk_net = ctx->nets.at(clk).get(); + if (clk_net->clkconstr) { + period = clk_net->clkconstr->period.minDelay(); + } + } if (launch_data.key.edge != capture_data.key.edge) period /= 2; dp.period = DelayPair(period); -- cgit v1.2.3