Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Making some updates in the device recognition layers after review and adding more to the github actions #79

Merged
merged 4 commits into from
Apr 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 12 additions & 19 deletions .github/workflows/lvs_regression.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,24 +29,6 @@ on:
workflow_dispatch:

jobs:
lvs_switch:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { tool: klayout, part: lvs, test: switch }

name: ${{ matrix.part }} | ${{ matrix.test }}

steps:
- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Testing ${{ matrix.part }} for ${{ matrix.test }}
run: |
make test-"$(python -c 'print("${{ matrix.part }}".upper())')"-${{ matrix.test }}

build_lvs-matrix:
runs-on: ubuntu-latest
outputs:
Expand All @@ -73,10 +55,21 @@ jobs:
name: ${{ matrix.part }} | ${{ matrix.test }}

steps:
- name: Installing Klayout
run: |
sudo apt update -qq -y
wget https://www.klayout.org/downloads/Ubuntu-22/klayout_0.28.14-1_amd64.deb
# The dpkg command will fail complaining about missing dependencies.
sudo dpkg -i ./klayout_0.28.14-1_amd64.deb || true
# The apt install command should install the missing dependencies
# needed by KLayout above and finish the install.
sudo apt install -f -y
# Check that KLayout was successfully installed!
klayout -v

- uses: actions/checkout@v3
with:
submodules: 'recursive'
- name: Testing ${{ matrix.part }} for ${{ matrix.test }}
run: |
make test-"$(python -c 'print("${{ matrix.part }}".upper())')"-${{ matrix.test }}

10 changes: 9 additions & 1 deletion ihp-sg13g2/libs.tech/klayout/tech/lvs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,14 @@ You need the following set of tools installed to be able to run SG13G2 LVS:
- Python 3.9+
- KLayout 0.28.14+

## Installation

To install the required Python packages, execute the following command:

```bash
pip install -r ../../../../../requirements.txt
```

## Devices Status

The following table explains the list of available SG13G2 devices we have supported in our LVS runset.
Expand Down Expand Up @@ -213,7 +221,7 @@ Then, you will get the LVS menus for SG13G2, you could set your desired options
<img src="images/lvs_menus.png" width="60%" >
</p>
<p align="center">
Fig. 3. Visualization of LVS results on Klayout-GUI
Fig. 5. Visualization of LVS results on Klayout-GUI
</p>

Finally, you could run the LVS using `Run Klayout LVS` option.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ logger.info('Starting NPN-BJT DERIVATIONS')
bjt_exclude = gatpoly_drw.join(pwell_block).join(nsd_drw)
.join(heatres_drw).join(salblock_drw).join(polyres_drw)
.join(mim_drw).join(extblock_drw).join(res_drw)
.join(pwell_blk_holes).join(recog_diode).join(recog_esd)
.join(ind_drw).join(ind_pin).join(substrate_drw)
.join(recog_diode).join(recog_esd).join(ind_drw)
.join(ind_pin).join(substrate_drw)

npn_exclude = nwell_drw.join(psd_drw).join(nbulay_drw).join(bjt_exclude)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@

logger.info('Starting CAP DERIVATIONS')

rfmimcap_exc = gatpoly_drw.join(nsd_drw).join(nsd_block)
.join(psd).join(nbulay_drw).join(thickgateox_drw)
.join(heattrans_drw).join(trans_drw).join(emwind_drw)
.join(emwihv_drw).join(heatres_drw).join(salblock_drw)
.join(polyres_drw).join(extblock_drw).join(res_drw)
.join(activ_mask).join(pwell_blk_holes).join(recog_diode)
.join(recog_esd).join(ind_drw).join(ind_pin).join(substrate_drw)
cap_exc = nsd_drw.join(heattrans_drw).join(trans_drw)
.join(emwind_drw).join(emwihv_drw).join(heatres_drw)
.join(salblock_drw).join(polyres_drw).join(extblock_drw)
.join(res_drw).join(activ_mask).join(recog_diode)
.join(recog_esd).join(ind_drw).join(ind_pin)
.join(substrate_drw)

rfmimcap_exc = gatpoly_drw.join(nsd_block).join(psd)
.join(nbulay_drw).join(thickgateox_drw).join(cap_exc)

# === MIMCAP ===
mimcap_exclude = rfmimcap_exc.join(pwell_block).join(ptap_holes)
Expand All @@ -45,18 +47,16 @@ cmim_btm = mim_btm.covering(cmim_top)
cmim_dev = mim_drw.covering(cmim_top).and(cmim_btm)

# === rfcmim ===
rfmim_area = pwell_block.and(ptap.extents).interacting(mim_drw)
rfmim_area = pwell_block.interacting(mim_drw)
rfmim_top = mim_top.and(rfmim_area).not(rfmimcap_exc)
rfmim_btm = mim_btm.and(rfmim_area).covering(rfmim_top)
rfmim_dev = mim_drw.covering(rfmim_top).and(rfmim_btm)
rfmim_sub = ptap.extents.interacting(rfmim_area)
rfmeas_mk = metal5_drw.overlapping(rfmim_btm).and(rfmim_area)

# === svaricap ===
varicap_exc = heattrans_drw.join(trans_drw).join(heatres_drw)
.join(polyres_drw).join(salblock_drw).join(extblock_drw)
.join(nsd_drw).join(res_drw).join(recog_diode).join(recog_esd)
.join(substrate_drw)
varicap_exc = pwell.join(pwell_block).join(nwell_holes)
.join(mim_drw).join(cap_exc)

varicap_core = ngate_hv_base.and(nwell_iso).not(varicap_exc)
varicap_diff_port = nactiv.interacting(varicap_core).not(varicap_core)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ connect(dpantenna_p, pwell)
connect(schottcky_p_1x1, schottcky_p)
connect(schottcky_p, metal1_con)
connect(schottcky_n, schottcky_n_port)
connect(schottcky_n_port, metal1_con)
connect(schottcky_n_port, schottcky_n_con)
connect(schottcky_n_con, metal1_con)
Original file line number Diff line number Diff line change
Expand Up @@ -23,41 +23,43 @@

logger.info('Starting DIODE DERIVATIONS')

diode_exclude = gatpoly_drw.join(nsd_drw).join(heattrans_drw)
.join(trans_drw).join(emwind_drw).join(emwihv_drw)
.join(heatres_drw).join(polyres_drw).join(mim_drw)
.join(extblock_drw).join(res_drw).join(activ_mask)
.join(recog_esd).join(ind_drw).join(ind_pin)
.join(substrate_drw)
diode_exclude = gatpoly_drw.join(nwell_drw).join(nsd_drw)
.join(heattrans_drw).join(trans_drw).join(emwind_drw)
.join(emwihv_drw).join(heatres_drw).join(polyres_drw)
.join(mim_drw).join(extblock_drw).join(res_drw)
.join(activ_mask).join(recog_esd).join(ind_drw)
.join(ind_pin).join(substrate_drw)

antenna_d_exc = nwell_drw.join(pwell_block).join(nbulay_drw).join(salblock_drw)
.join(nsd_block).join(pwell_blk_holes).join(diode_exclude)
antenna_d_exc = pwell_block.join(nbulay_drw).join(salblock_drw)
.join(nsd_block).join(diode_exclude)

antenna_d_mk = recog_diode.not(antenna_d_exc)

# dantenna diode
# ==== dantenna diode ====
dantenna_n = activ_drw.and(antenna_d_mk).not(psd_drw)
dantenna_p = pwell.and(antenna_d_mk).covering(dantenna_n)

# dpantenna diode
# ==== dpantenna diode ====
dpantenna_n = pactiv.and(antenna_d_mk)
dpantenna_p = pwell.and(antenna_d_mk).covering(dpantenna_n)

# schottky_nbl1 diode
# ==== schottky_nbl1 diode ====
schottky_mk = recog_diode.and(thickgateox_drw).not(diode_exclude)
.and(pwell_block).and(ptap_holes).and(nbulay_drw)
.and(salblock_drw).and(nsd_block).and(nwell_holes)
.not(psd_drw).not(pwell).not(diode_exclude)

schottcky_p_ = cont_drw.and(activ_drw).and(metal1_drw)
.and(schottky_mk).not(nwell_drw)
.and(schottky_mk)

# schottky_nbl1 is a fixed device (0.3um X 1.0 um)
schottcky_p = schottcky_p_.with_bbox_min(0.3.um).with_bbox_max(1.0.um)
# Using box with area 1x1 to be used as a reference to (m)
schottcky_p_1x1 = schottcky_p.middle(as_boxes).sized(0.499.um)
schottcky_n = activ_drw.and(nwell_iso).interacting(schottky_mk)
.not(nsd_block).not(salblock_drw).not(diode_exclude)

schottcky_n = nsd_block.and(activ_drw).covering(schottcky_p)

# define port for schottcky
schottcky_n_port = cont_drw.and(schottcky_n).not_interacting(schottcky_p)
schottcky_n_port = activ_drw.interacting(nwell_iso).interacting(schottcky_n).not(schottcky_n.sized(-1.nm))
schottcky_n_con = cont_drw.and(schottcky_n_port).not_interacting(schottcky_p)
schottcky_sub = ptap.extents.covering(schottcky_p).covering(schottcky_n)
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ extract_devices(diode('dpantenna', EnDiode), { 'N' => dpantenna_n, 'P' => dpante
# schottky_nbl1 diode
logger.info('Extracting schottky_nbl1 diode')
extract_devices(bjt3('schottky_nbl1', Esd3Term), { 'C' => schottcky_sub,
'B' => schottcky_n.extents,
'B' => schottcky_n_port.extents,
'E' => schottcky_p_1x1,
'tC' => ptap,
'tB' => schottcky_n,
'tB' => schottcky_n_port,
'tE' => schottcky_p_1x1 })
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,23 @@
logger.info('Starting ESD DERIVATIONS')

# General
esd_exclude = trans_drw.join(polyres_drw).join(extblock_drw)
.join(nsd_drw).join(recog_diode).join(recog_diode)
.join(substrate_drw).join(ind_drw)
esd_exclude = nsd_block.join(nsd_drw).join(heattrans_drw)
.join(trans_drw).join(emwind_drw).join(emwihv_drw)
.join(heatres_drw).join(polyres_drw).join(mim_drw)
.join(extblock_drw).join(res_drw).join(recog_diode)
.join(substrate_drw).join(ind_drw).join(ind_pin)


esd_exc_d = gatpoly_drw.join(thickgateox_drw).join(salblock_drw)
.join(esd_exclude)

idiodevdd_exc = esd_exc_d.join(nwell_holes)
diodevdd_exc = idiodevdd_exc.join(nbulay_drw).join(pwell_block)

idiodevss_exc = esd_exc_d.join(nwell_drw.not_interacting(nwell_holes))
.join(pwell_block)
diodevss_exc = idiodevss_exc.join(nbulay_drw)

diode_esd_exc = gatpoly_drw.join(salblock_drw).join(pwell_block).join(nbulay_drw).join(esd_exclude)
idiode_esd_exc = gatpoly_drw.join(salblock_drw).join(esd_exclude)
nw_diode = nwell_n_iso.not_interacting(pwell_block)
nw_idiode = nwell_iso.interacting(pwell_block)

Expand All @@ -38,12 +49,12 @@ nw_idiode = nwell_iso.interacting(pwell_block)
#======================

# diodevdd_2kv
diodevdd_2kv_e = pactiv.and(nw_diode).and(recog_esd).not(diode_esd_exc)
diodevdd_2kv_e = pactiv.and(nw_diode).and(recog_esd).not(diodevdd_exc)
diodevdd_2kv_e_1x1 = diodevdd_2kv_e.middle.sized(0.499.um)
diodevdd_2kv_b_ = nactiv.and(nw_diode).and(recog_esd)
diodevdd_2kv_b_ = nactiv.and(nw_diode).and(recog_esd).not(diodevdd_exc)
diodevdd_2kv_b = diodevdd_2kv_b_.interacting(diodevdd_2kv_b_.extents.interacting(diodevdd_2kv_e, 1, 1))
diodevdd_2kv_tb = cont_drw.and(diodevdd_2kv_b).not_interacting(diodevdd_2kv_e)
diodevdd_2kv_c_ = pactiv.and(pwell).and(recog_esd)
diodevdd_2kv_c_ = pactiv.and(pwell).and(recog_esd).not(diodevdd_exc)
diodevdd_2kv_c = diodevdd_2kv_c_.interacting(diodevdd_2kv_c_.extents.interacting(diodevdd_2kv_b, 1, 1))

# diodevdd_4kv
Expand All @@ -55,12 +66,12 @@ diodevdd_4kv_te = cont_drw.and(diodevdd_2kv_e).not_interacting(diodevdd_4kv_b)
diodevdd_4kv_tb = cont_drw.and(diodevdd_4kv_b).not_interacting(diodevdd_2kv_e)

# diodevss_2kv
diodevss_2kv_e = nactiv.and(pwell).and(recog_esd).not(diode_esd_exc)
diodevss_2kv_e = nactiv.and(pwell).and(recog_esd).not(diodevss_exc)
diodevss_2kv_e_1x1 = diodevss_2kv_e.middle.sized(0.499.um)
diodevss_2kv_b_ = pactiv.and(pwell).and(recog_esd)
diodevss_2kv_b_ = pactiv.and(pwell).and(recog_esd).not(diodevss_exc)
diodevss_2kv_b = diodevss_2kv_b_.interacting(diodevss_2kv_b_.extents.interacting(diodevss_2kv_e, 1, 1))
diodevss_2kv_tb = cont_drw.and(diodevss_2kv_b).not_interacting(diodevss_2kv_e)
diodevss_2kv_c_ = nactiv.and(nw_diode).and(recog_esd)
diodevss_2kv_c_ = nactiv.and(nw_diode).and(recog_esd).not(diodevss_exc)
diodevss_2kv_c = diodevss_2kv_c_.interacting(diodevss_2kv_c_.extents.interacting(diodevss_2kv_b, 1, 1))

# diodevss_4kv
Expand All @@ -76,12 +87,12 @@ diodevss_4kv_tb = cont_drw.and(diodevss_4kv_b).not_interacting(diodevss_2kv_e)
#=======================

# idiodevdd_2kv
idiodevdd_2kv_e = pactiv.and(nw_idiode).and(recog_esd).not(idiode_esd_exc)
idiodevdd_2kv_e = pactiv.and(nw_idiode).and(recog_esd).not(idiodevdd_exc)
idiodevdd_2kv_e_1x1 = idiodevdd_2kv_e.middle.sized(0.499.um)
idiodevdd_2kv_b_ = nactiv.and(nw_idiode).and(recog_esd)
idiodevdd_2kv_b_ = nactiv.and(nw_idiode).and(recog_esd).not(idiodevdd_exc)
idiodevdd_2kv_b = idiodevdd_2kv_b_.interacting(idiodevdd_2kv_b_.extents.interacting(idiodevdd_2kv_e, 1, 1))
idiodevdd_2kv_tb = cont_drw.and(idiodevdd_2kv_b).not_interacting(idiodevdd_2kv_e)
idiodevdd_2kv_c_ = pactiv.and(pwell).and(recog_esd)
idiodevdd_2kv_c_ = pactiv.and(pwell).and(recog_esd).not(idiodevdd_exc)
idiodevdd_2kv_c = idiodevdd_2kv_c_.interacting(idiodevdd_2kv_c_.extents.interacting(idiodevdd_2kv_b, 1, 1))

# idiodevdd_4kv
Expand All @@ -93,12 +104,12 @@ idiodevdd_4kv_te = cont_drw.and(idiodevdd_2kv_e).not_interacting(idiodevdd_4kv_b
idiodevdd_4kv_tb = cont_drw.and(idiodevdd_4kv_b).not_interacting(idiodevdd_2kv_e)

# idiodevss_2kv
idiodevss_2kv_e = nactiv.and(pwell).and(nbulay_drw).and(recog_esd).not(idiode_esd_exc)
idiodevss_2kv_e = nactiv.and(pwell).and(nbulay_drw).and(recog_esd).not(idiodevss_exc)
idiodevss_2kv_e_1x1 = idiodevss_2kv_e.middle.sized(0.499.um)
idiodevss_2kv_b_ = pactiv.and(pwell).and(nbulay_drw).and(recog_esd)
idiodevss_2kv_b_ = pactiv.and(pwell).and(nbulay_drw).and(recog_esd).not(idiodevss_exc)
idiodevss_2kv_b = idiodevss_2kv_b_.interacting(idiodevss_2kv_b_.extents.interacting(idiodevss_2kv_e, 1, 1))
idiodevss_2kv_tb = cont_drw.and(idiodevss_2kv_b).not_interacting(idiodevss_2kv_e)
idiodevss_2kv_c_ = nactiv.and(nwell_iso).and(recog_esd)
idiodevss_2kv_c_ = nactiv.and(nwell_iso).and(recog_esd).not(idiodevss_exc)
idiodevss_2kv_c = idiodevss_2kv_c_.interacting(idiodevss_2kv_c_.extents.interacting(idiodevss_2kv_b, 1, 1))

# idiodevss_4kv
Expand All @@ -113,7 +124,7 @@ idiodevss_4kv_tb = cont_drw.and(idiodevss_4kv_b).not_interacting(idiodevss_2kv_e
# ----- MOSCL-ESD -----
#======================

nmoscl_exc = esd_exclude.join(heattrans_drw).join(res_drw)
nmoscl_exc = esd_exclude.join(pwell_block)

# nmoscl_2
gate_moscl = ngate_hv_base.and(salblock_drw).and(nbulay_drw)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,3 @@ ptap = pactiv.and(pwell).not(substrate_drw).not(res_mk).not(recog_diode).not(gat
nwell_holes = nwell_drw.holes
ptap_holes = ptap.holes
ntap_holes = ntap.holes
pwell_blk_holes = pwell_block.holes
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,17 @@

logger.info('Starting Inductor DERIVATIONS')

ind_exc = gatpoly_drw.join(pwell).join(nsd_drw)
.join(nbulay_drw).join(thickgateox_drw).join(heattrans_drw)
.join(emwind_drw).join(emwihv_drw).join(heatres_drw)
.join(salblock_drw).join(polyres_drw).join(mim_drw)
.join(extblock_drw).join(res_drw).join(activ_mask)
.join(recog_diode).join(recog_esd).join(substrate_drw)

# General
ind_edges = ind_drw.edges
ind_core_ = topmetal2_drw.join(topmetal1_drw).and(pwell_block).and(ind_drw).merged
ind_core_ = topmetal2_drw.join(topmetal1_drw).and(pwell_block)
.and(ind_drw).merged.not(ind_exc)
ind_ports_ = ind_pin.and(ind_core_).interacting(ind_edges)
ind_port_la = ind_ports_.interacting(ind_text.texts("LA"))
ind_port_lb = ind_ports_.interacting(ind_text.texts("LB"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ mos_exclude = pwell_block.join(nsd_drw).join(trans_drw)
.join(emwind_drw).join(emwihv_drw).join(heatres_drw)
.join(salblock_drw).join(polyres_drw).join(mim_drw)
.join(extblock_drw).join(res_drw).join(activ_mask)
.join(pwell_blk_holes).join(recog_diode).join(recog_esd)
.join(ind_drw).join(ind_pin).join(ind_drw).join(substrate_drw)
.join(recog_diode).join(recog_esd).join(ind_drw)
.join(ind_pin).join(ind_drw).join(substrate_drw)

# ==============
# ---- NMOS ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ polyres_exclude = activ_drw.join(nwell_drw).join(pwell_block)
.join(nsd_block).join(nbulay_drw).join(thickgateox_drw)
.join(heattrans_drw).join(trans_drw).join(emwind_drw)
.join(emwihv_drw).join(mim_drw).join(activ_mask)
.join(pwell_blk_holes).join(recog_diode).join(recog_esd)
.join(ind_drw).join(ind_pin).join(substrate_drw)
.join(recog_diode).join(recog_esd).join(ind_drw)
.join(ind_pin).join(substrate_drw)

# ==============
# ---- POLY ----
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ logger.info('Starting Taps DERIVATIONS')

taps_exclude = gatpoly_drw.join(nsd_drw).join(heattrans_drw)
.join(trans_drw).join(emwind_drw).join(emwihv_drw)
.join(heatres_drw).join(salblock_drw).join(polyres_drw)
.join(salblock_drw).join(heatres_drw).join(polyres_drw)
.join(mim_drw).join(extblock_drw).join(res_drw)
.join(activ_mask).join(recog_diode).join(recog_esd)
.join(ind_drw).join(ind_pin)
Expand Down
Binary file not shown.
Binary file not shown.
Loading