Skip to content

Commit 4e47ad0

Browse files
authored
Merge pull request #3716 from Pinata-Consulting/synth-odb
make: synth consistency with other stages
2 parents 84ad63b + 1ddd5a2 commit 4e47ad0

File tree

4 files changed

+15
-26
lines changed

4 files changed

+15
-26
lines changed

flow/Makefile

Lines changed: 10 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ $(WRAPPED_LIBS):
227227
# |____/ |_| |_| \_| |_| |_| |_|_____|____/___|____/
228228
#
229229
.PHONY: synth
230-
synth: $(RESULTS_DIR)/1_synth.v
230+
synth: $(RESULTS_DIR)/1_synth.odb
231231

232232
.PHONY: synth-report
233233
synth-report: synth
@@ -260,6 +260,7 @@ yosys-dependencies: $(YOSYS_DEPENDENCIES)
260260
.PHONY: do-yosys
261261
do-yosys: yosys-dependencies
262262
$(SCRIPTS_DIR)/synth.sh $(SYNTH_SCRIPT) $(LOG_DIR)/1_2_yosys.log
263+
cp $(SDC_FILE) $(RESULTS_DIR)/1_2_yosys.sdc
263264

264265
.PHONY: do-yosys-canonicalize
265266
do-yosys-canonicalize: yosys-dependencies
@@ -268,17 +269,8 @@ do-yosys-canonicalize: yosys-dependencies
268269
$(RESULTS_DIR)/1_1_yosys_canonicalize.rtlil: $(YOSYS_DEPENDENCIES)
269270
$(UNSET_AND_MAKE) do-yosys-canonicalize
270271

271-
$(RESULTS_DIR)/1_2_yosys.v: $(RESULTS_DIR)/1_1_yosys_canonicalize.rtlil
272+
$(RESULTS_DIR)/1_2_yosys.v $(RESULTS_DIR)/1_2_yosys.sdc: $(RESULTS_DIR)/1_1_yosys_canonicalize.rtlil
272273
$(UNSET_AND_MAKE) do-yosys
273-
274-
.PHONY: do-synth
275-
do-synth:
276-
mkdir -p $(RESULTS_DIR) $(LOG_DIR) $(REPORTS_DIR)
277-
cp $(RESULTS_DIR)/1_2_yosys.v $(RESULTS_DIR)/1_synth.v
278-
279-
$(RESULTS_DIR)/1_synth.v: $(RESULTS_DIR)/1_2_yosys.v
280-
$(UNSET_AND_MAKE) do-synth
281-
282274
.PHONY: clean_synth
283275
clean_synth:
284276
rm -f $(RESULTS_DIR)/1_* $(RESULTS_DIR)/mem*.json
@@ -395,23 +387,25 @@ endef
395387
# ==============================================================================
396388

397389
# Custom target to go from synthesis to placement in a single OpenROAD run
398-
$(eval $(call do-step,1_3_floorplan_to_place, $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc,floorplan_to_place))
390+
$(eval $(call do-step,1_3_floorplan_to_place, $(RESULTS_DIR)/1_synth.odb $(RESULTS_DIR)/1_synth.sdc,floorplan_to_place))
399391

400392
.PHONY: floorplan_to_place
401-
floorplan_to_place: $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc
393+
floorplan_to_place: $(RESULTS_DIR)/1_synth.odb $(RESULTS_DIR)/1_synth.sdc
402394
$(UNSET_AND_MAKE) do-1_3_floorplan_to_place
403395

404396
# ==============================================================================
405397

406-
$(eval $(call do-step,1_3_synth,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc,synth_odb))
398+
$(eval $(call do-step,1_synth,$(RESULTS_DIR)/1_2_yosys.v $(RESULTS_DIR)/1_2_yosys.sdc,synth_odb))
399+
400+
$(RESULTS_DIR)/1_synth.sdc: $(RESULTS_DIR)/1_synth.odb
407401

408-
$(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) $(IO_CONSTRAINTS),floorplan))
402+
$(eval $(call do-step,2_1_floorplan,$(RESULTS_DIR)/1_synth.odb $(RESULTS_DIR)/1_synth.sdc $(TECH_LEF) $(SC_LEF) $(ADDITIONAL_LEFS) $(FOOTPRINT) $(SIG_MAP_FILE) $(FOOTPRINT_TCL) $(LIB_FILES) $(IO_CONSTRAINTS),floorplan))
409403

410404
$(eval $(call do-copy,2_floorplan,2_1_floorplan.sdc,,.sdc))
411405

412406
# STEP 2: Macro Placement
413407
#-------------------------------------------------------------------------------
414-
$(eval $(call do-step,2_2_floorplan_macro,$(RESULTS_DIR)/2_1_floorplan.odb $(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc $(MACRO_PLACEMENT) $(MACRO_PLACEMENT_TCL),macro_place))
408+
$(eval $(call do-step,2_2_floorplan_macro,$(RESULTS_DIR)/2_1_floorplan.odb $(RESULTS_DIR)/1_synth.sdc $(MACRO_PLACEMENT) $(MACRO_PLACEMENT_TCL),macro_place))
415409

416410
# STEP 3: Tapcell and Welltie insertion
417411
#-------------------------------------------------------------------------------

flow/scripts/floorplan.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
utl::set_metrics_stage "floorplan__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
33
erase_non_stage_variables floorplan
4-
load_design 1_synth.v 1_synth.sdc
4+
load_design 1_synth.odb 1_synth.sdc
55

66
proc report_unused_masters { } {
77
set db [ord::get_db]

flow/scripts/floorplan_to_place.tcl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
utl::set_metrics_stage "floorplan__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
3-
load_design 1_synth.v 1_synth.sdc
3+
load_design 1_synth.odb 1_synth.sdc
44

55
# Floorplan
66

flow/scripts/synth_odb.tcl

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
utl::set_metrics_stage "floorplan__{}"
22
source $::env(SCRIPTS_DIR)/load.tcl
33
erase_non_stage_variables synth
4-
load_design 1_synth.v 1_synth.sdc
4+
load_design 1_2_yosys.v 1_2_yosys.sdc
55

6-
write_db $::env(RESULTS_DIR)/1_3_synth.odb
6+
write_db $::env(RESULTS_DIR)/1_synth.odb
77
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by
88
# the user could have dependencies, such as sourcing util.tcl,
99
# which are read in here and a canonicalized version is written
1010
# out by OpenSTA that has no dependencies.
11-
write_sdc -no_timestamp $::env(RESULTS_DIR)/1_3_synth.sdc
12-
13-
# Final output of the synthesis stage, the other files are written out for
14-
# consistency and logging of .odb hashes
15-
exec cp $::env(RESULTS_DIR)/1_3_synth.sdc $::env(RESULTS_DIR)/1_synth.sdc
16-
exec cp $::env(RESULTS_DIR)/1_3_synth.odb $::env(RESULTS_DIR)/1_synth.odb
11+
write_sdc -no_timestamp $::env(RESULTS_DIR)/1_synth.sdc

0 commit comments

Comments
 (0)