Skip to content

Commit f4a2f41

Browse files
committed
synth: Rm .lib preprocess after tools improved
Signed-off-by: Martin Povišer <[email protected]>
1 parent e01db63 commit f4a2f41

File tree

11 files changed

+20
-184
lines changed

11 files changed

+20
-184
lines changed

docs/user/FlowVariables.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,6 @@ configuration file.
126126
| <a name="DFF_LIB_FILES"></a>DFF_LIB_FILES| Technology mapping liberty files for flip-flops.| |
127127
| <a name="DIE_AREA"></a>DIE_AREA| The die area specified as a list of lower-left and upper-right corners in microns (X1 Y1 X2 Y2).| |
128128
| <a name="DONT_USE_CELLS"></a>DONT_USE_CELLS| Dont use cells eases pin access in detailed routing.| |
129-
| <a name="DONT_USE_LIBS"></a>DONT_USE_LIBS| Set liberty files as `dont_use`.| |
130129
| <a name="DPO_MAX_DISPLACEMENT"></a>DPO_MAX_DISPLACEMENT| Specifies how far an instance can be moved when optimizing.| 5 1|
131130
| <a name="EARLY_SIZING_CAP_RATIO"></a>EARLY_SIZING_CAP_RATIO| Ratio between the input pin capacitance and the output pin load during initial gate sizing.| |
132131
| <a name="ENABLE_DPO"></a>ENABLE_DPO| Enable detail placement with improve_placement feature.| 1|
@@ -459,7 +458,6 @@ configuration file.
459458
- [DESIGN_NICKNAME](#DESIGN_NICKNAME)
460459
- [DFF_LIB_FILES](#DFF_LIB_FILES)
461460
- [DONT_USE_CELLS](#DONT_USE_CELLS)
462-
- [DONT_USE_LIBS](#DONT_USE_LIBS)
463461
- [DPO_MAX_DISPLACEMENT](#DPO_MAX_DISPLACEMENT)
464462
- [ENABLE_DPO](#ENABLE_DPO)
465463
- [FASTROUTE_TCL](#FASTROUTE_TCL)

flow/Makefile

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -188,19 +188,6 @@ versions.txt:
188188
@echo "openroad $(if $(OPENROAD_EXE),$(shell $(OPENROAD_EXE) -version 2>&1),not available)" >> $(OBJECTS_DIR)/$@
189189
@echo "klayout $(if $(KLAYOUT_CMD),$(shell $(KLAYOUT_CMD) -zz -v 2>&1),not available)" >> $(OBJECTS_DIR)/$@
190190

191-
# Pre-process libraries
192-
# ==============================================================================
193-
194-
# Create temporary Liberty files which have the proper dont_use properties set
195-
# For use with Yosys and ABC
196-
.SECONDEXPANSION:
197-
$(DONT_USE_LIBS): $$(filter %$$(@F) %$$(@F).gz,$(LIB_FILES))
198-
@mkdir -p $(OBJECTS_DIR)/lib
199-
$(PYTHON_EXE) $(UTILS_DIR)/preprocessLib.py -i $^ -o $@
200-
201-
$(OBJECTS_DIR)/lib/merged.lib: $(DONT_USE_LIBS)
202-
$(PYTHON_EXE) $(UTILS_DIR)/merge_lib.py $(PLATFORM)_merged $(DONT_USE_LIBS) > $@
203-
204191
# Pre-process KLayout tech
205192
# ==============================================================================
206193
$(OBJECTS_DIR)/klayout_tech.lef: $(TECH_LEF)
@@ -281,11 +268,11 @@ $(SDC_FILE_CLOCK_PERIOD): $(SDC_FILE)
281268
yosys-dependencies: $(YOSYS_DEPENDENCIES)
282269

283270
.PHONY: do-yosys
284-
do-yosys: $(DONT_USE_SC_LIB)
271+
do-yosys: yosys-dependencies
285272
$(SCRIPTS_DIR)/synth.sh $(SYNTH_SCRIPT) $(LOG_DIR)/1_2_yosys.log
286273

287274
.PHONY: do-yosys-canonicalize
288-
do-yosys-canonicalize: yosys-dependencies $(DONT_USE_SC_LIB)
275+
do-yosys-canonicalize: yosys-dependencies
289276
$(SCRIPTS_DIR)/synth.sh $(SCRIPTS_DIR)/synth_canonicalize.tcl $(LOG_DIR)/1_1_yosys_canonicalize.log
290277

291278
$(RESULTS_DIR)/1_1_yosys_canonicalize.rtlil: $(YOSYS_DEPENDENCIES)
@@ -416,7 +403,7 @@ endef
416403

417404
$(eval $(call do-step,1_3_synth,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc,synth_odb))
418405

419-
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL) $(DONT_USE_SC_LIB),floorplan))
406+
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL) $(LIB_FILES),floorplan))
420407

421408
$(eval $(call do-copy,2_floorplan,2_1_floorplan.sdc,,.sdc))
422409

flow/platforms/asap7/config.mk

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -201,11 +201,6 @@ export DB_FILES += $(realpath $($(CORNER)_DB_FILES))
201201
export TEMPERATURE = $($(CORNER)_TEMPERATURE)
202202
export VOLTAGE = $($(CORNER)_VOLTAGE)
203203

204-
# FIXME Need merged.lib for now, but ideally it shouldn't be necessary:
205-
#
206-
# https://github.com/The-OpenROAD-Project/OpenROAD-flow-scripts/pull/2139
207-
export DONT_USE_SC_LIB = $(OBJECTS_DIR)/lib/merged.lib
208-
209204
# ---------------------------------------------------------
210205
# IR Drop
211206
# ---------------------------------------------------------

flow/platforms/asap7/openRoad/post_mergeLib.py

Lines changed: 0 additions & 26 deletions
This file was deleted.

flow/scripts/synth.tcl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,17 +103,12 @@ if { [env_var_exists_and_non_empty LATCH_MAP_FILE] } {
103103
techmap -map $::env(LATCH_MAP_FILE)
104104
}
105105

106-
set dfflibmap_args ""
107-
foreach cell $::env(DONT_USE_CELLS) {
108-
lappend dfflibmap_args -dont_use $cell
109-
}
110-
111106
# Technology mapping of flip-flops
112107
# dfflibmap only supports one liberty file
113108
if { [env_var_exists_and_non_empty DFF_LIB_FILE] } {
114-
dfflibmap -liberty $::env(DFF_LIB_FILE) {*}$dfflibmap_args
109+
dfflibmap -liberty $::env(DFF_LIB_FILE) {*}$lib_dont_use_args
115110
} else {
116-
dfflibmap -liberty $::env(DONT_USE_SC_LIB) {*}$dfflibmap_args
111+
dfflibmap {*}$lib_args {*}$lib_dont_use_args
117112
}
118113
opt
119114

@@ -147,7 +142,7 @@ insbuf -buf {*}$::env(MIN_BUF_CELL_AND_PORTS)
147142
# Reports
148143
tee -o $::env(REPORTS_DIR)/synth_check.txt check
149144

150-
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$stat_libs
145+
tee -o $::env(REPORTS_DIR)/synth_stat.txt stat {*}$lib_args
151146

152147
# check the design is composed exclusively of target cells, and check for other problems
153148
if { ![env_var_exists_and_non_empty SYNTH_WRAPPED_OPERATORS] } {

flow/scripts/synth_preamble.tcl

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -94,20 +94,25 @@ if { $::env(ABC_AREA) } {
9494
set abc_script $::env(SCRIPTS_DIR)/abc_speed.script
9595
}
9696

97-
# Technology mapping for cells
98-
# ABC supports multiple liberty files, but the hook from Yosys to ABC doesn't
99-
set abc_args [list -script $abc_script \
100-
-liberty $::env(DONT_USE_SC_LIB) \
101-
-constr $::env(OBJECTS_DIR)/abc.constr]
97+
# Create argument list for stat
98+
set lib_args ""
99+
foreach lib $::env(LIB_FILES) {
100+
append lib_args "-liberty $lib "
101+
}
102102

103103
# Exclude dont_use cells. This includes macros that are specified via
104104
# LIB_FILES and ADDITIONAL_LIBS that are included in LIB_FILES.
105+
set lib_dont_use_args ""
105106
if { [env_var_exists_and_non_empty DONT_USE_CELLS] } {
106107
foreach cell $::env(DONT_USE_CELLS) {
107-
lappend abc_args -dont_use $cell
108+
lappend lib_dont_use_args -dont_use $cell
108109
}
109110
}
110111

112+
# Technology mapping for cells
113+
set abc_args [list -script $abc_script \
114+
{*}$lib_args {*}$lib_dont_use_args -constr $::env(OBJECTS_DIR)/abc.constr]
115+
111116
if { [env_var_exists_and_non_empty SDC_FILE_CLOCK_PERIOD] } {
112117
puts "Extracting clock period from SDC file: $::env(SDC_FILE_CLOCK_PERIOD)"
113118
set fp [open $::env(SDC_FILE_CLOCK_PERIOD) r]
@@ -119,12 +124,6 @@ if { [env_var_exists_and_non_empty SDC_FILE_CLOCK_PERIOD] } {
119124
close $fp
120125
}
121126

122-
# Create argument list for stat
123-
set stat_libs ""
124-
foreach lib $::env(DONT_USE_LIBS) {
125-
append stat_libs "-liberty $lib "
126-
}
127-
128127
set constr [open $::env(OBJECTS_DIR)/abc.constr w]
129128
puts $constr "set_driving_cell $::env(ABC_DRIVER_CELL)"
130129
puts $constr "set_load $::env(ABC_LOAD_IN_FF)"

flow/scripts/synth_stdcells.tcl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# Read standard cells and macros as blackbox inputs
2-
# These libs have their dont_use properties set accordingly
3-
read_liberty -overwrite -setattr liberty_cell -lib {*}$::env(DONT_USE_LIBS)
2+
read_liberty -overwrite -setattr liberty_cell -lib {*}$::env(LIB_FILES)
43
read_liberty -overwrite -setattr liberty_cell \
5-
-unit_delay -wb -ignore_miss_func -ignore_buses {*}$::env(DONT_USE_LIBS)
4+
-unit_delay -wb -ignore_miss_func -ignore_buses {*}$::env(LIB_FILES)

flow/scripts/variables.mk

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -132,9 +132,6 @@ WRAPPED_LIBS = $(foreach lib,$(notdir $(WRAP_LIBS)),$(OBJECTS_DIR)/$(lib:.lib=_m
132132
export ADDITIONAL_LEFS += $(WRAPPED_LEFS) $(WRAP_LEFS)
133133
export LIB_FILES += $(WRAP_LIBS) $(WRAPPED_LIBS)
134134

135-
export DONT_USE_LIBS = $(patsubst %.lib.gz, %.lib, $(addprefix $(OBJECTS_DIR)/lib/, $(notdir $(LIB_FILES))))
136-
export DONT_USE_SC_LIB ?= $(firstword $(DONT_USE_LIBS))
137-
138135
# Stream system used for final result (GDS is default): GDS, GSDII, GDS2, OASIS, or OAS
139136
STREAM_SYSTEM ?= GDS
140137
ifneq ($(findstring GDS,$(shell echo $(STREAM_SYSTEM) | tr '[:lower:]' '[:upper:]')),)
@@ -163,7 +160,7 @@ export TCLLIBPATH := util/cell-veneer $(TCLLIBPATH)
163160
export SYNTH_SCRIPT ?= $(SCRIPTS_DIR)/synth.tcl
164161
export SDC_FILE_CLOCK_PERIOD = $(RESULTS_DIR)/clock_period.txt
165162

166-
export YOSYS_DEPENDENCIES=$(DONT_USE_LIBS) $(WRAPPED_LIBS) $(DFF_LIB_FILE) $(VERILOG_FILES) $(SYNTH_NETLIST_FILES) $(LATCH_MAP_FILE) $(ADDER_MAP_FILE) $(SDC_FILE_CLOCK_PERIOD)
163+
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)
167164

168165
# Ubuntu 22.04 ships with older than 0.28.11, so support older versions
169166
# for a while still.

flow/scripts/variables.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -705,9 +705,6 @@ CDL_FILES:
705705
DFF_LIB_FILES:
706706
description: |
707707
Technology mapping liberty files for flip-flops.
708-
DONT_USE_LIBS:
709-
description: |
710-
Set liberty files as `dont_use`.
711708
SYNTH_KEEP_MODULES:
712709
description: |
713710
Mark modules to keep from getting removed in flattening.

flow/util/merge_lib.py

Lines changed: 0 additions & 56 deletions
This file was deleted.

0 commit comments

Comments
 (0)