Skip to content

Commit bf47644

Browse files
committed
lint nits
Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 04bae58 commit bf47644

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ configuration file.
245245
| <a name="SYNTH_KEEP_MODULES"></a>SYNTH_KEEP_MODULES| Mark modules to keep from getting removed in flattening.| |
246246
| <a name="SYNTH_MEMORY_MAX_BITS"></a>SYNTH_MEMORY_MAX_BITS| Maximum number of bits for memory synthesis.| 4096|
247247
| <a name="SYNTH_MINIMUM_KEEP_SIZE"></a>SYNTH_MINIMUM_KEEP_SIZE| For hierarchical synthesis, we keep modules of larger area than given by this variable and flatten smaller modules. The area unit used is the size of a basic nand2 gate from the platform's standard cell library. The default value is platform specific.| 0|
248+
| <a name="SYNTH_MOCK_LARGE_MEMORIES"></a>SYNTH_MOCK_LARGE_MEMORIES| Reduce memories larger than SYNTH_MEMORY_MAX_BITS to 1 row. This is useful to separate the concern of instantiating and placing memories from investigating other issues with a design. Memories with a single 1 row will of course have unrealistically good timing and area characteristics, but timing will still correctly terminate in a register. Also, large port memories, typically register files, will still have the retain a lot of the port logic that can be useful to investigate issues.| 0|
248249
| <a name="SYNTH_NETLIST_FILES"></a>SYNTH_NETLIST_FILES| Skips synthesis and uses the supplied netlist files. If the netlist files contains duplicate modules, which can happen when using hierarchical synthesis on indvidual netlist files and combining here, subsequent modules are silently ignored and only the first module is used.| |
249250
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| |
250251
| <a name="SYNTH_RETIME_MODULES"></a>SYNTH_RETIME_MODULES| *This is an experimental option and may cause adverse effects.* *No effort has been made to check if the retimed RTL is logically equivalent to the non-retimed RTL.* List of modules to apply automatic retiming to. These modules must not get dissolved and as such they should either be the top module or be included in SYNTH_KEEP_MODULES. The main use case is to quickly identify if performance can be improved by manually retiming the input RTL. Retiming will treat module ports like register endpoints/startpoints. The objective function of retiming isn't informed by SDC, even the clock period is ignored. As such, retiming will optimize for best delay at potentially high register number cost. Automatic retiming can produce suboptimal results as its timing model is crude and it doesn't find the optimal distribution of registers on long pipelines. See OR discussion #8080.| |
@@ -284,6 +285,7 @@ configuration file.
284285
- [SYNTH_KEEP_MODULES](#SYNTH_KEEP_MODULES)
285286
- [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS)
286287
- [SYNTH_MINIMUM_KEEP_SIZE](#SYNTH_MINIMUM_KEEP_SIZE)
288+
- [SYNTH_MOCK_LARGE_MEMORIES](#SYNTH_MOCK_LARGE_MEMORIES)
287289
- [SYNTH_NETLIST_FILES](#SYNTH_NETLIST_FILES)
288290
- [SYNTH_OPT_HIER](#SYNTH_OPT_HIER)
289291
- [SYNTH_RETIME_MODULES](#SYNTH_RETIME_MODULES)

flow/scripts/synth.tcl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ if { $::env(SYNTH_MOCK_LARGE_MEMORIES) } {
6161
set select [tee -q -s result.string select -list t:\$mem_v2]
6262
foreach path [split [string trim $select] "\n"] {
6363
set index [string first "/" $path]
64-
set module [string range $path 0 [expr {$index - 1}]]
65-
set instance [string range $path [expr {$index + 1}] end]
64+
set module [string range $path 0 [expr { $index - 1 }]]
65+
set instance [string range $path [expr { $index + 1 }] end]
6666

6767
set width [rtlil::get_param -uint $module $instance WIDTH]
6868
set size [rtlil::get_param -uint $module $instance SIZE]
6969
set nbits [expr $width * $size]
7070
puts "Memory $path has dimensions $size x $width = $nbits"
71-
if {$nbits > $::env(SYNTH_MEMORY_MAX_BITS)} {
71+
if { $nbits > $::env(SYNTH_MEMORY_MAX_BITS) } {
7272
rtlil::set_param -uint $module $instance SIZE 1
7373
puts "Shrunk memory $path from $size rows to 1"
7474
}

0 commit comments

Comments
 (0)