yosys/frontends
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
..
aiger Move rename logic to abc_ops_reintegrate 2026-06-19 10:46:47 +01:00
aiger2 read_aiger: import standard-cell mappings from ABC 2026-06-05 11:02:58 +01:00
ast ast: guard against module name collision during reprocessing 2026-07-24 17:30:01 -05:00
blif End of file fix 2026-06-23 07:23:41 +02:00
json Migrate build system to CMake 2026-06-03 08:58:10 +00:00
liberty End of file fix 2026-06-23 07:23:41 +02:00
rpc Migrate build system to CMake 2026-06-03 08:58:10 +00:00
rtlil long long to int truncation checks 2026-07-10 14:36:39 +02:00
slang Update sv-elab to 3dddccd 2026-07-15 08:24:46 +02:00
verific Remove trailing whitespaces 2026-06-23 07:24:59 +02:00
verilog End of file fix 2026-06-23 07:23:41 +02:00
CMakeLists.txt Use system libs when available 2026-07-13 15:26:00 +02:00