From dc685f2061c1436aed598184934b532d205a56a2 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 6 Aug 2018 07:29:42 -0700 Subject: [PATCH 1/3] Enhance slack histogram with '+' to indicate less-than-granularity --- common/timing.cc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/timing.cc b/common/timing.cc index d37a0f59..d214793c 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -256,9 +256,11 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_path) log_break(); log_info("Slack histogram:\n"); log_info(" legend: * represents %d endpoint(s)\n", max_freq / bar_width); + log_info(" + represents [1,%d) endpoint(s)\n", max_freq / bar_width); for (unsigned i = 0; i < bins.size(); ++i) - log_info("%6d < ps < %6d |%s\n", min_slack + bin_size * i, min_slack + bin_size * (i + 1), - std::string(bins[i] * bar_width / max_freq, '*').c_str()); + log_info("[%6d, %6d) |%s%c\n", min_slack + bin_size * i, min_slack + bin_size * (i + 1), + std::string(bins[i] * bar_width / max_freq, '*').c_str(), + (bins[i] * bar_width) % max_freq > 0 ? '+' : ' '); } } From 95163ae1d0f591503c85f4a4b90e0f9f9f7dba7e Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 6 Aug 2018 12:14:00 -0700 Subject: [PATCH 2/3] Add name to copyright header --- common/timing.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/common/timing.cc b/common/timing.cc index 493cd040..d6c46632 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -2,6 +2,7 @@ * nextpnr -- Next Generation Place and Route * * Copyright (C) 2018 David Shah + * Copyright (C) 2018 Eddie Hung * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above From 9addcac09cd9e95a1078b938c92290c453e53160 Mon Sep 17 00:00:00 2001 From: Eddie Hung Date: Mon, 6 Aug 2018 12:22:13 -0700 Subject: [PATCH 3/3] ice40's getBudgetOverride() to return correct delay for different devices --- ice40/arch.cc | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/ice40/arch.cc b/ice40/arch.cc index 1e7a383b..fcc9d798 100644 --- a/ice40/arch.cc +++ b/ice40/arch.cc @@ -645,8 +645,23 @@ bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay auto sink_loc = getBelLocation(sink.cell->bel); if (driver_loc.y == sink_loc.y) budget = 0; - else - budget = 190; + else switch (args.type) { +#ifndef ICE40_HX1K_ONLY + case ArchArgs::HX8K: +#endif + case ArchArgs::HX1K: + budget = 190; break; +#ifndef ICE40_HX1K_ONLY + case ArchArgs::LP384: + case ArchArgs::LP1K: + case ArchArgs::LP8K: + budget = 290; break; + case ArchArgs::UP5K: + budget = 560; break; +#endif + default: + log_error("Unsupported iCE40 chip type.\n"); + } return true; } return false;