Skip to content

Commit

Permalink
Merge pull request #2182 from Pinata-Consulting/makefile-source-scrip…
Browse files Browse the repository at this point in the history
…t-and-exit

makefile: add GUI_ARGS and GUI_SOURCE env vars
  • Loading branch information
maliberty authored Jul 25, 2024
2 parents 1b8018b + b8b12da commit dd727d4
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docs/user/FlowVariables.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,8 @@ Note:
| `IO_PLACER_H` | The metal layer on which to place the I/O pins horizontally (top and bottom of the die). |
| `IO_PLACER_V` | The metal layer on which to place the I/O pins vertically (sides of the die). |
| `GUI_NO_TIMING` | Skip loading timing for a faster GUI load. |
| `GUI_SOURCE` | Source the script. |
| `GUI_ARGS` | OpenROAD command line options for gui_ and open_ targets, typically set tup `-exit` in combination with GUI_SOURCE to run a script and exit. |


### Placement
Expand Down
6 changes: 3 additions & 3 deletions flow/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -573,7 +573,7 @@ endef
define OPEN_GUI
.PHONY: $(1)_$(2)
$(1)_$(2):
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
$(3)=$(RESULTS_DIR)/$(2) $(4) $(GUI_ARGS) $(SCRIPTS_DIR)/gui.tcl
endef

# Separate dependency checking and doing a step. This can
Expand Down Expand Up @@ -1045,10 +1045,10 @@ $(foreach file,$(RESULTS_DEF) $(RESULTS_GDS) $(RESULTS_OAS),klayout_$(file)): kl

.PHONY: gui_synth
gui_synth:
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
$(OPENROAD_GUI_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
.PHONY: open_synth
open_synth:
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
$(OPENROAD_NO_EXIT_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl

$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))
Expand Down
4 changes: 4 additions & 0 deletions flow/scripts/gui.tcl
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@ if {![info exist ::env(GUI_NO_TIMING)]} {
# Cleanup temporary variables
unset sdc_file s design_stage
}

if {[info exist env(GUI_SOURCE)]} {
source $::env(GUI_SOURCE)
}
4 changes: 4 additions & 0 deletions flow/scripts/sta-synth.tcl
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
source $::env(SCRIPTS_DIR)/load.tcl
load_design 1_synth.v 1_synth.sdc

if {[info exist env(GUI_SOURCE)]} {
source $::env(GUI_SOURCE)
}

0 comments on commit dd727d4

Please sign in to comment.