From 418086a80b51a5c2abcaefbda3dcf6c1a4c88ea1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Fri, 23 Jan 2026 05:58:50 +0100 Subject: [PATCH] synth: add SYNTH_INSBUF for parallel synthesis MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Øyvind Harboe --- docs/user/FlowVariables.md | 2 ++ flow/scripts/synth.tcl | 6 ++++-- flow/scripts/variables.yaml | 10 ++++++++++ 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 9ef2d66264..59d919b223 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -249,6 +249,7 @@ configuration file. | 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.| | | SYNTH_HIERARCHICAL| Enable to Synthesis hierarchically, otherwise considered flat synthesis.| 0| | SYNTH_HIER_SEPARATOR| Separator used for the synthesis flatten stage.| .| +| 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| | 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| | SYNTH_KEEP_MODULES| Mark modules to keep from getting removed in flattening.| | | 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. - [SYNTH_HDL_FRONTEND](#SYNTH_HDL_FRONTEND) - [SYNTH_HIERARCHICAL](#SYNTH_HIERARCHICAL) - [SYNTH_HIER_SEPARATOR](#SYNTH_HIER_SEPARATOR) +- [SYNTH_INSBUF](#SYNTH_INSBUF) - [SYNTH_KEEP_MOCKED_MEMORIES](#SYNTH_KEEP_MOCKED_MEMORIES) - [SYNTH_KEEP_MODULES](#SYNTH_KEEP_MODULES) - [SYNTH_MEMORY_MAX_BITS](#SYNTH_MEMORY_MAX_BITS) diff --git a/flow/scripts/synth.tcl b/flow/scripts/synth.tcl index 0af28bd055..8554f6d61c 100644 --- a/flow/scripts/synth.tcl +++ b/flow/scripts/synth.tcl @@ -218,8 +218,10 @@ hilomap -singleton \ -hicell {*}$::env(TIEHI_CELL_AND_PORT) \ -locell {*}$::env(TIELO_CELL_AND_PORT) -# Insert buffer cells for pass through wires -insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS) +if { $::env(SYNTH_INSBUF) } { + # Insert buffer cells for pass through wires + insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS) +} # Reports tee -o $::env(REPORTS_DIR)/synth_check.txt check diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 9e5208f529..9483713f27 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -305,6 +305,16 @@ SYNTH_REPEATABLE_BUILD: stages: - synth default: 0 +SYNTH_INSBUF: + description: > + 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. + stages: + - synth + default: 1 DFF_MAP_FILE: description: | Optional mapping file supplied to Yosys to map D flip-flops