From 1b93c22966298683c136a8a3f0ab7ef76e3240fe Mon Sep 17 00:00:00 2001 From: jeffdi Date: Wed, 7 Jun 2023 12:25:05 -0700 Subject: [PATCH] Makefile add openframe target --- Makefile | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/Makefile b/Makefile index 03c90d20..84d3b5a3 100644 --- a/Makefile +++ b/Makefile @@ -194,6 +194,47 @@ __truck: @cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ./.magicrc $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_truck.out ### @rm $(UPRJ_ROOT)/mag/mag2gds_caravan.tcl +.PHONY: ship +openframe: check-env uncompress uncompress-caravel +ifeq ($(FOREGROUND),1) + @echo "Running make openframe in the foreground..." + $(MAKE) -f $(CARAVEL_ROOT)/Makefile __openframe + @echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out +else + @echo "Running make openframe in the background..." + nohup $(MAKE) -f $(CARAVEL_ROOT)/Makefile __ship >/dev/null 2>&1 & + tail -f signoff/build/make_openframe.out + @echo "Make openframe completed." 2>&1 | tee -a ./signoff/build/make_openframe.out +endif + +__openframe: + @echo "###############################################" + @echo "Generating Caravel GDS (sources are in the 'gds' directory)" + @sleep 1 +#### Runs from the CARAVEL_ROOT mag directory + @echo "\ + drc off; \ + crashbackups stop; \ + addpath hexdigits; \ + addpath $(UPRJ_ROOT)/mag; \ + load openframe_project_wrapper; \ + property LEFview true; \ + property GDS_FILE $(UPRJ_ROOT)/gds/openframe_project_wrapper.gds; \ + property GDS_START 0; \ + load $(CARAVEL_ROOT)/maglef/simple_por; \ + load caravel -dereference; \ + select top cell; \ + expand; \ + cif *hier write disable; \ + cif *array write disable; \ + gds write $(UPRJ_ROOT)/gds/caravel.gds; \ + quit -noprompt;" > $(UPRJ_ROOT)/mag/mag2gds_caravel.tcl +### Runs from CARAVEL_ROOT + @mkdir -p ./signoff/build + #@cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ${PDK_ROOT}/$(PDK)/libs.tech/magic/$(PDK).magicrc $(UPRJ_ROOT)/mag/mag2gds_caravel.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_ship.out + @cd $(CARAVEL_ROOT)/mag && PDKPATH=${PDK_ROOT}/$(PDK) MAGTYPE=mag magic -noc -dnull -rcfile ./.magicrc $(UPRJ_ROOT)/mag/mag2gds_caravel.tcl 2>&1 | tee $(UPRJ_ROOT)/signoff/build/make_ship.out +### @rm $(UPRJ_ROOT)/mag/mag2gds_caravel.tcl + .PHONY: clean clean: cd $(CARAVEL_ROOT)/verilog/dv/caravel/mgmt_soc/ && \