yosys/frontends/ast
Greeshma Manjegowda 8c7b1921d2 ast: guard against module name collision during reprocessing
process_module() could hit the modules_.count(module->name) == 0
assertion in Design::add() when a module gets reprocessed via
AstModule::reprocess_if_necessary(). This happens for a
parameterized module that instantiates a submodule inside a
generate block, where the submodule only becomes available after
the enclosing module's initial derivation. In that case,
process_module() could attempt to register a module under a name
that was already occupied.

Guard the design add call in process_module() by removing any
stale module already registered under the target name before
adding the newly generated one.

Verified against the reproduction case in issue #6002 (multiply
elaborates successfully without crashing) and confirmed the
previously working divide case produces identical output before
and after this change.

Fixes #6002
2026-07-24 17:30:01 -05:00
..
CMakeLists.txt Migrate build system to CMake 2026-06-03 08:58:10 +00:00
ast.cc ast: guard against module name collision during reprocessing 2026-07-24 17:30:01 -05:00
ast.h Support positional assignment patterns for unpacked arrays 2026-04-23 14:29:38 -07:00
ast_binding.cc Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
ast_binding.h Generate an RTLIL representation of bind constructs 2021-08-13 17:11:35 -06:00
dpicall.cc End of file fix 2026-06-23 07:23:41 +02:00
genrtlil.cc genrtlil: don't avoid emitting flops for nosync 2026-05-29 11:37:08 +02:00
simplify.cc Merge pull request #5887 from YosysHQ/nella/fix-signedness-4402 2026-06-18 16:53:37 +00:00