Skip to content

Commit dd727d4

Browse files
authored
Merge pull request #2182 from Pinata-Consulting/makefile-source-script-and-exit
makefile: add GUI_ARGS and GUI_SOURCE env vars
2 parents 1b8018b + b8b12da commit dd727d4

File tree

4 files changed

+13
-3
lines changed

4 files changed

+13
-3
lines changed

docs/user/FlowVariables.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,8 @@ Note:
144144
| `IO_PLACER_H` | The metal layer on which to place the I/O pins horizontally (top and bottom of the die). |
145145
| `IO_PLACER_V` | The metal layer on which to place the I/O pins vertically (sides of the die). |
146146
| `GUI_NO_TIMING` | Skip loading timing for a faster GUI load. |
147+
| `GUI_SOURCE` | Source the script. |
148+
| `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. |
147149

148150

149151
### Placement

flow/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -573,7 +573,7 @@ endef
573573
define OPEN_GUI
574574
.PHONY: $(1)_$(2)
575575
$(1)_$(2):
576-
$(3)=$(RESULTS_DIR)/$(2) $(4) $(SCRIPTS_DIR)/gui.tcl
576+
$(3)=$(RESULTS_DIR)/$(2) $(4) $(GUI_ARGS) $(SCRIPTS_DIR)/gui.tcl
577577
endef
578578

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

10461046
.PHONY: gui_synth
10471047
gui_synth:
1048-
$(OPENROAD_GUI_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
1048+
$(OPENROAD_GUI_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
10491049
.PHONY: open_synth
10501050
open_synth:
1051-
$(OPENROAD_NO_EXIT_CMD) $(SCRIPTS_DIR)/sta-synth.tcl
1051+
$(OPENROAD_NO_EXIT_CMD) $(GUI_ARGS) $(SCRIPTS_DIR)/sta-synth.tcl
10521052

10531053
$(eval $(call OPEN_GUI_SHORTCUT,floorplan,2_floorplan.odb))
10541054
$(eval $(call OPEN_GUI_SHORTCUT,place,3_place.odb))

flow/scripts/gui.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,7 @@ if {![info exist ::env(GUI_NO_TIMING)]} {
6666
# Cleanup temporary variables
6767
unset sdc_file s design_stage
6868
}
69+
70+
if {[info exist env(GUI_SOURCE)]} {
71+
source $::env(GUI_SOURCE)
72+
}

flow/scripts/sta-synth.tcl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,6 @@
11
source $::env(SCRIPTS_DIR)/load.tcl
22
load_design 1_synth.v 1_synth.sdc
3+
4+
if {[info exist env(GUI_SOURCE)]} {
5+
source $::env(GUI_SOURCE)
6+
}

0 commit comments

Comments
 (0)