aboutsummaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-09-30 13:31:27 +0100
committerGitHub <noreply@github.com>2018-09-30 13:31:27 +0100
commit2e7aeaef974c8c104e61de03bc57f0ea764bd9c0 (patch)
treec4ad68c7128a21d1bb4cb5baf16679addddcd074 /common
parent07cf349ee46a8c8a3163d2f8a146beab02e6b487 (diff)
parent0e0ad26f07354938820b6acd1d422fee3208767e (diff)
downloadnextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.tar.gz
nextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.tar.bz2
nextpnr-2e7aeaef974c8c104e61de03bc57f0ea764bd9c0.zip
Merge pull request #81 from YosysHQ/ecp5_globals
Adding a simple ECP5 global network router
Diffstat (limited to 'common')
-rw-r--r--common/nextpnr.cc7
-rw-r--r--common/router1.cc6
2 files changed, 13 insertions, 0 deletions
diff --git a/common/nextpnr.cc b/common/nextpnr.cc
index b04679ad..068bca6f 100644
--- a/common/nextpnr.cc
+++ b/common/nextpnr.cc
@@ -89,6 +89,11 @@ WireId Context::getNetinfoSinkWire(const NetInfo *net_info, const PortRef &user_
delay_t Context::getNetinfoRouteDelay(const NetInfo *net_info, const PortRef &user_info) const
{
+#ifdef ARCH_ECP5
+ if (net_info->is_global)
+ return 0;
+#endif
+
WireId src_wire = getNetinfoSourceWire(net_info);
if (src_wire == WireId())
return 0;
@@ -99,8 +104,10 @@ 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;
+
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..c4708de7 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->is_global)
+ return;
+#endif
if (net_info->driver.cell == nullptr)
return;