From fe40094216d0007797c51ff8894127b37a4ff045 Mon Sep 17 00:00:00 2001 From: David Shah Date: Sun, 1 Dec 2019 14:03:23 +0000 Subject: Preserve hierarchy through packing Signed-off-by: David Shah --- frontend/frontend_base.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'frontend/frontend_base.h') 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 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 port_dirs; impl.foreach_port_dir(cd, [&](const std::string &port, PortType dir) { port_dirs[ctx->id(port)] = dir; }); -- cgit v1.2.3