aboutsummaryrefslogtreecommitdiffstats
path: root/json
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-12-12 17:31:24 +0000
committerDavid Shah <dave@ds0.me>2018-12-12 17:31:24 +0000
commit9d852f02b620facc25255101bb9d6d07a1e705c7 (patch)
tree387cfcd5ec255e437ffb27f21b03f20d59fb8f7c /json
parent26ce72f8c66fa90bafd3bfe0e011b6a003aa7797 (diff)
downloadnextpnr-9d852f02b620facc25255101bb9d6d07a1e705c7.tar.gz
nextpnr-9d852f02b620facc25255101bb9d6d07a1e705c7.tar.bz2
nextpnr-9d852f02b620facc25255101bb9d6d07a1e705c7.zip
json: Print error instead of assert for driver/input conflicts
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'json')
-rw-r--r--json/jsonparse.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/json/jsonparse.cc b/json/jsonparse.cc
index b953fc7c..c4ef5584 100644
--- a/json/jsonparse.cc
+++ b/json/jsonparse.cc
@@ -627,7 +627,9 @@ static void insert_iobuf(Context *ctx, NetInfo *net, PortType type, const string
iobuf->ports[ctx->id("O")] = PortInfo{ctx->id("O"), net, PORT_OUT};
// Special case: input, etc, directly drives inout
if (net->driver.cell != nullptr) {
- assert(net->driver.cell->type == ctx->id("$nextpnr_iobuf"));
+ if (net->driver.cell->type != ctx->id("$nextpnr_iobuf"))
+ log_error("Top-level input '%s' also driven by %s.%s.\n", name.c_str(),
+ net->driver.cell->name.c_str(ctx), net->driver.port.c_str(ctx));
net = net->driver.cell->ports.at(ctx->id("I")).net;
}
assert(net->driver.cell == nullptr);