display freq with two digits after decimal point
This commit is contained in:
parent
909917cb61
commit
582cd526ac
@ -1308,13 +1308,13 @@ class MachXO2Packer
|
|||||||
if (to->clkconstr != nullptr) {
|
if (to->clkconstr != nullptr) {
|
||||||
if (!equals_epsilon_constr(*to->clkconstr, *constr) && user_constrained.count(to->name))
|
if (!equals_epsilon_constr(*to->clkconstr, *constr) && user_constrained.count(to->name))
|
||||||
log_warning(
|
log_warning(
|
||||||
" Overriding derived constraint of %.1f MHz on net %s with user-specified constraint of "
|
" Overriding derived constraint of %.2f MHz on net %s with user-specified constraint of "
|
||||||
"%.1f MHz.\n",
|
"%.2f MHz.\n",
|
||||||
MHz(to->clkconstr->period.min_delay), to->name.c_str(ctx), MHz(constr->period.min_delay));
|
MHz(to->clkconstr->period.min_delay), to->name.c_str(ctx), MHz(constr->period.min_delay));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
to->clkconstr = std::move(constr);
|
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));
|
to->name.c_str(ctx));
|
||||||
changed_nets.insert(to->name);
|
changed_nets.insert(to->name);
|
||||||
};
|
};
|
||||||
@ -1330,8 +1330,8 @@ class MachXO2Packer
|
|||||||
delay_t(from->clkconstr->period.minDelay() / ratio)) &&
|
delay_t(from->clkconstr->period.minDelay() / ratio)) &&
|
||||||
user_constrained.count(to->name))
|
user_constrained.count(to->name))
|
||||||
log_warning(
|
log_warning(
|
||||||
" Overriding derived constraint of %.1f MHz on net %s with user-specified constraint of "
|
" Overriding derived constraint of %.2f MHz on net %s with user-specified constraint of "
|
||||||
"%.1f MHz.\n",
|
"%.2f MHz.\n",
|
||||||
MHz(to->clkconstr->period.minDelay()), to->name.c_str(ctx),
|
MHz(to->clkconstr->period.minDelay()), to->name.c_str(ctx),
|
||||||
MHz(delay_t(from->clkconstr->period.minDelay() / ratio)));
|
MHz(delay_t(from->clkconstr->period.minDelay() / ratio)));
|
||||||
return;
|
return;
|
||||||
@ -1343,7 +1343,7 @@ class MachXO2Packer
|
|||||||
DelayPair(ctx->getDelayFromNS(ctx->getDelayNS(from->clkconstr->high.min_delay) / ratio));
|
DelayPair(ctx->getDelayFromNS(ctx->getDelayNS(from->clkconstr->high.min_delay) / ratio));
|
||||||
to->clkconstr->period =
|
to->clkconstr->period =
|
||||||
DelayPair(ctx->getDelayFromNS(ctx->getDelayNS(from->clkconstr->period.min_delay) / ratio));
|
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));
|
to->name.c_str(ctx));
|
||||||
changed_nets.insert(to->name);
|
changed_nets.insert(to->name);
|
||||||
};
|
};
|
||||||
@ -1389,7 +1389,7 @@ class MachXO2Packer
|
|||||||
delay_t period_in;
|
delay_t period_in;
|
||||||
if (!get_period(ci, id_CLKI, period_in))
|
if (!get_period(ci, id_CLKI, period_in))
|
||||||
continue;
|
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));
|
MHz(period_in));
|
||||||
double period_in_div = period_in * int_or_default(ci->params, id_CLKI_DIV, 1);
|
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");
|
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_period = period_in_div / feedback_div;
|
||||||
double vco_freq = MHz(vco_period);
|
double vco_freq = MHz(vco_period);
|
||||||
if (vco_freq < 400 || vco_freq > 800)
|
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",
|
"800MHz]\n",
|
||||||
vco_freq, ci->name.c_str(ctx));
|
vco_freq, ci->name.c_str(ctx));
|
||||||
set_constraint(ci, id_CLKOP,
|
set_constraint(ci, id_CLKOP,
|
||||||
|
Loading…
Reference in New Issue
Block a user