Skip to content

Commit 418086a

Browse files
committed
synth: add SYNTH_INSBUF for parallel synthesis
Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com>
1 parent 59cfda0 commit 418086a

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,7 @@ configuration file.
249249
| <a name="SYNTH_HDL_FRONTEND"></a>SYNTH_HDL_FRONTEND| Select an alternative language frontend to ingest the design. Available option is "slang". If the variable is empty, design is read with the Yosys read_verilog command.| |
250250
| <a name="SYNTH_HIERARCHICAL"></a>SYNTH_HIERARCHICAL| Enable to Synthesis hierarchically, otherwise considered flat synthesis.| 0|
251251
| <a name="SYNTH_HIER_SEPARATOR"></a>SYNTH_HIER_SEPARATOR| Separator used for the synthesis flatten stage.| .|
252+
| <a name="SYNTH_INSBUF"></a>SYNTH_INSBUF| Insert input buffers on top-level input ports during synthesis. Useful to disable when doing parallel synthesis and concatenating netlists later as we're generating netlists of submodules.| 1|
252253
| <a name="SYNTH_KEEP_MOCKED_MEMORIES"></a>SYNTH_KEEP_MOCKED_MEMORIES| When `SYNTH_MOCK_LARGE_MEMORIES=1`, setting this to 1, will keep mocked memories (not flattening them). This preserves some of the access logic complexity and avoids optimizations outside of the mocked memory.| 1|
253254
| <a name="SYNTH_KEEP_MODULES"></a>SYNTH_KEEP_MODULES| Mark modules to keep from getting removed in flattening.| |
254255
| <a name="SYNTH_MEMORY_MAX_BITS"></a>SYNTH_MEMORY_MAX_BITS| Maximum number of bits for memory synthesis. Ideally, real RAM or realistic fakeram should be used for RAMs much larger than 1024 bits. To temporarily ignore the RAM concerns and investigate other aspects of the design, consider setting `SYNTH_MOCK_LARGE_MEMORIES=1`, or adjusting `SYNTH_MEMORY_MAX_BITS`.| 4096|
@@ -296,6 +297,7 @@ configuration file.
296297
- [SYNTH_HDL_FRONTEND](#SYNTH_HDL_FRONTEND)
297298
- [SYNTH_HIERARCHICAL](#SYNTH_HIERARCHICAL)
298299
- [SYNTH_HIER_SEPARATOR](#SYNTH_HIER_SEPARATOR)
300+
- [SYNTH_INSBUF](#SYNTH_INSBUF)
299301
- [SYNTH_KEEP_MOCKED_MEMORIES](#SYNTH_KEEP_MOCKED_MEMORIES)
300302
- [SYNTH_KEEP_MODULES](#SYNTH_KEEP_MODULES)
301303
- [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS)

flow/scripts/synth.tcl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -218,8 +218,10 @@ hilomap -singleton \
218218
-hicell {*}$::env(TIEHI_CELL_AND_PORT) \
219219
-locell {*}$::env(TIELO_CELL_AND_PORT)
220220

221-
# Insert buffer cells for pass through wires
222-
insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS)
221+
if { $::env(SYNTH_INSBUF) } {
222+
# Insert buffer cells for pass through wires
223+
insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS)
224+
}
223225

224226
# Reports
225227
tee -o $::env(REPORTS_DIR)/synth_check.txt check

flow/scripts/variables.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,16 @@ SYNTH_REPEATABLE_BUILD:
305305
stages:
306306
- synth
307307
default: 0
308+
SYNTH_INSBUF:
309+
description: >
310+
Insert input buffers on top-level input ports during synthesis.
311+
312+
Useful to disable when doing parallel synthesis and
313+
concatenating netlists later as we're generating netlists
314+
of submodules.
315+
stages:
316+
- synth
317+
default: 1
308318
DFF_MAP_FILE:
309319
description: |
310320
Optional mapping file supplied to Yosys to map D flip-flops

0 commit comments

Comments
 (0)