Skip to content

Commit c5dd9be

Browse files
oharboeclaude
andcommitted
AUTO_MEMORIES_REGFILES: inline a register file in place of a parameterized module
An inlined register file's generated netlist has no parameters; a parameterized RTL module (ibex_register_file_ff #(RV32E, DataWidth, DummyInstructions)) is instantiated with them, and hierarchy refused: "does not have a parameter named ...". The netlist is the module at the widths generate_regfile's port check confirmed, so the parameters are dropped from its instances before it is read. Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 178c0ff commit c5dd9be

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎flow/scripts/synth_preamble.tcl‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,15 @@ proc auto_memories_inline { } {
8181

8282
proc read_auto_memories_inline { } {
8383
foreach m [auto_memories_inline] {
84+
# A parameterized RTL module (ibex_register_file_ff #(...)) is
85+
# instantiated with parameters the generated netlist has no
86+
# declaration for, which hierarchy refuses. The netlist is that module
87+
# at the instance's widths, as generate_regfile's port check has
88+
# confirmed: drop the parameters from its instances.
89+
set dump [tee -q -s result.string dump t:$m]
90+
foreach {- name} [regexp -all -inline -- {parameter \\(\S+)} $dump] {
91+
setparam -unset $name t:$m
92+
}
8493
read_verilog -overwrite "$::env(RESULTS_DIR)/memories/$m.v"
8594
}
8695
}

0 commit comments

Comments
 (0)