Change the log level of some timing-related messages
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
b550791d92
commit
51d1363dfe
@ -812,7 +812,8 @@ bool router1(Context *ctx, const Router1Cfg &cfg)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
log_info("Checksum: 0x%08x\n", ctx->checksum());
|
log_info("Checksum: 0x%08x\n", ctx->checksum());
|
||||||
timing_analysis(ctx, true /* slack_histogram */, true /* print_fmax */, true /* print_path */);
|
timing_analysis(ctx, true /* slack_histogram */, true /* print_fmax */, true /* print_path */,
|
||||||
|
true /* warn_on_failure */);
|
||||||
|
|
||||||
ctx->unlock();
|
ctx->unlock();
|
||||||
return true;
|
return true;
|
||||||
|
@ -485,11 +485,11 @@ void assign_budget(Context *ctx, bool quiet)
|
|||||||
for (auto &user : net.second->users) {
|
for (auto &user : net.second->users) {
|
||||||
// Post-update check
|
// Post-update check
|
||||||
if (!ctx->auto_freq && user.budget < 0)
|
if (!ctx->auto_freq && user.budget < 0)
|
||||||
log_warning("port %s.%s, connected to net '%s', has negative "
|
log_info("port %s.%s, connected to net '%s', has negative "
|
||||||
"timing budget of %fns\n",
|
"timing budget of %fns\n",
|
||||||
user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx),
|
user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx),
|
||||||
ctx->getDelayNS(user.budget));
|
ctx->getDelayNS(user.budget));
|
||||||
else if (ctx->verbose)
|
else if (ctx->debug)
|
||||||
log_info("port %s.%s, connected to net '%s', has "
|
log_info("port %s.%s, connected to net '%s', has "
|
||||||
"timing budget of %fns\n",
|
"timing budget of %fns\n",
|
||||||
user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx),
|
user.cell->name.c_str(ctx), user.port.c_str(ctx), net.first.c_str(ctx),
|
||||||
@ -513,7 +513,7 @@ void assign_budget(Context *ctx, bool quiet)
|
|||||||
log_info("Checksum: 0x%08x\n", ctx->checksum());
|
log_info("Checksum: 0x%08x\n", ctx->checksum());
|
||||||
}
|
}
|
||||||
|
|
||||||
void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool print_path)
|
void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool print_path, bool warn_on_failure)
|
||||||
{
|
{
|
||||||
auto format_event = [ctx](const ClockEvent &e, int field_width = 0) {
|
auto format_event = [ctx](const ClockEvent &e, int field_width = 0) {
|
||||||
std::string value;
|
std::string value;
|
||||||
@ -689,15 +689,17 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p
|
|||||||
for (auto &clock : clock_reports) {
|
for (auto &clock : clock_reports) {
|
||||||
const auto &clock_name = clock.first.str(ctx);
|
const auto &clock_name = clock.first.str(ctx);
|
||||||
const int width = max_width - clock_name.size();
|
const int width = max_width - clock_name.size();
|
||||||
if (ctx->nets.at(clock.first)->clkconstr) {
|
float target = ctx->target_freq / 1e6;
|
||||||
float target = 1000 / ctx->getDelayNS(ctx->nets.at(clock.first)->clkconstr->period.minDelay());
|
if (ctx->nets.at(clock.first)->clkconstr)
|
||||||
|
target = 1000 / ctx->getDelayNS(ctx->nets.at(clock.first)->clkconstr->period.minDelay());
|
||||||
|
|
||||||
|
bool passed = target < clock_fmax[clock.first];
|
||||||
|
if (!warn_on_failure || passed)
|
||||||
log_info("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
log_info("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
||||||
clock_name.c_str(), clock_fmax[clock.first],
|
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||||
(target < clock_fmax[clock.first]) ? "PASS" : "FAIL", target);
|
else
|
||||||
} else {
|
log_warning("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "",
|
||||||
log_info("Max frequency for clock %*s'%s': %.02f MHz\n", width, "", clock_name.c_str(),
|
clock_name.c_str(), clock_fmax[clock.first], passed ? "PASS" : "FAIL", target);
|
||||||
clock_fmax[clock.first]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
for (auto &eclock : empty_clocks) {
|
for (auto &eclock : empty_clocks) {
|
||||||
if (eclock != ctx->id("$async$"))
|
if (eclock != ctx->id("$async$"))
|
||||||
|
@ -29,7 +29,8 @@ void assign_budget(Context *ctx, bool quiet = false);
|
|||||||
|
|
||||||
// Perform timing analysis and print out the fmax, and optionally the
|
// Perform timing analysis and print out the fmax, and optionally the
|
||||||
// critical path
|
// critical path
|
||||||
void timing_analysis(Context *ctx, bool slack_histogram = true, bool print_fmax = true, bool print_path = false);
|
void timing_analysis(Context *ctx, bool slack_histogram = true, bool print_fmax = true, bool print_path = false,
|
||||||
|
bool warn_on_failure = false);
|
||||||
|
|
||||||
NEXTPNR_NAMESPACE_END
|
NEXTPNR_NAMESPACE_END
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user