From 9d852f02b620facc25255101bb9d6d07a1e705c7 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 12 Dec 2018 17:31:24 +0000 Subject: json: Print error instead of assert for driver/input conflicts Signed-off-by: David Shah --- json/jsonparse.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'json') 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); -- cgit v1.2.3