Replace `std::map` with `dict`.
authorAlberto Gonzalez <boqwxp@airmail.cc>
Mon, 13 Apr 2020 19:37:01 +0000 (19:37 +0000)
committerAlberto Gonzalez <boqwxp@airmail.cc>
Thu, 16 Apr 2020 18:49:55 +0000 (18:49 +0000)
Co-Authored-By: Eddie Hung <eddie@fpgeh.com>
passes/cmds/scatter.cc

index cd1b3286f7baf2d22ea04fdf10c5a66ee7fa45cb..a5ef95f022e0a18ad6a00d98b73b29c09a304e48 100644 (file)
@@ -49,9 +49,9 @@ struct ScatterPass : public Pass {
                for (auto module : design->selected_modules())
                {
                        for (auto cell : module->cells()) {
-                               std::map<RTLIL::IdString, std::pair<RTLIL::SigSpec, RTLIL::SigSpec>> new_connections;
+                               dict<RTLIL::IdString, RTLIL::SigSig> new_connections;
                                for (auto conn : cell->connections())
-                                       new_connections.emplace(conn.first, std::make_pair(conn.second, module->addWire(NEW_ID, conn.second.size())));
+                                       new_connections.emplace(conn.first, RTLIL::SigSig(conn.second, module->addWire(NEW_ID, GetSize(conn.second))));
                                for (auto &it : new_connections) {
                                        if (ct.cell_output(cell->type, it.first))
                                                module->connect(RTLIL::SigSig(it.second.first, it.second.second));