From: Claire Xenia Wolf Date: Mon, 26 Apr 2021 14:31:44 +0000 (+0200) Subject: Remove duplicates from conns array in JSON front-end, fixes #2736 X-Git-Tag: yosys-0.10~216^2 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=58290c0c77e09aa40a098065ea999c85aaba398c;p=yosys.git Remove duplicates from conns array in JSON front-end, fixes #2736 --- diff --git a/frontends/json/jsonparse.cc b/frontends/json/jsonparse.cc index d897ac20b..cbfa038a1 100644 --- a/frontends/json/jsonparse.cc +++ b/frontends/json/jsonparse.cc @@ -585,6 +585,10 @@ void json_import(Design *design, string &modname, JsonNode *node) module->memories[mem->name] = mem; } } + + // remove duplicates from connections array + pool unique_connections(module->connections_.begin(), module->connections_.end()); + module->connections_ = std::vector(unique_connections.begin(), unique_connections.end()); } struct JsonFrontend : public Frontend {