Skip to content

Commit 142751d

Browse files
committed
slang: add SYNTH_SLANG_ARGS
fixes #3644 Signed-off-by: Øyvind Harboe <[email protected]>
1 parent 2b52c77 commit 142751d

File tree

3 files changed

+9
-1
lines changed

3 files changed

+9
-1
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,7 @@ configuration file.
248248
| <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.| |
249249
| <a name="SYNTH_OPT_HIER"></a>SYNTH_OPT_HIER| Optimize constants across hierarchical boundaries.| |
250250
| <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.| |
251+
| <a name="SYNTH_SLANG_ARGS"></a>SYNTH_SLANG_ARGS| Additional arguments passed to the slang frontend during synthesis.| |
251252
| <a name="SYNTH_WRAPPED_ADDERS"></a>SYNTH_WRAPPED_ADDERS| Specify the adder modules that can be used for synthesis, separated by commas. The default adder module is determined by the first element of this variable.| |
252253
| <a name="SYNTH_WRAPPED_MULTIPLIERS"></a>SYNTH_WRAPPED_MULTIPLIERS| Specify the multiplier modules that can be used for synthesis, separated by commas. The default multiplier module is determined by the first element of this variable.| |
253254
| <a name="SYNTH_WRAPPED_OPERATORS"></a>SYNTH_WRAPPED_OPERATORS| Synthesize multiple architectural options for each arithmetic operator in the design. These options are available for switching among in later stages of the flow.| |
@@ -287,6 +288,7 @@ configuration file.
287288
- [SYNTH_NETLIST_FILES](#SYNTH_NETLIST_FILES)
288289
- [SYNTH_OPT_HIER](#SYNTH_OPT_HIER)
289290
- [SYNTH_RETIME_MODULES](#SYNTH_RETIME_MODULES)
291+
- [SYNTH_SLANG_ARGS](#SYNTH_SLANG_ARGS)
290292
- [SYNTH_WRAPPED_ADDERS](#SYNTH_WRAPPED_ADDERS)
291293
- [SYNTH_WRAPPED_MULTIPLIERS](#SYNTH_WRAPPED_MULTIPLIERS)
292294
- [TIEHI_CELL_AND_PORT](#TIEHI_CELL_AND_PORT)

flow/scripts/synth_preamble.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ proc read_design_sources { } {
4747
# slang requires all files at once
4848
plugin -i slang
4949
yosys read_slang -D SYNTHESIS --keep-hierarchy --compat=vcs \
50-
--ignore-assertions --no-implicit-memories --top $::env(DESIGN_NAME) \
50+
--ignore-assertions {*}$::env(SYNTH_SLANG_ARGS) --top $::env(DESIGN_NAME) \
5151
{*}$vIdirsArgs {*}$::env(VERILOG_FILES) {*}[env_var_or_empty VERILOG_DEFINES]
5252
# Workaround for yosys-slang#119
5353
setattr -unset init

flow/scripts/variables.yaml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ SYNTH_HDL_FRONTEND:
184184
command.
185185
stages:
186186
- synth
187+
SYNTH_SLANG_ARGS:
188+
description: >
189+
Additional arguments passed to the slang frontend during synthesis.
190+
stages:
191+
- synth
192+
default: ""
187193
SYNTH_BLACKBOXES:
188194
description: >
189195
List of cells treated as a black box by Yosys. With Bazel, this can be used

0 commit comments

Comments
 (0)