Skip to content

Commit 8840097

Browse files
committed
synth: optional .odb output and .sdc canonicalization
`make gui_synth` is an important use-case for fast turnaround, less accurate, RTL rinse and repeat cycles when looking at timing reports, endpoint slack histograms in the GUI. The only reason why an .odb file and canonicalized .sdc file is not always written out by the ORFS by default, is that this takes a bit of extra time and space and it was not deemed desirable. It is a bit of a toss-up, accept less consistency in the flow, or pay a moderate performance penalty. Switching to always writing .odb and canonicalized .sdc is simple enough to do if we change our mind and want simpler, more consistency and fewer suprises across stages. - gui_synth: improve user experience, same code as for gui_floorplan/grt, etc. GUI_TIMING=0 now works. - sta-synth.tcl was trying to do the same as open.tcl. DRY, now we only have open.tcl - .odb file output from synth + canonicalization of 1_synth.sdc, i.e. it is written out by OpenSTA instead of copied from user. This means that any dependencies that the user's SDC_FILE has is not dragged into floorplan. bazel-orfs will be updated to use this, no change to normal ORFS flow. To use gui_synth, there is an additional step: make synth # New step that writes out 1_synth.odb and canonicalizes # 1_synth.sdc make do-1_3_synth make gui_synth
1 parent 84c0c0b commit 8840097

File tree

3 files changed

+18
-11
lines changed

3 files changed

+18
-11
lines changed

flow/Makefile

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -414,9 +414,8 @@ do-$(1)$(if $(4),$(4),):
414414
cp $(RESULTS_DIR)/$(2) $(RESULTS_DIR)/$(1)$(if $(4),$(4),.odb)
415415
endef
416416

417+
$(eval $(call do-step,1_3_synth,$(RESULTS_DIR)/1_synth.v $(RESULTS_DIR)/1_synth.sdc,synth_odb))
417418

418-
# STEP 1: Translate verilog to odb
419-
#-------------------------------------------------------------------------------
420419
$(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))
421420

422421
$(eval $(call do-copy,2_floorplan,2_1_floorplan.sdc,,.sdc))
@@ -775,13 +774,7 @@ nuke: clean_test clean_issues
775774
$(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): klayout_%: $(OBJECTS_DIR)/klayout.lyt
776775
$(KLAYOUT_CMD) -nn $(OBJECTS_DIR)/klayout.lyt $(RESULTS_DIR)/$*
777776

778-
.PHONY: gui_synth
779-
gui_synth:
780-
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
781-
.PHONY: open_synth
782-
open_synth:
783-
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
784-
777+
$(eval $(call OPEN_GUI_SHORTCUT,synth,1_synth.odb))
785778
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
786779
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
787780
$(eval $(call OPEN_GUI_SHORTCUT,cts,4_cts.odb))

flow/scripts/sta-synth.tcl

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

flow/scripts/synth_odb.tcl

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
utl::set_metrics_stage "floorplan__{}"
2+
source $::env(SCRIPTS_DIR)/load.tcl
3+
erase_non_stage_variables synth
4+
load_design 1_synth.v 1_synth.sdc
5+
6+
write_db $::env(RESULTS_DIR)/1_3_synth.odb
7+
# Canonicalize 1_synth.sdc. The original SDC_FILE provided by
8+
# the user could have dependencies, such as sourcing util.tcl,
9+
# which are read in here and a canonicalized version is written
10+
# 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

0 commit comments

Comments
 (0)