From eaeb822714109b261937d1c90a725db87922eb70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Mon, 30 Mar 2026 21:58:08 +0200 Subject: [PATCH 1/2] fix: use DESIGN_DIR instead of custom dir variables in chameleon/microwatt MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit DESIGN_DIR is already defined in the Makefile as $(dir $(DESIGN_CONFIG)). These two designs defined redundant custom variables (chameleon_DIR, microwatt_DIR) that were identical to DESIGN_DIR. Use the standard variable to simplify config and remove non-standard patterns. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Øyvind Harboe --- flow/designs/sky130hd/chameleon/config.mk | 21 ++++++++++----------- flow/designs/sky130hd/microwatt/config.mk | 8 +++----- 2 files changed, 13 insertions(+), 16 deletions(-) diff --git a/flow/designs/sky130hd/chameleon/config.mk b/flow/designs/sky130hd/chameleon/config.mk index 0a1b11aa9e..2048ec0f03 100644 --- a/flow/designs/sky130hd/chameleon/config.mk +++ b/flow/designs/sky130hd/chameleon/config.mk @@ -33,20 +33,19 @@ export CORE_UTILIZATION = 70 export CORE_ASPECT_RATIO = 1.3 export CORE_MARGIN = 2 -export chameleon_DIR = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME) -export LEC_AUX_VERILOG_FILES = $(chameleon_DIR)/lec_blackbox_stubs.v +export LEC_AUX_VERILOG_FILES = $(DESIGN_DIR)/lec_blackbox_stubs.v -export ADDITIONAL_GDS = $(chameleon_DIR)/gds/apb_sys_0.gds.gz \ - $(chameleon_DIR)/gds/DMC_32x16HC.gds.gz \ - $(chameleon_DIR)/gds/DFFRAM_4K.gds.gz \ - $(chameleon_DIR)/gds/ibex_wrapper.gds.gz +export ADDITIONAL_GDS = $(DESIGN_DIR)/gds/apb_sys_0.gds.gz \ + $(DESIGN_DIR)/gds/DMC_32x16HC.gds.gz \ + $(DESIGN_DIR)/gds/DFFRAM_4K.gds.gz \ + $(DESIGN_DIR)/gds/ibex_wrapper.gds.gz -export ADDITIONAL_LEFS = $(chameleon_DIR)/lef/apb_sys_0.lef \ - $(chameleon_DIR)/lef/DFFRAM_4K.lef \ - $(chameleon_DIR)/lef/DMC_32x16HC.lef \ - $(chameleon_DIR)/lef/ibex_wrapper.lef +export ADDITIONAL_LEFS = $(DESIGN_DIR)/lef/apb_sys_0.lef \ + $(DESIGN_DIR)/lef/DFFRAM_4K.lef \ + $(DESIGN_DIR)/lef/DMC_32x16HC.lef \ + $(DESIGN_DIR)/lef/ibex_wrapper.lef -#export MACRO_PLACEMENT_TCL = $(chameleon_DIR)/macro_placement.tcl +#export MACRO_PLACEMENT_TCL = $(DESIGN_DIR)/macro_placement.tcl export FP_PDN_RAIL_WIDTH = 0.48 export FP_PDN_RAIL_OFFSET = 0 diff --git a/flow/designs/sky130hd/microwatt/config.mk b/flow/designs/sky130hd/microwatt/config.mk index 6a2021c3f5..e6cc7dfe74 100644 --- a/flow/designs/sky130hd/microwatt/config.mk +++ b/flow/designs/sky130hd/microwatt/config.mk @@ -11,13 +11,11 @@ export SDC_FILE = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME)/constraint. export DIE_AREA = 0 0 3020 3610 export CORE_AREA = 10 10 3010 3600 -export microwatt_DIR = $(DESIGN_HOME)/$(PLATFORM)/$(DESIGN_NICKNAME) +export ADDITIONAL_GDS = $(wildcard $(DESIGN_DIR)/gds/*.gds.gz) -export ADDITIONAL_GDS = $(wildcard $(microwatt_DIR)/gds/*.gds.gz) +export ADDITIONAL_LEFS = $(wildcard $(DESIGN_DIR)/lef/*.lef) -export ADDITIONAL_LEFS = $(wildcard $(microwatt_DIR)/lef/*.lef) - -export ADDITIONAL_LIBS = $(wildcard $(microwatt_DIR)/lib/*.lib) +export ADDITIONAL_LIBS = $(wildcard $(DESIGN_DIR)/lib/*.lib) export SYNTH_HIERARCHICAL = 1 From dc44f643a7bf47e8172bf2abc5bc0e8d72ce46f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=98yvind=20Harboe?= Date: Wed, 1 Apr 2026 06:09:36 +0200 Subject: [PATCH 2/2] fix: strip trailing slash from DESIGN_DIR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit $(dir ...) in GNU Make always appends a trailing slash, so DESIGN_DIR ended up as e.g. ".../chameleon/". When config.mk files use $(DESIGN_DIR)/gds/file.gds, this produced paths with "//" instead of "/". Mind-bogglingly, this was the only difference we could find that caused CI metric failures (antenna_diodes_count) in PR #4080. Strip the trailing slash with $(patsubst %/,%,...) so that replacing custom _DIR variables with DESIGN_DIR is a true no-op. Co-Authored-By: Claude Opus 4.6 (1M context) Signed-off-by: Øyvind Harboe --- flow/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/flow/Makefile b/flow/Makefile index 7bccdc8307..462d37bb04 100644 --- a/flow/Makefile +++ b/flow/Makefile @@ -88,7 +88,7 @@ DESIGN_CONFIG ?= ./designs/nangate45/gcd/config.mk export DESIGN_CONFIG include $(DESIGN_CONFIG) -export DESIGN_DIR ?= $(dir $(DESIGN_CONFIG)) +export DESIGN_DIR ?= $(patsubst %/,%,$(dir $(DESIGN_CONFIG))) # default value "base" for FLOW_VARIANT and "." for WORK_HOME are duplicated # from variables.yaml and variables.mk because we need it