From e1e8d8cd14020b3b3ccf1995587438340b65bb5c Mon Sep 17 00:00:00 2001 From: Sylvain Munaut Date: Fri, 16 Nov 2018 14:44:24 +0100 Subject: [PATCH] ice40: Add warning if an instanciated SB_IO has its PACKAGE_PIN used elsewhere Signed-off-by: Sylvain Munaut --- ice40/pack.cc | 5 +++++ 1 file changed, 5 insertions(+) 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) {