diff options
author | Miodrag Milanovic <mmicko@gmail.com> | 2019-12-28 13:54:06 +0100 |
---|---|---|
committer | Miodrag Milanovic <mmicko@gmail.com> | 2019-12-28 13:54:06 +0100 |
commit | 796d6489953927105d3b0ed22308f29676b168fa (patch) | |
tree | bc0f470642c0943713c441aa7c3e9e310cb23ccc /ecp5/arch.cc | |
parent | 50f87a6024859d197eefa8de0b0b616b1e03e239 (diff) | |
parent | 0d43aff2682d91817ea4a1fb5dff6e169ae9a659 (diff) | |
download | nextpnr-796d6489953927105d3b0ed22308f29676b168fa.tar.gz nextpnr-796d6489953927105d3b0ed22308f29676b168fa.tar.bz2 nextpnr-796d6489953927105d3b0ed22308f29676b168fa.zip |
Merge remote-tracking branch 'origin/master' into mmicko/ecp5_gui
Diffstat (limited to 'ecp5/arch.cc')
-rw-r--r-- | ecp5/arch.cc | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/ecp5/arch.cc b/ecp5/arch.cc index e678d3b3..994e8660 100644 --- a/ecp5/arch.cc +++ b/ecp5/arch.cc @@ -117,6 +117,9 @@ Arch::Arch(ArchArgs args) : args(args) log_error("Unsupported ECP5 chip type.\n"); } #endif + if (chip_info->const_id_count != DB_CONST_ID_COUNT) + log_error("Chip database 'bba' and nextpnr code are out of sync; please rebuild (or contact distribution " + "maintainer)!\n"); package_info = nullptr; for (int i = 0; i < chip_info->num_packages; i++) { if (args.package == chip_info->package_info[i].name.get()) { @@ -475,7 +478,13 @@ delay_t Arch::estimateDelay(WireId src, WireId dst) const } }; - auto src_loc = est_location(src), dst_loc = est_location(dst); + auto src_loc = est_location(src); + std::pair<int, int> dst_loc; + if (wire_loc_overrides.count(dst)) { + dst_loc = wire_loc_overrides.at(dst); + } else { + dst_loc = est_location(dst); + } int dx = abs(src_loc.first - dst_loc.first), dy = abs(src_loc.second - dst_loc.second); @@ -560,6 +569,7 @@ bool Arch::place() bool Arch::route() { + setupWireLocations(); route_ecp5_globals(getCtx()); assignArchInfo(); assign_budget(getCtx(), true); |