From 770502ab4928cacd2536419a42586ae67b23f429 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Wed, 7 Jan 2026 23:22:56 +0100 Subject: [PATCH 1/2] slang: add a SYNTH_BLACKBOXES syntax check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non-existand verilog modules should be ignored to be compartible with Yosys. Signed-off-by: Øyvind Harboe --- flow/designs/asap7/uart/config.mk | 3 +++ 1 file changed, 3 insertions(+) diff --git a/flow/designs/asap7/uart/config.mk b/flow/designs/asap7/uart/config.mk index 4b36007d47..81a0ed0631 100644 --- a/flow/designs/asap7/uart/config.mk +++ b/flow/designs/asap7/uart/config.mk @@ -5,6 +5,9 @@ export DESIGN_NAME = uart export VERILOG_FILES = $(sort $(wildcard $(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/*.v)) export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc +# Exercise syntax on command line for a dummy module and +# check that non-existant modules are silently ignored. +export SYNTH_BLACKBOXES = dummy export PLACE_DENSITY = 0.70 export DIE_AREA = 0 0 17 17 From b69923d12e60b7eee889e514371cfcef2540659f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Wed, 7 Jan 2026 23:22:56 +0100 Subject: [PATCH 2/2] slang: add a SYNTH_BLACKBOXES syntax check, part II MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Non-existand verilog modules should be ignored to be compartible with Yosys. Signed-off-by: Øyvind Harboe --- docs/user/FlowVariables.md | 2 +- flow/designs/asap7/uart/config.mk | 4 ++-- flow/scripts/variables.yaml | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 841c12d07e..34c1aa7758 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -241,7 +241,7 @@ configuration file. | 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.| | -| SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design.| | +| SYNTH_BLACKBOXES| List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design. Non-existant modules are ignored silently, useful when listing modules statically, even if modules come and go dynamically.| | | SYNTH_CANONICALIZE_TCL| Specifies a Tcl script with commands to run as part of the synth canonicalize step.| | | SYNTH_GUT| Load design and remove all internal logic before doing synthesis. This is useful when creating a mock .lef abstract that has a smaller area than the amount of logic would allow. bazel-orfs uses this to mock SRAMs, for instance.| 0| | 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.| | diff --git a/flow/designs/asap7/uart/config.mk b/flow/designs/asap7/uart/config.mk index 81a0ed0631..4ff340d770 100644 --- a/flow/designs/asap7/uart/config.mk +++ b/flow/designs/asap7/uart/config.mk @@ -5,8 +5,8 @@ export DESIGN_NAME = uart export VERILOG_FILES = $(sort $(wildcard $(DESIGN_HOME)/src/$(DESIGN_NICKNAME)/*.v)) export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint.sdc -# Exercise syntax on command line for a dummy module and -# check that non-existant modules are silently ignored. +# Smoke test for the option; doesn't do anything as the named +# module does not exist export SYNTH_BLACKBOXES = dummy export PLACE_DENSITY = 0.70 diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index bc6a6188f1..bf889978f9 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -255,6 +255,9 @@ SYNTH_BLACKBOXES: description: > List of cells treated as a black box by Yosys. With Bazel, this can be used to run synthesis in parallel for the large modules of the design. + + Non-existant modules are ignored silently, useful when listing modules + statically, even if modules come and go dynamically. stages: - synth SYNTH_NETLIST_FILES: