diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-14 17:59:21 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-14 17:59:21 -0800 |
commit | 06ddb632d1711741d96b2303fadae980150a77ed (patch) | |
tree | 728220cc2ed0da1888ad9b718f4ca1139e209016 /common/timing.cc | |
parent | adc50a207fb442a7b44ac76b8d04dc5477c23c8f (diff) | |
parent | d3b2065cd7d2470a132c055f4bd88d270e1e8fe1 (diff) | |
download | nextpnr-06ddb632d1711741d96b2303fadae980150a77ed.tar.gz nextpnr-06ddb632d1711741d96b2303fadae980150a77ed.tar.bz2 nextpnr-06ddb632d1711741d96b2303fadae980150a77ed.zip |
Merge remote-tracking branch 'origin/master' into timingapi
Diffstat (limited to 'common/timing.cc')
-rw-r--r-- | common/timing.cc | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/common/timing.cc b/common/timing.cc index 1d3fec56..b414c6f7 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -634,7 +634,24 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p log_info("%4.1f %4.1f Net %s budget %f ns (%d,%d) -> (%d,%d)\n", ctx->getDelayNS(net_delay), ctx->getDelayNS(total), net->name.c_str(ctx), ctx->getDelayNS(sink->budget), driver_loc.x, driver_loc.y, sink_loc.x, sink_loc.y); - log_info(" Sink %s.%s\n", sink_cell->name.c_str(ctx), sink->port.c_str(ctx)); + log_info(" Sink %s.%s\n", sink_cell->name.c_str(ctx), sink->port.c_str(ctx)); + if (ctx->verbose) { + auto driver_wire = ctx->getNetinfoSourceWire(net); + auto sink_wire = ctx->getNetinfoSinkWire(net, *sink); + log_info(" prediction: %f ns estimate: %f ns\n", + ctx->getDelayNS(ctx->predictDelay(net, *sink)), ctx->getDelayNS(ctx->estimateDelay(driver_wire, sink_wire))); + auto cursor = sink_wire; + delay_t delay; + while (driver_wire != cursor) { + auto it = net->wires.find(cursor); + assert(it != net->wires.end()); + auto pip = it->second.pip; + NPNR_ASSERT(pip != PipId()); + delay = ctx->getPipDelay(pip).maxDelay(); + log_info(" %1.3f %s\n", ctx->getDelayNS(delay), ctx->getPipName(pip).c_str(ctx)); + cursor = ctx->getPipSrcWire(pip); + } + } last_port = sink->port; } }; |