From bb0b6e85ce713012cd90cd18882c7873888648a1 Mon Sep 17 00:00:00 2001 From: David Shah Date: Wed, 7 Aug 2019 18:48:06 +0100 Subject: json: Fix import/export of ports driven by the same net Signed-off-by: David Shah --- json/jsonparse.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'json/jsonparse.cc') diff --git a/json/jsonparse.cc b/json/jsonparse.cc index b3bb491b..ad21daf2 100644 --- a/json/jsonparse.cc +++ b/json/jsonparse.cc @@ -733,10 +733,10 @@ static void insert_iobuf(Context *ctx, NetInfo *net, PortType type, const string } PortInfo pinfo; - pinfo.name = net->name; + pinfo.name = ctx->id(name); pinfo.net = net; pinfo.type = type; - ctx->ports[net->name] = pinfo; + ctx->ports[pinfo.name] = pinfo; } void json_import_toplevel_port(Context *ctx, const string &modname, const std::vector &netnames, -- cgit v1.2.3