From b9ce1adf0e817f01df54f44f8916bac8f61030bb Mon Sep 17 00:00:00 2001 From: Zheng Zhang Date: Wed, 30 Sep 2026 18:06:40 +0800 Subject: [PATCH 1/2] synth: drop the ABC delay target that never reached ABC Yosys uses abc -D only to fill in {D} in the script it writes for ABC; for "abc -script " it writes "source " instead, so the clock period has not reached ABC since b9c1485f9 and synthesis is already clock-agnostic. Remove the -D argument, the "Setting clock period" log line, clock_period.txt and its make rule (no longer a Yosys dependency) and the SDC period extraction in variables.mk and ihp-sg13g2. Mark ABC_CLOCK_PERIOD_IN_PS deprecated and drop its gf12 bp_* settings. Netlists are unchanged; a clock-only SDC change no longer re-runs Yosys. Signed-off-by: Zheng Zhang --- docs/user/FlowVariables.md | 2 +- flow/Makefile | 9 --------- flow/designs/gf12/bp_dual/config.mk | 2 -- flow/designs/gf12/bp_quad/config.mk | 2 -- flow/designs/gf12/bp_single/config.mk | 2 -- flow/platforms/ihp-sg13g2/config.mk | 6 ------ flow/scripts/synth_preamble.tcl | 11 ----------- flow/scripts/variables.json | 3 ++- flow/scripts/variables.mk | 10 +--------- flow/scripts/variables.yaml | 5 +++-- 10 files changed, 7 insertions(+), 45 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 01afb784f3..2c9c90dcc7 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -91,7 +91,7 @@ configuration file. | Variable | Description | Default | | --- | --- | --- | | ABC_AREA| Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED.| 0| -| ABC_CLOCK_PERIOD_IN_PS| Clock period to be used by STA during synthesis. Default value read from `constraint.sdc`.| | +| ABC_CLOCK_PERIOD_IN_PS (deprecated)| Not used: Yosys and ABC do not use a clock period. Timing is handled by the steps after synthesis, using the clock in the SDC file.| | | ABC_DRIVER_CELL| Default driver cell used during ABC synthesis.| | | ABC_LOAD_IN_FF| During synthesis set_load value used.| | | ABSTRACT_SOURCE| Which .odb file to use to create abstract| | diff --git a/flow/Makefile b/flow/Makefile index b331a691cd..ab64f0087f 100644 --- a/flow/Makefile +++ b/flow/Makefile @@ -254,14 +254,6 @@ memory: # Run Synthesis using yosys #------------------------------------------------------------------------------- -$(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE) - $(UNSET_AND_MAKE) do-sdc-clock-period - -.PHONY: do-sdc-clock-period -do-sdc-clock-period: - mkdir -p $(dir $(SDC_FILE_CLOCK_PERIOD)) - echo $(ABC_CLOCK_PERIOD_IN_PS) > $(SDC_FILE_CLOCK_PERIOD) - .PHONY: yosys-dependencies yosys-dependencies: $(YOSYS_DEPENDENCIES) @@ -316,7 +308,6 @@ clean_synth: rm -f $(REPORTS_DIR)/synth_* rm -f $(LOG_DIR)/1_* rm -f $(SYNTH_STATS) - rm -f $(SDC_FILE_CLOCK_PERIOD) # ============================================================================== # _____ _ ___ ___ ____ ____ _ _ _ _ diff --git a/flow/designs/gf12/bp_dual/config.mk b/flow/designs/gf12/bp_dual/config.mk index 3bad901297..ae0922f515 100644 --- a/flow/designs/gf12/bp_dual/config.mk +++ b/flow/designs/gf12/bp_dual/config.mk @@ -56,8 +56,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl export DIE_AREA = 0 0 3000 3000 export CORE_AREA = 200 200 2800 2800 -export ABC_CLOCK_PERIOD_IN_PS = 1250 - export TNS_END_PERCENT = 0 export PLACE_DENSITY = 0.50 diff --git a/flow/designs/gf12/bp_quad/config.mk b/flow/designs/gf12/bp_quad/config.mk index 4ac35f779f..73cc012626 100644 --- a/flow/designs/gf12/bp_quad/config.mk +++ b/flow/designs/gf12/bp_quad/config.mk @@ -58,8 +58,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl export DIE_AREA = 0 0 3000 3000 export CORE_AREA = 200 200 2800 2800 -export ABC_CLOCK_PERIOD_IN_PS = 1250 - export TNS_END_PERCENT = 0 export PLACE_DENSITY = 0.40 diff --git a/flow/designs/gf12/bp_single/config.mk b/flow/designs/gf12/bp_single/config.mk index bc678991ab..89f58bddd6 100644 --- a/flow/designs/gf12/bp_single/config.mk +++ b/flow/designs/gf12/bp_single/config.mk @@ -46,8 +46,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl export DIE_AREA = 0 0 3000 3000 export CORE_AREA = 200 200 2800 2800 -export ABC_CLOCK_PERIOD_IN_PS = 1250 - export PLACE_DENSITY = 0.80 export MACRO_WRAPPERS = $(PLATFORM_DIR)/bp/wrappers/wrappers.tcl diff --git a/flow/platforms/ihp-sg13g2/config.mk b/flow/platforms/ihp-sg13g2/config.mk index f13fe44b78..577d5c41ea 100644 --- a/flow/platforms/ihp-sg13g2/config.mk +++ b/flow/platforms/ihp-sg13g2/config.mk @@ -66,12 +66,6 @@ export CLKGATE_MAP_FILE = $(PLATFORM_DIR)/cells_clkgate.v # Define ABC driver and load export ABC_DRIVER_CELL = sg13g2_buf_4 export ABC_LOAD_IN_FF = 6.0 -ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined) - ifneq ($(wildcard $(SDC_FILE)),) - # Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file - export ABC_CLOCK_PERIOD_IN_PS ?= $(shell sed -nE "s/^set clk_period (.+)|.* -period (.+) .*/\1\2/p" $(SDC_FILE) | head -1 | awk '{print $$1*1000}') - endif -endif # ----------------------------------------------------- # Sizing diff --git a/flow/scripts/synth_preamble.tcl b/flow/scripts/synth_preamble.tcl index 14a9d70d7b..53353ee46a 100644 --- a/flow/scripts/synth_preamble.tcl +++ b/flow/scripts/synth_preamble.tcl @@ -216,17 +216,6 @@ if { [env_var_exists_and_non_empty DONT_USE_CELLS] } { set abc_args [list -script $abc_script \ {*}$lib_args {*}$lib_dont_use_args -constr $::env(OBJECTS_DIR)/abc.constr] -if { [env_var_exists_and_non_empty SDC_FILE_CLOCK_PERIOD] } { - puts "Extracting clock period from SDC file: $::env(SDC_FILE_CLOCK_PERIOD)" - set fp [open $::env(SDC_FILE_CLOCK_PERIOD) r] - set clock_period [string trim [read $fp]] - if { $clock_period != "" } { - puts "Setting clock period to $clock_period" - lappend abc_args -D $clock_period - } - close $fp -} - set constr [open $::env(OBJECTS_DIR)/abc.constr w] puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)" puts $constr "set_load $::env(ABC_LOAD_IN_FF)" diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index 1e3d6d01ab..ed9e4eeabf 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -7,7 +7,8 @@ ] }, "ABC_CLOCK_PERIOD_IN_PS": { - "description": "Clock period to be used by STA during synthesis. Default value read from `constraint.sdc`.\n", + "deprecated": 1, + "description": "Not used: Yosys and ABC do not use a clock period. Timing is handled by the steps after synthesis, using the clock in the SDC file.\n", "stages": [ "synth" ] diff --git a/flow/scripts/variables.mk b/flow/scripts/variables.mk index 6567737158..12d04265d2 100644 --- a/flow/scripts/variables.mk +++ b/flow/scripts/variables.mk @@ -174,9 +174,8 @@ export WRAP_CFG = $(PLATFORM_DIR)/wrapper.cfg export TCLLIBPATH := util/cell-veneer $(TCLLIBPATH) export SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl -export SDC_FILE_CLOCK_PERIOD = $(RESULTS_DIR)/clock_period.txt -export YOSYS_DEPENDENCIES=$(LIB_FILES) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) $(SDC_FILE_CLOCK_PERIOD) +export YOSYS_DEPENDENCIES=$(LIB_FILES) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) # Ubuntu 22.04 ships with older than 0.28.11, so support older versions # for a while still. @@ -214,13 +213,6 @@ endef export ISSUE_VARIABLES := $(foreach V, $(ISSUE_VARIABLES_NAMES), $(if $($V),$V=$($V),$V='')$(newline)) export COMMAND_LINE_ARGS := $(foreach V,$(.VARIABLES),$(if $(filter command% line, $(origin $V)),$(V))) -# Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file -ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined) - ifneq ($(wildcard $(SDC_FILE)),) - export ABC_CLOCK_PERIOD_IN_PS := $(shell sed -nE "s/^set\s+clk_period\s+(\S+).*|.*-period\s+(\S+).*/\1\2/p" $(SDC_FILE) | head -1 | awk '{print $$1}') - endif -endif - .PHONY: vars vars: mkdir -p $(OBJECTS_DIR) diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index 3c48319451..d3a61444d2 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -439,10 +439,11 @@ MIN_BUF_CELL_AND_PORTS: - synth ABC_CLOCK_PERIOD_IN_PS: description: > - Clock period to be used by STA during synthesis. Default value read from - `constraint.sdc`. + Not used: Yosys and ABC do not use a clock period. Timing is handled by + the steps after synthesis, using the clock in the SDC file. stages: - synth + deprecated: 1 ABC_DRIVER_CELL: description: | Default driver cell used during ABC synthesis. From 48cd025617898e98197f83808885f2bb091d1a23 Mon Sep 17 00:00:00 2001 From: Zheng Zhang Date: Thu, 1 Oct 2026 19:00:03 +0800 Subject: [PATCH 2/2] variables: remove ABC_CLOCK_PERIOD_IN_PS The variable has had no effect on synthesis, before and after the previous commit, so drop it rather than keeping it as deprecated: remove it from variables.yaml (and the generated variables.json and FlowVariables.md) and remove the genMassive.py sweep knob that wrote it into the generated config.mk files. Signed-off-by: Zheng Zhang --- docs/user/FlowVariables.md | 2 -- flow/scripts/variables.json | 7 ------- flow/scripts/variables.yaml | 7 ------- flow/util/genMassive.py | 9 +-------- 4 files changed, 1 insertion(+), 24 deletions(-) diff --git a/docs/user/FlowVariables.md b/docs/user/FlowVariables.md index 2c9c90dcc7..17460b3031 100644 --- a/docs/user/FlowVariables.md +++ b/docs/user/FlowVariables.md @@ -91,7 +91,6 @@ configuration file. | Variable | Description | Default | | --- | --- | --- | | ABC_AREA| Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED.| 0| -| ABC_CLOCK_PERIOD_IN_PS (deprecated)| Not used: Yosys and ABC do not use a clock period. Timing is handled by the steps after synthesis, using the clock in the SDC file.| | | ABC_DRIVER_CELL| Default driver cell used during ABC synthesis.| | | ABC_LOAD_IN_FF| During synthesis set_load value used.| | | ABSTRACT_SOURCE| Which .odb file to use to create abstract| | @@ -342,7 +341,6 @@ configuration file. ## synth variables - [ABC_AREA](#ABC_AREA) -- [ABC_CLOCK_PERIOD_IN_PS](#ABC_CLOCK_PERIOD_IN_PS) - [ABC_DRIVER_CELL](#ABC_DRIVER_CELL) - [ABC_LOAD_IN_FF](#ABC_LOAD_IN_FF) - [ADDER_MAP_FILE](#ADDER_MAP_FILE) diff --git a/flow/scripts/variables.json b/flow/scripts/variables.json index ed9e4eeabf..b0716c51be 100644 --- a/flow/scripts/variables.json +++ b/flow/scripts/variables.json @@ -6,13 +6,6 @@ "synth" ] }, - "ABC_CLOCK_PERIOD_IN_PS": { - "deprecated": 1, - "description": "Not used: Yosys and ABC do not use a clock period. Timing is handled by the steps after synthesis, using the clock in the SDC file.\n", - "stages": [ - "synth" - ] - }, "ABC_DRIVER_CELL": { "description": "Default driver cell used during ABC synthesis.\n", "stages": [ diff --git a/flow/scripts/variables.yaml b/flow/scripts/variables.yaml index d3a61444d2..20ed7e72f7 100644 --- a/flow/scripts/variables.yaml +++ b/flow/scripts/variables.yaml @@ -437,13 +437,6 @@ MIN_BUF_CELL_AND_PORTS: Used to insert a buffer cell to pass through wires. Used in synthesis. stages: - synth -ABC_CLOCK_PERIOD_IN_PS: - description: > - Not used: Yosys and ABC do not use a clock period. Timing is handled by - the steps after synthesis, using the clock in the SDC file. - stages: - - synth - deprecated: 1 ABC_DRIVER_CELL: description: | Default driver cell used during ABC synthesis. diff --git a/flow/util/genMassive.py b/flow/util/genMassive.py index 14260a48b0..fc6c6bf13f 100644 --- a/flow/util/genMassive.py +++ b/flow/util/genMassive.py @@ -53,9 +53,6 @@ # Synthesis ################## -# Clock period for Yosys (for synthesis) -# The unit should follow each design (ns, ps) (float) -ABC_CLOCK_PERIOD = [] # Hierarchical Synthsis. 0 = hierarchical, 1 = flatten, empty = flatten # (default) (int) FLATTEN = [] @@ -144,7 +141,6 @@ SweepingAttributes = { "PLATFORM_DESIGN": PLATFORM_DESIGN, "CP": CLK_PERIOD, - "ABC_CP": ABC_CLOCK_PERIOD, "FLATTEN": FLATTEN, "UNCERTAINTY": UNCERTAINTY, "IO_DELAY": IO_DELAY, @@ -264,7 +260,6 @@ def adjustFastRoute(filedata, adjSet, GrOverflow): def writeConfigs(CurAttrs, CurChunkNum): CurPlatform, CurDesign = CurAttrs.get("PLATFORM_DESIGN").split("-") CurClkPeriod = CurAttrs.get("CP") - CurAbcClkPeriod = CurAttrs.get("ABC_CP") CurFlatten = CurAttrs.get("FLATTEN") CurUncertainty = CurAttrs.get("UNCERTAINTY") CurIoDelay = CurAttrs.get("IO_DELAY") @@ -312,7 +307,7 @@ def writeConfigs(CurAttrs, CurChunkNum): return # print(CurPlatform, CurDesign) - # print(CurClkPeriod, CurAbcClkPeriod, CurFlatten, CurCoreUtil) + # print(CurClkPeriod, CurFlatten, CurCoreUtil) # print(CurAspectRatio, CurCoreDieMargin, CurGpPad, CurDpPad) # print(CurCtsClusterSize, CurCtsClusterDiameter, CurLayerAdjust) # print(CurLayerAdjustM1, CurLayerAdjustM2, CurLayerAdjustM3) @@ -365,8 +360,6 @@ def writeConfigs(CurAttrs, CurChunkNum): "export SDC_FILE = $(DESIGN_DIR)/constraint-DoE-%s.sdc\n" % variantName ) - if CurAbcClkPeriod != "empty": - fo.write("export ABC_CLOCK_PERIOD_IN_PS = %s\n" % CurAbcClkPeriod) if CurFlatten != "empty": if CurFlatten == 0: fo.write("export SYNTH_ARGS = \n")