From e1d2c595a18814d81528e49ba48dbd05fe6466ac Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Wed, 14 Nov 2018 18:27:43 -0800 Subject: Improve message spacing --- common/timing.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'common/timing.cc') 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(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) { -- cgit v1.2.3