Skip to content

Commit dba71f5

Browse files
authored
Merge pull request #4131 from oharboe/slang-plugin-path
Support SLANG_PLUGIN_PATH env var for custom slang plugin location
2 parents 2453de8 + 7125f81 commit dba71f5

3 files changed

Lines changed: 10 additions & 1 deletion

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,7 @@ configuration file.
273273
| <a name="SKIP_REPAIR_TIE_FANOUT"></a>SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0|
274274
| <a name="SKIP_REPORT_METRICS"></a>SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0|
275275
| <a name="SKIP_VT_SWAP"></a>SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| |
276+
| <a name="SLANG_PLUGIN_PATH"></a>SLANG_PLUGIN_PATH| Path to the slang plugin for Yosys. This can be a full path to a custom-built plugin (e.g. for Bazel builds) or just the plugin name.| slang|
276277
| <a name="SLEW_MARGIN"></a>SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| |
277278
| <a name="SWAP_ARITH_OPERATORS"></a>SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| |
278279
| <a name="SYNTH_ARGS"></a>SYNTH_ARGS| Optional synthesis variables for yosys.| |
@@ -326,6 +327,7 @@ configuration file.
326327
- [PRE_SYNTH_TCL](#PRE_SYNTH_TCL)
327328
- [SDC_FILE](#SDC_FILE)
328329
- [SDC_GUT](#SDC_GUT)
330+
- [SLANG_PLUGIN_PATH](#SLANG_PLUGIN_PATH)
329331
- [SYNTH_ARGS](#SYNTH_ARGS)
330332
- [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES)
331333
- [SYNTH_CANONICALIZE_TCL](#SYNTH_CANONICALIZE_TCL)

‎flow/scripts/synth_preamble.tcl‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ proc read_design_sources { } {
4444
}
4545

4646
if { [env_var_equals SYNTH_HDL_FRONTEND slang] } {
47-
plugin -i slang
47+
plugin -i $::env(SLANG_PLUGIN_PATH)
4848

4949
set slang_args [list \
5050
-D SYNTHESIS --keep-hierarchy --compat=vcs --ignore-assertions --top $::env(DESIGN_NAME) \

‎flow/scripts/variables.yaml‎

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,13 @@ SYNTH_HDL_FRONTEND:
238238
command.
239239
stages:
240240
- synth
241+
SLANG_PLUGIN_PATH:
242+
description: >
243+
Path to the slang plugin for Yosys. This can be a full path to a
244+
custom-built plugin (e.g. for Bazel builds) or just the plugin name.
245+
default: slang
246+
stages:
247+
- synth
241248
SYNTH_SLANG_ARGS:
242249
description: >
243250
Additional arguments passed to the slang frontend during synthesis.

0 commit comments

Comments
 (0)