From 56ed679f831f703ad2f170713e0b127a97da40b3 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 21 Jun 2018 11:59:20 +0200 Subject: Add frequency setting and fix slack calculation Signed-off-by: David Shah --- common/place_sa.cc | 2 +- common/timing.cc | 11 +++++------ 2 files changed, 6 insertions(+), 7 deletions(-) (limited to 'common') diff --git a/common/place_sa.cc b/common/place_sa.cc index e792474d..2f8fb122 100644 --- a/common/place_sa.cc +++ b/common/place_sa.cc @@ -334,7 +334,7 @@ class SAPlacer load_cell->bel, ctx->portPinFromId(load.port)); delay_t raw_wl = ctx->estimateDelay(drv_wire, user_wire); float slack = - ctx->getDelayNS(raw_wl) - ctx->getDelayNS(load.budget); + ctx->getDelayNS(load.budget) - ctx->getDelayNS(raw_wl); worst_slack = std::min(slack, worst_slack); int load_x, load_y; bool load_gb; diff --git a/common/timing.cc b/common/timing.cc index 8da26077..a7b37f9d 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -101,7 +101,6 @@ void assign_budget(Context *ctx, float default_clock) } } } - const bool debug = true; // Post-allocation check for (auto net : ctx->nets) { @@ -111,11 +110,11 @@ void assign_budget(Context *ctx, float default_clock) "timing budget of %fns\n", user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx), ctx->getDelayNS(user.budget)); - if (debug) - log_warning("port %s.%s, connected to net '%s', has " - "timing budget of %fns\n", - user.cell->name.c_str(ctx), user.port.c_str(ctx), - net.first.c_str(ctx), ctx->getDelayNS(user.budget)); + if (ctx->verbose) + log_info("port %s.%s, connected to net '%s', has " + "timing budget of %fns\n", + user.cell->name.c_str(ctx), user.port.c_str(ctx), + net.first.c_str(ctx), ctx->getDelayNS(user.budget)); } } } -- cgit v1.2.3