json: Fix import/export of ports driven by the same net
Signed-off-by: David Shah <dave@ds0.me>
This commit is contained in:
parent
fba7c2caef
commit
bb0b6e85ce
@ -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<IdString> &netnames,
|
||||
|
@ -95,7 +95,7 @@ std::vector<PortGroup> group_ports(Context *ctx)
|
||||
if (int(grp.bits.size()) <= index)
|
||||
grp.bits.resize(index + 1, -1);
|
||||
NPNR_ASSERT(grp.bits.at(index) == -1);
|
||||
grp.bits.at(index) = pair.first.index;
|
||||
grp.bits.at(index) = pair.second.net ? pair.second.net->name.index : pair.first.index;
|
||||
}
|
||||
}
|
||||
return groups;
|
||||
|
Loading…
Reference in New Issue
Block a user