5.5. LVS Testing

Tip

  • This section provides instructions for testing SG13G2-LVS using KLayout.

  • For detailed steps and resources, please refer to Testing directory.

5.5.1. Folder Structure

πŸ“ testing
┣ πŸ“œREADME.md                 This file documents the contents of the testing directory.
┣ πŸ“œMakefile                  Used for testing the SG13G2 LVS rule deck.
┣ πŸ“œrun_regression.py         Main regression script for testing SG13G2 devices.
┣ πŸ“œrun_regression_cells.py   Main regression script for testing SG13G2 cells.
┣ πŸ“testcases                 Contains all test cases used for LVS testing.

5.5.2. Devices Status

The following table explains the list of available SG13G2 devices we have supported in our LVS runset.

Device

Tested

MOSFET

sg13_lv_nmos

βœ…

sg13_hv_nmos

βœ…

sg13_lv_pmos

βœ…

sg13_hv_pmos

βœ…

RF-MOSFET

rfnmos

βœ…

rfnmosHV

βœ…

rfpmos

βœ…

rfpmosHV

βœ…

BJTs

npn13G2

βœ…

npn13G2L

βœ…

npn13G2V

βœ…

pnpMPA

βœ…

Diodes

dantenna

βœ…

dpantenna

βœ…

schottky_nbl1

βœ…

Resistors

rsil

βœ…

rppd

βœ…

rhigh

βœ…

lvsres

βœ…

Capacitors

SVaricap

βœ…

cap_cmim

βœ…

rfcmim

βœ…

ESD

diodevdd_4kv

βœ…

diodevdd_2kv

βœ…

diodevss_4kv

βœ…

diodevss_2kv

βœ…

idiodevdd_4kv

βœ…

idiodevdd_2kv

βœ…

idiodevss_4kv

βœ…

idiodevss_2kv

βœ…

nmoscl_2

βœ…

nmoscl_4

βœ…

Inductors

inductor

βœ…

inductor3

βœ…

Taps

ptap1

βœ…

ntap1

βœ…

5.5.3. Devices Regression Usage

run_regression.py (--help| -h)
run_regression.py [--device=<device>] [--run_dir=<run_dir_path>] [--mp=<num>]

Example:

python3 run_regression.py --device_name=MOS --run_dir=test_mos

Options

`--help -h`                  Print this help message.
`--device=<device>`          Select device category you want to run regression on.
`--run_dir=<run_dir_path>`   Run directory to save all the results [default: pwd]
`--mp=<num>`                 The number of threads used in run.

Another approach for testing SG13G2 devices, you could make a full test for SG13G2 LVS rule deck, by executing the following command in current testing directory:

make test-LVS-main

5.5.4. Cells Regression Usage

run_regression_cells.py (--help| -h)
run_regression_cells.py [--cell=<cell>] [--run_dir=<run_dir_path>] [--mp=<num>]

Example:

python3 run_regression_cells.py --cell=sg13g2_inv_1 --run_dir=test_inv

Options

`--help -h`                  Print this help message.
`--cell=<cell>`              Specify the cell to run; all cells run if not specified.
`--run_dir=<run_dir_path>`   Run directory to save all the results [default: pwd]
`--mp=<num>`                 The number of threads used in run.

Another approach for testing SG13G2 cells, you could make a full test for SG13G2 cells, by executing the following command in current testing directory:

make test-LVS-cells

5.5.4.1. LVS Outputs

You could find the regression run results at your run directory if you previously specified it through –run_name=<run_name>. Default path of run directory is unit_tests_<date>_<time> in the current testing directory.

Folder Structure of regression run results

πŸ“ unit_tests_<date>_<time>
┣ πŸ“œ unit_tests_<date>_<time>.log
┣ πŸ“œ all_test_cases_results.csv
β”— πŸ“œ rule_deck_rules.csv
β”— πŸ“ <device_name>
    ┣ πŸ“œ <device_name>_lvs.log
    ┣ πŸ“œ <device_name>.gds
    ┣ πŸ“œ <device_name>.cdl
    ┣ πŸ“œ <device_name>_extracted.cir
    ┣ πŸ“œ <device_name>.lvsdb

The outcome includes a database file for each device (<device_name>.lvsdb) containing LVS extractions and comparison results. You can view it by opening your gds file with: klayout <device_name>.gds -mn <device_name>.lvsdb. Alternatively, you can visualize it on your GDS file using the netlist browser option in the tools menu of the KLayout GUI.