diff options
author | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-14 18:27:43 -0800 |
---|---|---|
committer | Eddie Hung <eddieh@ece.ubc.ca> | 2018-11-14 18:27:43 -0800 |
commit | e1d2c595a18814d81528e49ba48dbd05fe6466ac (patch) | |
tree | d9648a620ba72893e148ad03d1bc74a516cdf1a5 | |
parent | 06ddb632d1711741d96b2303fadae980150a77ed (diff) | |
download | nextpnr-e1d2c595a18814d81528e49ba48dbd05fe6466ac.tar.gz nextpnr-e1d2c595a18814d81528e49ba48dbd05fe6466ac.tar.bz2 nextpnr-e1d2c595a18814d81528e49ba48dbd05fe6466ac.zip |
Improve message spacing
-rw-r--r-- | common/nextpnr.cc | 2 | ||||
-rw-r--r-- | common/timing.cc | 9 |
2 files changed, 8 insertions, 3 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc index b304f4f4..be3bfe14 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -409,7 +409,7 @@ void Context::check() const void BaseCtx::addClock(IdString net, float freq) { - log_info(" constraining clock net '%s' to %.02f MHz\n", net.c_str(this), freq); + log_info("constraining clock net '%s' to %.02f MHz\n", net.c_str(this), freq); std::unique_ptr<ClockConstraint> cc(new ClockConstraint()); cc->period = getCtx()->getDelayFromNS(1000 / freq); cc->high = getCtx()->getDelayFromNS(500 / freq); diff --git a/common/timing.cc b/common/timing.cc index b414c6f7..40e4d344 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -676,13 +676,18 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p } if (print_fmax) { log_break(); + unsigned max_width = 0; + for (auto &clock : clock_reports) + max_width = std::max<unsigned>(max_width, clock.first.str(ctx).size()); for (auto &clock : clock_reports) { + const auto &clock_name = clock.first.str(ctx); + const int width = max_width - clock_name.size(); if (ctx->nets.at(clock.first)->clkconstr) { float target = 1000 / ctx->getDelayNS(ctx->nets.at(clock.first)->clkconstr->period.minDelay()); - log_info("Max frequency for clock '%s': %.02f MHz (%s at %.02f MHz)\n", clock.first.c_str(ctx), + log_info("Max frequency for clock %*s'%s': %.02f MHz (%s at %.02f MHz)\n", width, "", clock_name.c_str(), clock_fmax[clock.first], (target < clock_fmax[clock.first]) ? "PASS" : "FAIL", target); } else { - log_info("Max frequency for clock '%s': %.02f MHz\n", clock.first.c_str(ctx), clock_fmax[clock.first]); + log_info("Max frequency for clock %*s'%s': %.02f MHz\n", width, "", clock_name.c_str(), clock_fmax[clock.first]); } } for (auto &eclock : empty_clocks) { |