From dbc14ea76d1af5b1d00a665dc0877969c1e76dc0 Mon Sep 17 00:00:00 2001 From: David Shah Date: Thu, 29 Nov 2018 19:20:51 +0000 Subject: json: Improve reporting of multiple drivers Signed-off-by: David Shah --- json/jsonparse.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/json/jsonparse.cc b/json/jsonparse.cc index bddbee0b..b953fc7c 100644 --- a/json/jsonparse.cc +++ b/json/jsonparse.cc @@ -594,7 +594,11 @@ void json_import_cell(Context *ctx, string modname, const std::vector if (type == PORT_IN || type == PORT_INOUT) { net->users.push_back(pr); } else if (type == PORT_OUT) { - assert(net->driver.cell == nullptr); + if (net->driver.cell != nullptr) + log_error("multiple drivers on net '%s' (%s.%s and %s.%s)\n", + net->name.c_str(ctx), net->driver.cell->name.c_str(ctx), + net->driver.port.c_str(ctx), pr.cell->name.c_str(ctx), + pr.port.c_str(ctx)); net->driver = pr; } } -- cgit v1.2.3