aboutsummaryrefslogtreecommitdiffstats
path: root/frontend
diff options
context:
space:
mode:
authorDavid Shah <dave@ds0.me>2019-12-01 14:03:23 +0000
committerDavid Shah <dave@ds0.me>2019-12-27 10:44:30 +0000
commitfe40094216d0007797c51ff8894127b37a4ff045 (patch)
tree3ade1df159a81ea4a363d56f6c7f662266853c60 /frontend
parentb1000870244dbb1a73198e23a859825865938b4c (diff)
downloadnextpnr-fe40094216d0007797c51ff8894127b37a4ff045.tar.gz
nextpnr-fe40094216d0007797c51ff8894127b37a4ff045.tar.bz2
nextpnr-fe40094216d0007797c51ff8894127b37a4ff045.zip
Preserve hierarchy through packing
Signed-off-by: David Shah <dave@ds0.me>
Diffstat (limited to 'frontend')
-rw-r--r--frontend/frontend_base.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/frontend/frontend_base.h b/frontend/frontend_base.h
index 9e16cb24..45847e21 100644
--- a/frontend/frontend_base.h
+++ b/frontend/frontend_base.h
@@ -423,8 +423,10 @@ template <typename FrontendType> struct GenericFrontend
void import_leaf_cell(HierModuleState &m, const std::string &name, const cell_dat_t &cd)
{
IdString inst_name = unique_name(m.prefix, name, false);
+ ctx->hierarchy[m.path].leaf_cells_by_gname[inst_name] = ctx->id(name);
ctx->hierarchy[m.path].leaf_cells[ctx->id(name)] = inst_name;
CellInfo *ci = ctx->createCell(inst_name, ctx->id(impl.get_cell_type(cd)));
+ ci->hierpath = m.path;
// Import port directions
std::unordered_map<IdString, PortType> port_dirs;
impl.foreach_port_dir(cd, [&](const std::string &port, PortType dir) { port_dirs[ctx->id(port)] = dir; });