From aa101a0c17311203db22611ea51dccfcbbca0737 Mon Sep 17 00:00:00 2001 From: "Emil J. Tywoniak" Date: Tue, 17 Mar 2026 16:37:00 +0100 Subject: [PATCH] signorm: remove $input cells when leaving --- kernel/rtlil_bufnorm.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/kernel/rtlil_bufnorm.cc b/kernel/rtlil_bufnorm.cc index e6c73f64a..42163ad28 100644 --- a/kernel/rtlil_bufnorm.cc +++ b/kernel/rtlil_bufnorm.cc @@ -327,6 +327,13 @@ void RTLIL::Design::sigNormalize(bool enable) wire->driverCell_ = nullptr; wire->driverPort_ = IdString(); } + + // TODO inefficient? + std::vector cells_snapshot = module->cells(); + for (auto cell : cells_snapshot) { + if (cell->type == ID($input_port)) + module->remove(cell); + } } flagSigNormalized = false;