Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions flow/scripts/memories/extract_memories.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading