Skip to content

[FIRRTL] Emit memory initialization metadata#9974

Open
fzi-hielscher wants to merge 5 commits intollvm:mainfrom
fzi-hielscher:init-metadata-rebased
Open

[FIRRTL] Emit memory initialization metadata#9974
fzi-hielscher wants to merge 5 commits intollvm:mainfrom
fzi-hielscher:init-metadata-rebased

Conversation

@fzi-hielscher
Copy link
Copy Markdown
Contributor

Preserve the MemoryInitAttr when lowering firrtl.mem to firrtl.memmodule and emit the contained information during CreateSiFiveMetadata when using --repl-seq-mem. The attribute's filename, isBinary and isInline fields are forwarded to the OM and JSON output. The respective memory's line in the plain text output is appended with init-bin {filename} or init-hex {filename}, depending on the isBinary field. Note that the added information might break existing (legacy?) Chisel to Verilog flows if they are parsing the text file.

Late follow-up to #8604, should fix #9959.

@fzi-hielscher fzi-hielscher added the FIRRTL Involving the `firrtl` dialect label Mar 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FIRRTL Involving the `firrtl` dialect

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[firtool][repl-seq-mem] firtool --repl-seq-mem drops loadMemoryFromFileInline initialization metadata from companion output

1 participant