Skip to content

Commit b9ce1ad

Browse files
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 <file>" it writes "source <file>" instead, so the clock period has not reached ABC since b9c1485 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 <zz13240206005@gmail.com>
1 parent 64b427c commit b9ce1ad

10 files changed

Lines changed: 7 additions & 45 deletions

File tree

‎docs/user/FlowVariables.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ configuration file.
9191
| Variable | Description | Default |
9292
| --- | --- | --- |
9393
| <a name="ABC_AREA"></a>ABC_AREA| Strategies for Yosys ABC synthesis: Area/Speed. Default ABC_SPEED.| 0|
94-
| <a name="ABC_CLOCK_PERIOD_IN_PS"></a>ABC_CLOCK_PERIOD_IN_PS| Clock period to be used by STA during synthesis. Default value read from `constraint.sdc`.| |
94+
| <a name="ABC_CLOCK_PERIOD_IN_PS"></a>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.| |
9595
| <a name="ABC_DRIVER_CELL"></a>ABC_DRIVER_CELL| Default driver cell used during ABC synthesis.| |
9696
| <a name="ABC_LOAD_IN_FF"></a>ABC_LOAD_IN_FF| During synthesis set_load value used.| |
9797
| <a name="ABSTRACT_SOURCE"></a>ABSTRACT_SOURCE| Which .odb file to use to create abstract| |

‎flow/Makefile‎

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,14 +254,6 @@ memory:
254254
# Run Synthesis using yosys
255255
#-------------------------------------------------------------------------------
256256

257-
$(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE)
258-
$(UNSET_AND_MAKE) do-sdc-clock-period
259-
260-
.PHONY: do-sdc-clock-period
261-
do-sdc-clock-period:
262-
mkdir -p $(dir $(SDC_FILE_CLOCK_PERIOD))
263-
echo $(ABC_CLOCK_PERIOD_IN_PS) > $(SDC_FILE_CLOCK_PERIOD)
264-
265257
.PHONY: yosys-dependencies
266258
yosys-dependencies: $(YOSYS_DEPENDENCIES)
267259

@@ -316,7 +308,6 @@ clean_synth:
316308
rm -f $(REPORTS_DIR)/synth_*
317309
rm -f $(LOG_DIR)/1_*
318310
rm -f $(SYNTH_STATS)
319-
rm -f $(SDC_FILE_CLOCK_PERIOD)
320311

321312
# ==============================================================================
322313
# _____ _ ___ ___ ____ ____ _ _ _ _

‎flow/designs/gf12/bp_dual/config.mk‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl
5656
export DIE_AREA = 0 0 3000 3000
5757
export CORE_AREA = 200 200 2800 2800
5858

59-
export ABC_CLOCK_PERIOD_IN_PS = 1250
60-
6159
export TNS_END_PERCENT = 0
6260
export PLACE_DENSITY = 0.50
6361

‎flow/designs/gf12/bp_quad/config.mk‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl
5858
export DIE_AREA = 0 0 3000 3000
5959
export CORE_AREA = 200 200 2800 2800
6060

61-
export ABC_CLOCK_PERIOD_IN_PS = 1250
62-
6361
export TNS_END_PERCENT = 0
6462
export PLACE_DENSITY = 0.40
6563

‎flow/designs/gf12/bp_single/config.mk‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,6 @@ export FOOTPRINT_TCL = $(PLATFORM_DIR)/bp/footprint.tcl
4646
export DIE_AREA = 0 0 3000 3000
4747
export CORE_AREA = 200 200 2800 2800
4848

49-
export ABC_CLOCK_PERIOD_IN_PS = 1250
50-
5149
export PLACE_DENSITY = 0.80
5250

5351
export MACRO_WRAPPERS = $(PLATFORM_DIR)/bp/wrappers/wrappers.tcl

‎flow/platforms/ihp-sg13g2/config.mk‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,6 @@ export CLKGATE_MAP_FILE = $(PLATFORM_DIR)/cells_clkgate.v
6666
# Define ABC driver and load
6767
export ABC_DRIVER_CELL = sg13g2_buf_4
6868
export ABC_LOAD_IN_FF = 6.0
69-
ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined)
70-
ifneq ($(wildcard $(SDC_FILE)),)
71-
# Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file
72-
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}')
73-
endif
74-
endif
7569

7670
# -----------------------------------------------------
7771
# Sizing

‎flow/scripts/synth_preamble.tcl‎

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,6 @@ if { [env_var_exists_and_non_empty DONT_USE_CELLS] } {
216216
set abc_args [list -script $abc_script \
217217
{*}$lib_args {*}$lib_dont_use_args -constr $::env(OBJECTS_DIR)/abc.constr]
218218

219-
if { [env_var_exists_and_non_empty SDC_FILE_CLOCK_PERIOD] } {
220-
puts "Extracting clock period from SDC file: $::env(SDC_FILE_CLOCK_PERIOD)"
221-
set fp [open $::env(SDC_FILE_CLOCK_PERIOD) r]
222-
set clock_period [string trim [read $fp]]
223-
if { $clock_period != "" } {
224-
puts "Setting clock period to $clock_period"
225-
lappend abc_args -D $clock_period
226-
}
227-
close $fp
228-
}
229-
230219
set constr [open $::env(OBJECTS_DIR)/abc.constr w]
231220
puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)"
232221
puts $constr "set_load $::env(ABC_LOAD_IN_FF)"

‎flow/scripts/variables.json‎

Lines changed: 2 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎flow/scripts/variables.mk‎

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -174,9 +174,8 @@ export WRAP_CFG = $(PLATFORM_DIR)/wrapper.cfg
174174
export TCLLIBPATH := util/cell-veneer $(TCLLIBPATH)
175175

176176
export SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl
177-
export SDC_FILE_CLOCK_PERIOD = $(RESULTS_DIR)/clock_period.txt
178177

179-
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)
178+
export YOSYS_DEPENDENCIES=$(LIB_FILES) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE)
180179

181180
# Ubuntu 22.04 ships with older than 0.28.11, so support older versions
182181
# for a while still.
@@ -214,13 +213,6 @@ endef
214213
export ISSUE_VARIABLES := $(foreach V, $(ISSUE_VARIABLES_NAMES), $(if $($V),$V=$($V),$V='')$(newline))
215214
export COMMAND_LINE_ARGS := $(foreach V,$(.VARIABLES),$(if $(filter command% line, $(origin $V)),$(V)))
216215

217-
# Set yosys-abc clock period to first "clk_period" value or "-period" value found in sdc file
218-
ifeq ($(origin ABC_CLOCK_PERIOD_IN_PS), undefined)
219-
ifneq ($(wildcard $(SDC_FILE)),)
220-
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}')
221-
endif
222-
endif
223-
224216
.PHONY: vars
225217
vars:
226218
mkdir -p $(OBJECTS_DIR)

‎flow/scripts/variables.yaml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -439,10 +439,11 @@ MIN_BUF_CELL_AND_PORTS:
439439
- synth
440440
ABC_CLOCK_PERIOD_IN_PS:
441441
description: >
442-
Clock period to be used by STA during synthesis. Default value read from
443-
`constraint.sdc`.
442+
Not used: Yosys and ABC do not use a clock period. Timing is handled by
443+
the steps after synthesis, using the clock in the SDC file.
444444
stages:
445445
- synth
446+
deprecated: 1
446447
ABC_DRIVER_CELL:
447448
description: |
448449
Default driver cell used during ABC synthesis.

0 commit comments

Comments
 (0)