Repository navigation
synth: delete make memory, mem_dump.py and mem.json #4750
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
maliberty
merged 6 commits into
The-OpenROAD-Project:master
from
oharboe:retire-mem-dump
Nov 6, 2026
+154
−264
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
88c0590
synth: remove obsolete make memory report and clean up code
oharboe 13eaa5e
Merge branch 'master' into retire-mem-dump
oharboe d7867ca
synth: test_memory_max_bits checks the error is there before parsing it
oharboe f6809ac
Merge branch 'master' into retire-mem-dump
oharboe 28acb49
Merge origin/master into retire-mem-dump
oharboe a5f4ccf
Merge branch 'master' of https://github.com/The-OpenROAD-Project/Open…
oharboe File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| # Log every inferred memory with its dimensions. With mock set, shrink each | ||
| # memory over max_bits to one row, kept as a module when keep_mocked is set; | ||
| # otherwise stop with an error naming every memory over max_bits that has a | ||
| # write port. Returns the mocked memories as a list of {module width size}. | ||
| proc synth_memory_max_bits { max_bits mock keep_mocked } { | ||
| memory_collect | ||
| set mocked {} | ||
| set over {} | ||
| foreach path [split [string trim [tee -q -s result.string select -list t:\$mem_v2]] "\n"] { | ||
| set index [string first "/" $path] | ||
| set module [string range $path 0 [expr { $index - 1 }]] | ||
| set instance [string range $path [expr { $index + 1 }] end] | ||
|
|
||
| set width [rtlil::get_param -uint $module $instance WIDTH] | ||
| set size [rtlil::get_param -uint $module $instance SIZE] | ||
| set rom [expr { [rtlil::get_param -uint $module $instance WR_PORTS] == 0 }] | ||
| set nbits [expr { $width * $size }] | ||
| puts "Memory $path has dimensions $size x $width = $nbits[expr { $rom ? ", a ROM" : "" }]" | ||
| if { $nbits <= $max_bits } { | ||
| continue | ||
| } | ||
| if { $mock } { | ||
| rtlil::set_param -uint $module $instance SIZE 1 | ||
| puts "Shrunk memory $path from $size rows to 1" | ||
| lappend mocked [list $module $width $size] | ||
| if { $keep_mocked } { | ||
| select -module $module | ||
| setattr -mod -set keep_hierarchy 1 | ||
| select -clear | ||
| } | ||
| } elseif { !$rom } { | ||
| lappend over "$path $size x $width = $nbits" | ||
| } | ||
| } | ||
| if { [llength $over] > 0 } { | ||
| error "Memories over SYNTH_MEMORY_MAX_BITS=$max_bits, which would go into\ | ||
| flip-flops: [join $over {, }]. Put them in macros (AUTO_MEMORIES,\ | ||
| fakeram), mock them (SYNTH_MOCK_LARGE_MEMORIES=1) or raise the limit." | ||
| } | ||
| return $mocked | ||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.