ecp5: Use speed-grade-specific delay estimate

Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
David Shah 2018-11-16 13:18:22 +00:00
parent 13244e513b
commit 50b85da619
2 changed files with 2 additions and 3 deletions

View File

@ -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); Fmax = 1000 / ctx->getDelayNS(path.second.path_delay);
else else
Fmax = 500 / ctx->getDelayNS(path.second.path_delay); 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)) { if (!clock_fmax.count(a.clock) || Fmax < clock_fmax.at(a.clock)) {
clock_reports[a.clock] = path; clock_reports[a.clock] = path;
clock_fmax[a.clock] = Fmax; clock_fmax[a.clock] = Fmax;

View File

@ -400,7 +400,7 @@ BelId Arch::getBelByLocation(Loc loc) const
delay_t Arch::estimateDelay(WireId src, WireId dst) 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 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 driver_loc = getBelLocation(driver.cell->bel);
auto sink_loc = getBelLocation(sink.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; } bool Arch::getBudgetOverride(const NetInfo *net_info, const PortRef &sink, delay_t &budget) const { return false; }