aboutsummaryrefslogtreecommitdiffstats
path: root/ice40
diff options
context:
space:
mode:
authorSylvain Munaut <tnt@246tNt.com>2019-01-18 17:51:55 +0100
committerSylvain Munaut <tnt@246tNt.com>2019-01-18 17:53:24 +0100
commit830d462f9220737d628bd9409a653799583f83df (patch)
tree6499bf8395fce1da2cfbdc1db6eddde6eedc80ef /ice40
parentc1d15c749c2aa105ee7b38ebe1b60a27e3743e8c (diff)
downloadnextpnr-830d462f9220737d628bd9409a653799583f83df.tar.gz
nextpnr-830d462f9220737d628bd9409a653799583f83df.tar.bz2
nextpnr-830d462f9220737d628bd9409a653799583f83df.zip
ice40: Add error message if a selected site is not Global Buffer capable
... rather than assert()-out during the call to getWireBelPins() call Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'ice40')
-rw-r--r--ice40/pack.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/ice40/pack.cc b/ice40/pack.cc
index 27387a75..b963f48a 100644
--- a/ice40/pack.cc
+++ b/ice40/pack.cc
@@ -388,6 +388,10 @@ static std::unique_ptr<CellInfo> create_padin_gbuf(Context *ctx, CellInfo *cell,
BelId gb_bel;
BelId bel = ctx->getBelByName(ctx->id(cell->attrs[ctx->id("BEL")]));
auto wire = ctx->getBelPinWire(bel, port_name);
+
+ if (wire == WireId())
+ log_error("BEL '%s' has no global buffer connection available\n", ctx->getBelName(bel).c_str(ctx));
+
for (auto src_bel : ctx->getWireBelPins(wire)) {
if (ctx->getBelType(src_bel.bel) == id_SB_GB && src_bel.pin == id_GLOBAL_BUFFER_OUTPUT) {
gb_bel = src_bel.bel;