From c5f9a12bb103626e980bd4b843d270eb3ae64d41 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sat, 29 Sep 2018 17:36:08 +0100 Subject: ecp5: Global router produces a working bitstream Signed-off-by: David Shah --- common/nextpnr.cc | 7 +++++++ common/router1.cc | 6 ++++++ 2 files changed, 13 insertions(+) (limited to 'common') diff --git a/common/nextpnr.cc b/common/nextpnr.cc index b04679ad..d47a8525 100644 --- a/common/nextpnr.cc +++ b/common/nextpnr.cc @@ -99,8 +99,15 @@ delay_t Context::getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &us while (cursor != WireId() && cursor != src_wire) { auto it = net_info->wires.find(cursor); + if (it == net_info->wires.end()) break; +#ifdef ARCH_ECP5 + // ECP5 global nets currently appear part-unrouted due to arch database limitations + // Don't touch them in the router + if (it->second.strength == STRENGTH_LOCKED) + return 0; +#endif PipId pip = it->second.pip; delay += getPipDelay(pip).maxDelay(); delay += getWireDelay(cursor).maxDelay(); diff --git a/common/router1.cc b/common/router1.cc index 5cd4414c..d29cdd68 100644 --- a/common/router1.cc +++ b/common/router1.cc @@ -532,6 +532,12 @@ void addNetRouteJobs(Context *ctx, const Router1Cfg &cfg, IdString net_name, { NetInfo *net_info = ctx->nets.at(net_name).get(); +#ifdef ARCH_ECP5 + // ECP5 global nets currently appear part-unrouted due to arch database limitations + // Don't touch them in the router + if (!net_info->wires.empty() && net_info->wires.begin()->second.strength == STRENGTH_LOCKED) + return; +#endif if (net_info->driver.cell == nullptr) return; -- cgit v1.2.3