Remove duplicates from conns array in JSON front-end, fixes #2736

This commit is contained in:
Claire Xenia Wolf 2021-04-26 16:31:44 +02:00
parent a5adb00774
commit 58290c0c77
1 changed files with 4 additions and 0 deletions

View File

@ -585,6 +585,10 @@ void json_import(Design *design, string &modname, JsonNode *node)
module->memories[mem->name] = mem;
}
}
// remove duplicates from connections array
pool<RTLIL::SigSig> unique_connections(module->connections_.begin(), module->connections_.end());
module->connections_ = std::vector<RTLIL::SigSig>(unique_connections.begin(), unique_connections.end());
}
struct JsonFrontend : public Frontend {