diff options
author | David Shah <dave@ds0.me> | 2018-11-16 13:18:22 +0000 |
---|---|---|
committer | David Shah <dave@ds0.me> | 2018-11-16 13:26:28 +0000 |
commit | 50b85da6192b54b1a7ad4675ee88dc61fe169c04 (patch) | |
tree | eb8ce94d6fa2e9ed0259a5fc99be75ccb0c42a4f | |
parent | 13244e513b2a7454f2fa6d952df334439d28588a (diff) | |
download | nextpnr-50b85da6192b54b1a7ad4675ee88dc61fe169c04.tar.gz nextpnr-50b85da6192b54b1a7ad4675ee88dc61fe169c04.tar.bz2 nextpnr-50b85da6192b54b1a7ad4675ee88dc61fe169c04.zip |
ecp5: Use speed-grade-specific delay estimate
Signed-off-by: David Shah <dave@ds0.me>
-rw-r--r-- | common/timing.cc | 1 | ||||
-rw-r--r-- | ecp5/arch.cc | 4 |
2 files changed, 2 insertions, 3 deletions
diff --git a/common/timing.cc b/common/timing.cc index 00142a4d..4012c374 100644 --- a/common/timing.cc +++ b/common/timing.cc @@ -554,7 +554,6 @@ void timing_analysis(Context *ctx, bool print_histogram, bool print_fmax, bool p Fmax = 1000 / ctx->getDelayNS(path.second.path_delay); else Fmax = 500 / ctx->getDelayNS(path.second.path_delay); - log_info("%d %f\n", a.edge == b.edge, ctx->getDelayNS(path.second.path_delay)); if (!clock_fmax.count(a.clock) || Fmax < clock_fmax.at(a.clock)) { clock_reports[a.clock] = path; clock_fmax[a.clock] = Fmax; diff --git a/ecp5/arch.cc b/ecp5/arch.cc index 9b28f56b..0ae063a2 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -400,7 +400,7 @@ BelId Arch::getBelByLocation(Loc loc) const delay_t Arch::estimateDelay(WireId src, WireId dst) const { - return 170 * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); + return (240 - 20 * args.speed) * (abs(src.location.x - dst.location.x) + abs(src.location.y - dst.location.y)); } delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const @@ -409,7 +409,7 @@ delay_t Arch::predictDelay(const NetInfo *net_info, const PortRef &sink) const auto driver_loc = getBelLocation(driver.cell->bel); auto sink_loc = getBelLocation(sink.cell->bel); - return 170 * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); + return (240 - 20 * args.speed) * (abs(driver_loc.x - sink_loc.x) + abs(driver_loc.y - sink_loc.y)); } bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; } |