Update the way "make ship" works (equivalent)
- This should be much faster (couple of seconds versus minutes/hours)
since it uses the maglef/ GDS_* pointers.
- This would also eliminate the need to explicitly read all
pre-requisite GDS files like open_source.gds, which was newly
introduced.
diff --git a/Makefile b/Makefile
index 5a2e30d..1fc49fe 100644
--- a/Makefile
+++ b/Makefile
@@ -57,8 +57,18 @@
@echo "###############################################"
@echo "Generating Caravel GDS (sources are in the 'gds' directory)"
@sleep 1
- @cp gds/caravel.gds gds/caravel.old.gds && echo "Copying old Caravel to gds/caravel.old.gds" || true
- @cd gds && MAGTYPE=mag magic -rcfile ${PDK_ROOT}/sky130A/libs.tech/magic/current/sky130A.magicrc -noc -dnull gen_caravel.tcl < /dev/null
+ @echo "\
+ gds readonly true; \
+ gds rescale false; \
+ gds read ../gds/user_project_wrapper.gds; \
+ load caravel -dereference;\
+ select top cell;\
+ gds write caravel.gds; \
+ exit;" > ./mag/mag2gds_caravel.tcl
+ @cd mag && PDKPATH=${PDK_ROOT}/sky130A magic -noc -dnull mag2gds_caravel.tcl < /dev/null
+ @rm ./mag/mag2gds_caravel.tcl
+ @mv -f ./gds/caravel.gds ./gds/caravel.old.gds
+ mv ./mag/caravel.gds ./gds
@@ -208,19 +218,6 @@
mv -f ./gds/*.ext ./gds/tmp/
@echo "Antenna result: ./gds/tmp/$*.antenna"
-mag2gds: check-env
- echo "\
- gds readonly true; \
- gds rescale false; \
- load caravel -dereference;\
- select top cell;\
- gds write caravel.gds; \
- exit;" > ./mag/mag2gds_caravel.tcl
- @cd mag && PDKPATH=${PDK_ROOT}/sky130A magic -noc -dnull mag2gds_caravel.tcl < /dev/null
- @rm ./mag/mag2gds_caravel.tcl
- mv -f ./gds/caravel.gds ./gds/caravel.old.gds
- mv ./mag/caravel.gds ./gds
-
.PHONY: help
help:
@$(MAKE) -pRrq -f $(lastword $(MAKEFILE_LIST)) : 2>/dev/null | awk -v RS= -F: '/^# File/,/^# Finished Make data base/ {if ($$1 !~ "^[#.]") {print $$1}}' | sort | egrep -v -e '^[^[:alnum:]]' -e '^$@$$'