diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 7a7c3e222b..efa579d686 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -273,6 +273,7 @@ configuration file. | SKIP_REPAIR_TIE_FANOUT| Skip repair_tie_fanout at floorplan step.| 0| | SKIP_REPORT_METRICS| If set to 1, then metrics, report_metrics does nothing. Useful to speed up builds.| 0| | SKIP_VT_SWAP| Do not perform VT swap to improve QoR (default: do VT swap).| | +| 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| | SLEW_MARGIN| Specifies a slew margin when fixing max slew violations. This option allows you to overfix.| | | SWAP_ARITH_OPERATORS| Improve timing QoR by swapping ALU and MULT arithmetic operators.| | | SYNTH_ARGS| Optional synthesis variables for yosys.| | @@ -326,6 +327,7 @@ configuration file. - [PRE_SYNTH_TCL](#PRE_SYNTH_TCL) - [SDC_FILE](#SDC_FILE) - [SDC_GUT](#SDC_GUT) +- [SLANG_PLUGIN_PATH](#SLANG_PLUGIN_PATH) - [SYNTH_ARGS](#SYNTH_ARGS) - [SYNTH_BLACKBOXES](#SYNTH_BLACKBOXES) - [SYNTH_CANONICALIZE_TCL](#SYNTH_CANONICALIZE_TCL) diff --git a/flow/scripts/synth_preamble.tcl b/flow/scripts/synth_preamble.tcl index 3edee2d454..af43512c0f 100644 --- a/flow/scripts/synth_preamble.tcl +++ b/flow/scripts/synth_preamble.tcl @@ -44,7 +44,7 @@ proc read_design_sources { } { } if { [env_var_equals SYNTH_HDL_FRONTEND slang] } { - plugin -i slang + plugin -i $::env(SLANG_PLUGIN_PATH) set slang_args [list \ -D SYNTHESIS --keep-hierarchy --compat=vcs --ignore-assertions --top $::env(DESIGN_NAME) \ diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index fdf068ba83..cf99a5fac5 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -238,6 +238,13 @@ SYNTH_HDL_FRONTEND: command. stages: - synth +SLANG_PLUGIN_PATH: + description: > + 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. + default: slang + stages: + - synth SYNTH_SLANG_ARGS: description: > Additional arguments passed to the slang frontend during synthesis.