aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shah <davey1576@gmail.com>2018-11-16 15:56:45 +0000
committerGitHub <noreply@github.com>2018-11-16 15:56:45 +0000
commit1851ebb1c6b9edc2d8396494864fa7fa3b833c9d (patch)
tree128bb2efcd6677ffeae071111d08ffb7e6177dcd
parentaf5c4d1b11d717b551a6e3f5ba504cb49f9d1347 (diff)
parente1e8d8cd14020b3b3ccf1995587438340b65bb5c (diff)
downloadnextpnr-1851ebb1c6b9edc2d8396494864fa7fa3b833c9d.tar.gz
nextpnr-1851ebb1c6b9edc2d8396494864fa7fa3b833c9d.tar.bz2
nextpnr-1851ebb1c6b9edc2d8396494864fa7fa3b833c9d.zip
Merge pull request #124 from smunaut/ice40_warn_sbio_misuse
ice40: Add warning if an instanciated SB_IO has its PACKAGE_PIN used elsewhere
-rw-r--r--ice40/pack.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 7a27d505..e0a9f6ad 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -438,6 +438,11 @@ static void pack_io(Context *ctx)
}
packed_cells.insert(ci->name);
std::copy(ci->attrs.begin(), ci->attrs.end(), std::inserter(sb->attrs, sb->attrs.begin()));
+ } else if (is_sb_io(ctx, ci)) {
+ NetInfo *net = ci->ports.at(ctx->id("PACKAGE_PIN")).net;
+ if ((net != nullptr) && (net->users.size() > 1))
+ log_error("PACKAGE_PIN of SB_IO '%s' connected to more than a single top level IO.\n",
+ ci->name.c_str(ctx));
}
}
for (auto pcell : packed_cells) {