From 58290c0c77e09aa40a098065ea999c85aaba398c Mon Sep 17 00:00:00 2001 From: Claire Xenia Wolf Date: Mon, 26 Apr 2021 16:31:44 +0200 Subject: [PATCH] Remove duplicates from conns array in JSON front-end, fixes #2736 --- frontends/json/jsonparse.cc | 4 ++++ 1 file changed, 4 insertions(+) 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 { -- 2.30.2