aboutsummaryrefslogtreecommitdiffstats
path: root/json
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2018-11-29 19:20:51 +0000
committerDavid Shah <dave@ds0.me>2018-11-29 19:20:51 +0000
commitdbc14ea76d1af5b1d00a665dc0877969c1e76dc0 (patch)
tree3be46bc09acff39bf548231743cdf8ba3ca1cf6a /json
parentfc08856537aaa33e09642e55de0b9a95a53d3fd7 (diff)
downloadnextpnr-dbc14ea76d1af5b1d00a665dc0877969c1e76dc0.tar.gz
nextpnr-dbc14ea76d1af5b1d00a665dc0877969c1e76dc0.tar.bz2
nextpnr-dbc14ea76d1af5b1d00a665dc0877969c1e76dc0.zip
json: Improve reporting of multiple drivers
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'json')
-rw-r--r--json/jsonparse.cc6
1 files changed, 5 insertions, 1 deletions
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<IdString>
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;
}
}