From dad6277a25822f31c9eb60f5a57e58a49b5b6696 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Tue, 17 Mar 2026 16:11:32 +0100 Subject: [PATCH] flatten: skip $input_port cells in template module --- passes/hierarchy/flatten.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/passes/hierarchy/flatten.cc b/passes/hierarchy/flatten.cc index 29e7205ee..6e3a5e4d3 100644 --- a/passes/hierarchy/flatten.cc +++ b/passes/hierarchy/flatten.cc @@ -178,6 +178,8 @@ struct FlattenWorker } for (auto tpl_cell : tpl->cells()) { + if (tpl_cell->type == ID($input_port)) + continue; RTLIL::Cell *new_cell = module->addCell(map_name(cell, tpl_cell, separator), tpl_cell); map_attributes(cell, new_cell, tpl_cell->name); if (new_cell->has_memid()) {