From f0325730a8543ee98123117192c4680cd0a9b41d Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Thu, 28 Sep 2023 14:16:34 +0200 Subject: [PATCH] made higher estimate and use proper speed --- machxo2/arch.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/machxo2/arch.cc b/machxo2/arch.cc index 27abad5c..17d56f96 100644 --- a/machxo2/arch.cc +++ b/machxo2/arch.cc @@ -70,7 +70,7 @@ static void get_chip_info(std::string device, const ChipInfoPOD **chip_info, con *package_info = nullptr; *package_name = pkg.name.get(); *device_name = chip.name.get(); - *device_speed = speedgrade.index; + *device_speed = speedgrade.speed; *speed_grade = &(db_ptr->get()->speed_grades[speedgrade.index]); for (auto &pi : db_ptr->get()->package_info) { if (pkg.name.get() == pi.name.get()) { @@ -404,7 +404,7 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const int dx = abs(src_loc.first - dst_loc.first), dy = abs(src_loc.second - dst_loc.second); - return (120 - 22 * device_speed) * + return (500 - 22 * device_speed) * (6 + std::max(dx - 5, 0) + std::max(dy - 5, 0) + 2 * (std::min(dx, 5) + std::min(dy, 5))); } @@ -482,7 +482,7 @@ delay_t Arch::predictDelay(BelId src_bel, IdString src_pin, BelId dst_bel, IdStr int dx = abs(driver_loc.x - sink_loc.x), dy = abs(driver_loc.y - sink_loc.y); - return (120 - 22 * device_speed) * + return (500 - 22 * device_speed) * (3 + std::max(dx - 5, 0) + std::max(dy - 5, 0) + 2 * (std::min(dx, 5) + std::min(dy, 5))); }