diff --git a/.gitignore b/.gitignore index 0e407c1b..3a775268 100644 --- a/.gitignore +++ b/.gitignore @@ -164,3 +164,4 @@ cython_debug/ .vscode/ *.lyrdb run_*_regr/ +pcells_run_*/ \ No newline at end of file diff --git a/cells/klayout/pymacros/testing/Makefile b/cells/klayout/pymacros/testing/Makefile index 89a9e957..05b4b410 100644 --- a/cells/klayout/pymacros/testing/Makefile +++ b/cells/klayout/pymacros/testing/Makefile @@ -19,23 +19,22 @@ SHELL := /bin/bash Testing_DIR ?= $(shell pwd) -run_folder := $(shell date +'run_%Y_%m_%d_%H_%M') +run_folder := $(shell date +'pcells_run_%Y_%m_%d_%H_%M') .DEFAULT_GOAL := all all : test-pcell -test-pcell: Add_run-dir test-diode test-MIM test-cap_mos test-FET test-RES +test-pcell: test-diode test-MIM test-cap_mos test-FET test-RES -#================================= -# --------- RUN FOLDER ---------- -#================================= +#============================ +# --------- DRC-PV ---------- +#============================ -.ONESHELL: -Add_run-dir: - @cd $(Testing_DIR) - @ mkdir -p $(run_folder)/bjt $(run_folder)/diode $(run_folder)/cap_mim $(run_folder)/mosfet $(run_folder)/cap_mos $(run_folder)/res +DRC-PV: + @cd ../../../../ + @rm -rf globalfoundries-pdk-libs-gf180mcu_fd_pv/ && git clone https://github.com/efabless/globalfoundries-pdk-libs-gf180mcu_fd_pv.git #================================= @@ -43,31 +42,39 @@ Add_run-dir: #================================= .ONESHELL: -test-bjt: Add_run-dir +test-bjt: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/bjt @echo "===== test BJT pcells =====" @pytest --device=bjt pcell_reg_Pytest.py - + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/bjt #================================= # -------- test-diode ------- #================================= .ONESHELL: -test-diode: Add_run-dir +test-diode: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/diode @echo "===== test diode pcells =====" @pytest --device=diodes pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/diode #================================= # --------- test-MIM --------- #================================= .ONESHELL: -test-MIM: Add_run-dir +test-MIM: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/cap_mim @echo "===== test MIM pcells =====" @pytest --device=mim_caps pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/cap_mim #================================= # --------- test-MOS --------- @@ -76,35 +83,53 @@ test-MIM: Add_run-dir .ONESHELL: test-FET : test-nfet_03v3 test-nfet_05v0 test-nfet_06v0 test-pfet_03v3 test-pfet_05v0 test-pfet_06v0 -test-nfet_03v3: Add_run-dir +test-nfet_03v3: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/nfet_03v3 @echo "===== test nfet_03v3 pcells =====" @pytest --device=nfet_03v3 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/nfet_03v3 -test-nfet_05v0: Add_run-dir +test-nfet_05v0: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/nfet_05v0 @echo "===== test nfet_05v0 pcells =====" @pytest --device=nfet_05v0 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/nfet_05v0 -test-nfet_06v0: Add_run-dir +test-nfet_06v0: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/nfet_06v0 @echo "===== test nfet_06v0 pcells =====" @pytest --device=nfet_06v0 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/nfet_06v0 -test-pfet_03v3: Add_run-dir +test-pfet_03v3: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/pfet_03v3 @echo "===== test pfet_03v3 pcells =====" @pytest --device=pfet_03v3 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/pfet_03v3 -test-pfet_05v0: Add_run-dir +test-pfet_05v0: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/pfet_05v0 @echo "===== test pfet_05v0 pcells =====" @pytest --device=pfet_05v0 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/pfet_05v0 -test-pfet_06v0: Add_run-dir +test-pfet_06v0: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/pfet_06v0 @echo "===== test pfet_06v0 pcells =====" @pytest --device=pfet_06v0 pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/pfet_06v0 #================================= @@ -112,20 +137,26 @@ test-pfet_06v0: Add_run-dir #================================= .ONESHELL: -test-cap_mos: Add_run-dir +test-cap_mos: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/cap_mos @echo "===== test cap_mos pcells =====" @pytest --device=mos_caps pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/pfet_06v0 #================================= # --------- test-RES --------- #================================= .ONESHELL: -test-RES: Add_run-dir +test-RES: DRC-PV @cd $(Testing_DIR) + @mkdir -p $(run_folder)/res @echo "===== test res pcells =====" @pytest --device=res pcell_reg_Pytest.py + @rm -rf $(Testing_DIR)/../../../../globalfoundries-pdk-libs-gf180mcu_fd_pv/ + @mv -f drc_run_* lvs_run_* testcases $(run_folder)/res #========================== # --------- HELP ---------- @@ -134,12 +165,11 @@ test-RES: Add_run-dir # Help Target help: @echo "\n ==== The following are some of the valid targets for this Makefile ====\n" - @echo "... all (the default if no target is provided )" - @echo "... tes-pcell (To run DRC for on all pcells )" - @echo "... test-bjt (To run DRC for on bjt pcells )" - @echo "... test-diode (To run DRC for on diode pcells )" - @echo "... test-MIM (To run DRC for on MIM pcells )" - @echo "... test-FET (To run DRC for on FET pcells )" - @echo "... test-cap_mos (To run DRC for on cap_mos pcells )" - @echo "... test-RES (To run DRC for on RES pcells )" - + @echo "... all (Default if no target is provided )" + @echo "... tes-pcell (To test DRC/LVS for all pcells )" + @echo "... test-bjt (To test DRC/LVS for bjt pcells )" + @echo "... test-diode (To run DRC/LVS for diode pcells )" + @echo "... test-MIM (To run DRC/LVS for MIM pcells )" + @echo "... test-FET (To run DRC/LVS for FET pcells )" + @echo "... test-cap_mos (To run DRC/LVS for cap_mos pcells)" + @echo "... test-RES (To run DRC/LVS for RES pcells )"