From 582cd526ac9e1bcbd6afe2f1037b74a129b40429 Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Tue, 25 Apr 2023 13:43:58 +0200 Subject: [PATCH] display freq with two digits after decimal point --- machxo2/pack.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/machxo2/pack.cc b/machxo2/pack.cc index 4396b312..84b310c4 100644 --- a/machxo2/pack.cc +++ b/machxo2/pack.cc @@ -1308,13 +1308,13 @@ class MachXO2Packer if (to->clkconstr != nullptr) { if (!equals_epsilon_constr(*to->clkconstr, *constr) && user_constrained.count(to->name)) log_warning( - " Overriding derived constraint of %.1f MHz on net %s with user-specified constraint of " - "%.1f MHz.\n", + " Overriding derived constraint of %.2f MHz on net %s with user-specified constraint of " + "%.2f MHz.\n", MHz(to->clkconstr->period.min_delay), to->name.c_str(ctx), MHz(constr->period.min_delay)); return; } to->clkconstr = std::move(constr); - log_info(" Derived frequency constraint of %.1f MHz for net %s\n", MHz(to->clkconstr->period.minDelay()), + log_info(" Derived frequency constraint of %.2f MHz for net %s\n", MHz(to->clkconstr->period.minDelay()), to->name.c_str(ctx)); changed_nets.insert(to->name); }; @@ -1330,8 +1330,8 @@ class MachXO2Packer delay_t(from->clkconstr->period.minDelay() / ratio)) && user_constrained.count(to->name)) log_warning( - " Overriding derived constraint of %.1f MHz on net %s with user-specified constraint of " - "%.1f MHz.\n", + " Overriding derived constraint of %.2f MHz on net %s with user-specified constraint of " + "%.2f MHz.\n", MHz(to->clkconstr->period.minDelay()), to->name.c_str(ctx), MHz(delay_t(from->clkconstr->period.minDelay() / ratio))); return; @@ -1343,7 +1343,7 @@ class MachXO2Packer DelayPair(ctx->getDelayFromNS(ctx->getDelayNS(from->clkconstr->high.min_delay) / ratio)); to->clkconstr->period = DelayPair(ctx->getDelayFromNS(ctx->getDelayNS(from->clkconstr->period.min_delay) / ratio)); - log_info(" Derived frequency constraint of %.1f MHz for net %s\n", MHz(to->clkconstr->period.minDelay()), + log_info(" Derived frequency constraint of %.2f MHz for net %s\n", MHz(to->clkconstr->period.minDelay()), to->name.c_str(ctx)); changed_nets.insert(to->name); }; @@ -1389,7 +1389,7 @@ class MachXO2Packer delay_t period_in; if (!get_period(ci, id_CLKI, period_in)) continue; - log_info(" Input frequency of PLL '%s' is constrained to %.1f MHz\n", ci->name.c_str(ctx), + log_info(" Input frequency of PLL '%s' is constrained to %.2f MHz\n", ci->name.c_str(ctx), MHz(period_in)); double period_in_div = period_in * int_or_default(ci->params, id_CLKI_DIV, 1); std::string path = str_or_default(ci->params, id_FEEDBK_PATH, "CLKOP"); @@ -1410,7 +1410,7 @@ class MachXO2Packer double vco_period = period_in_div / feedback_div; double vco_freq = MHz(vco_period); if (vco_freq < 400 || vco_freq > 800) - log_info(" Derived VCO frequency %.1f MHz of PLL '%s' is out of legal range [400MHz, " + log_info(" Derived VCO frequency %.2f MHz of PLL '%s' is out of legal range [400MHz, " "800MHz]\n", vco_freq, ci->name.c_str(ctx)); set_constraint(ci, id_CLKOP,