Skip to content

Commit

Permalink
Updating pcells testing env
Browse files Browse the repository at this point in the history
  • Loading branch information
FaragElsayed2 committed Sep 17, 2023
1 parent 4ff2918 commit 0be7909
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 30 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -164,3 +164,4 @@ cython_debug/
.vscode/
*.lyrdb
run_*_regr/
pcells_run_*/
90 changes: 60 additions & 30 deletions cells/klayout/pymacros/testing/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,55 +19,62 @@

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


#=================================
# ---------- test-BJT --------
#=================================

.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 ---------
Expand All @@ -76,56 +83,80 @@ 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


#=================================
# ------- test-cap_mos --------
#=================================

.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 ----------
Expand All @@ -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 )"

0 comments on commit 0be7909

Please sign in to comment.