aboutsummaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorgatecat <gatecat@ds0.me>2021-06-02 12:09:40 +0100
committergatecat <gatecat@ds0.me>2021-06-02 15:05:20 +0100
commitdcbb322447a7fb59cabe197ec1dd2307acfa3681 (patch)
treeada2c6a5d48e766fa523e633aaa28179baea3273 /frontend
parent897e2c2fdc43bcf097aa8805c424c4443bcefad5 (diff)
downloadnextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.tar.gz
nextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.tar.bz2
nextpnr-dcbb322447a7fb59cabe197ec1dd2307acfa3681.zip
Remove redundant code after hashlib move
Signed-off-by: gatecat <gatecat@ds0.me>
Diffstat (limited to 'frontend')
-rw-r--r--frontend/frontend_base.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/frontend/frontend_base.h b/frontend/frontend_base.h
index 4fb71076..bc85fabb 100644
--- a/frontend/frontend_base.h
+++ b/frontend/frontend_base.h
@@ -134,7 +134,7 @@ template <typename FrontendType> struct GenericFrontend
m.path = top;
ctx->top_module = top;
// Do the actual import, starting from the top level module
- import_module(m, top.str(ctx), top.str(ctx), mod_refs.at(top));
+ import_module(m, top.str(ctx), top.str(ctx), mod_refs.at(top.str(ctx)));
ctx->design_loaded = true;
}
@@ -149,7 +149,7 @@ template <typename FrontendType> struct GenericFrontend
using bitvector_t = typename FrontendType::BitVectorDataType;
dict<IdString, ModuleInfo> mods;
- std::unordered_map<IdString, const mod_dat_t> mod_refs;
+ std::unordered_map<std::string, const mod_dat_t> mod_refs;
IdString top;
// Process the list of modules and determine
@@ -159,7 +159,7 @@ template <typename FrontendType> struct GenericFrontend
impl.foreach_module([&](const std::string &name, const mod_dat_t &mod) {
IdString mod_id = ctx->id(name);
auto &mi = mods[mod_id];
- mod_refs.emplace(mod_id, mod);
+ mod_refs.emplace(name, mod);
impl.foreach_attr(mod, [&](const std::string &name, const Property &value) {
if (name == "top")
mi.is_top = (value.intval != 0);
@@ -531,7 +531,7 @@ template <typename FrontendType> struct GenericFrontend
ctx->hierarchy[m.path].hier_cells[ctx->id(name)] = submod.path;
// Do the submodule import
auto type = impl.get_cell_type(cd);
- import_module(submod, name, type, mod_refs.at(ctx->id(type)));
+ import_module(submod, name, type, mod_refs.at(type));
}
// Import the cells section of a module