diff --git a/flow/scripts/memories/extract_memories.tcl b/flow/scripts/memories/extract_memories.tcl index 1bf12eff30..18e5c23717 100644 --- a/flow/scripts/memories/extract_memories.tcl +++ b/flow/scripts/memories/extract_memories.tcl @@ -4,14 +4,25 @@ source $::env(SCRIPTS_DIR)/synth_preamble.tcl +# This pass runs before gen_memories.py, so results/memories/blackboxes.txt +# does not exist yet and there is nothing to blackbox: this is the pass +# whose output that list is derived from. read_design_sources consults +# auto_memories_blackboxes in every frontend branch, and that proc errors +# out when the file is absent, so reading the sources with AUTO_MEMORIES +# still set fails the step that has to run first. Clear it for this +# process only; the guard keeps its strength for synthesis. +set ::env(AUTO_MEMORIES) 0 + # Read all RTL sources using active frontend (all frontends) read_design_sources # Elaborate hierarchy hierarchy -top $::env(DESIGN_NAME) -# Run process execution and memory collection -proc +# Run process execution and memory collection. `yosys proc` rather than +# bare `proc`: yosys -import cannot shadow Tcl's proc keyword, so the +# bare word would define a procedure instead of running the pass. +yosys proc memory -nomap # Write netlist JSON containing inferred $mem_v2 primitives