Merge branch 'main' of https://github.com/mabrains/gf180_technology_dev into ic_diode_testcases
diff --git a/IC/klayout/lvs/rule_decks/diode_derivations.lvs b/IC/klayout/lvs/rule_decks/diode_derivations.lvs
index 8bfb535..c279dfd 100644
--- a/IC/klayout/lvs/rule_decks/diode_derivations.lvs
+++ b/IC/klayout/lvs/rule_decks/diode_derivations.lvs
@@ -24,13 +24,7 @@
 diode_np_1p8_terminal_n = ncomp.not(poly2).not(dualgate).outside(dnwell)
                             .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
-diode_np_1p8_terminal_p = pcomp.not(poly2).not(dualgate).outside(dnwell)
-                            .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
-
 # diode_pn_1p8 
-diode_pn_1p8_terminal_n = nwell_con.inside(nwell).not(poly2).not(dualgate).outside(dnwell)
-                                .not(sab).not(lvs_bjt).interacting(diode_mk)
-
 diode_pn_1p8_terminal_p = pcomp.inside(nwell).not(poly2).not(dualgate).outside(dnwell)
                                 .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
@@ -38,39 +32,30 @@
 diode_np_3p3_terminal_n = ncomp.not(poly2).and(dualgate).outside(dnwell)
                                 .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
-diode_np_3p3_terminal_p = pcomp.not(poly2).and(dualgate).outside(dnwell)
-                                .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
-
 # diode_pn_3p3  
-diode_pn_3p3_terminal_n = nwell_con.inside(nwell).not(poly2).and(dualgate).outside(dnwell)
-                                .not(sab).not(lvs_bjt).interacting(diode_mk)
-
 diode_pn_3p3_terminal_p = pcomp.inside(nwell).not(poly2).and(dualgate)
                                 .outside(dnwell).not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
 # diode_nwp 
-diode_nwp_terminal_p = pcomp.interacting(well_diode_mk).not(lvs_bjt).not(nat).not(res_mk).not(res_mk_type1)
-diode_nwp_terminal_n = well_diode_mk.covering(nwell)
+diode_nwp_terminal_p = pcomp.interacting(well_diode_mk).not(lvs_bjt).inside(diode_mk)
+                            .not(nat).not(res_mk).not(res_mk_type1)
+
+diode_nwp_terminal_n = well_diode_mk.covering(nwell).and(diode_mk)
 
 # diode_np_1p8_nat
 diode_np_1p8_nat_terminal_n = ncomp.not(poly2).and(nat).not(dualgate).outside(dnwell)
                                     .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
-        
-diode_np_1p8_nat_terminal_p = pcomp.not(poly2).not(dualgate).outside(dnwell).and(nat)
-                                    .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
 # diode_np_3p3_nat
 diode_np_3p3_nat_terminal_n = ncomp.not(poly2).and(nat).and(dualgate).outside(dnwell)
                                     .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
 
-diode_np_3p3_nat_terminal_p = pcomp.not(poly2).and(dualgate).outside(dnwell).and(nat)
-                                    .not(res_mk).not(sab).not(lvs_bjt).interacting(diode_mk)
-
 # diode_dnwpw
-diode_dnwpw_terminal_p = pcomp.inside(dnwell).interacting(well_diode_mk).and(diode_mk)
-                                    .not(lvs_bjt).not(nat).not(res_mk_type1)
+diode_dnwpw_terminal_p = sub.and(well_diode_mk).and(diode_mk).inside(dnwell).and(pplus)
+                                    .not(lvs_bjt).not(nat).not(res_mk_type1).not_covering(nwell)
 
 # diode_dnwps
-diode_dnwps_terminal_p = ptap.extents.covering(dnwell).not_interacting(nat).not_interacting(res_mk_type1)
-                                  .not_covering(dualgate).interacting(well_diode_mk).interacting(diode_mk)
+diode_dnwps_terminal_p = ptap.extents.not_covering(nat).interacting(diode_mk).interacting(well_diode_mk)
+                            .not_covering(dualgate).not_interacting(res_mk_type1)
+
 
diff --git a/IC/klayout/lvs/rule_decks/diode_extraction.lvs b/IC/klayout/lvs/rule_decks/diode_extraction.lvs
index b118b07..066f06a 100644
--- a/IC/klayout/lvs/rule_decks/diode_extraction.lvs
+++ b/IC/klayout/lvs/rule_decks/diode_extraction.lvs
@@ -22,19 +22,19 @@
 
 # diode_np_1p8 
 logger.info('Extracting diode_np_1p8')
-extract_devices(diode('diode_np_1p8'), { 'N' => diode_np_1p8_terminal_n, 'P' => diode_np_1p8_terminal_p })
+extract_devices(diode('diode_np_1p8'), { 'N' => diode_np_1p8_terminal_n, 'P' => sub })
 
 # diode_pn_1p8 
 logger.info('Extracting diode_pn_1p8')
-extract_devices(diode('diode_pn_1p8'), { 'N' => diode_pn_1p8_terminal_n, 'P' => diode_pn_1p8_terminal_p })
+extract_devices(diode('diode_pn_1p8'), { 'N' => nwell_con, 'P' => diode_pn_1p8_terminal_p })
 
 # diode_np_3p3 
 logger.info('Extracting diode_np_3p3')
-extract_devices(diode('diode_np_3p3'), { 'N' => diode_np_3p3_terminal_n, 'P' => diode_np_3p3_terminal_p })
+extract_devices(diode('diode_np_3p3'), { 'N' => diode_np_3p3_terminal_n, 'P' => sub })
 
 # diode_pn_3p3 
 logger.info('Extracting diode_pn_3p3')
-extract_devices(diode('diode_pn_3p3'), { 'N' => diode_pn_3p3_terminal_n, 'P' => diode_pn_3p3_terminal_p })
+extract_devices(diode('diode_pn_3p3'), { 'N' => nwell_con, 'P' => diode_pn_3p3_terminal_p })
 
 # diode_nwp 
 logger.info('Extracting diode_nwp')
@@ -43,12 +43,12 @@
 # diode_np_1p8_nat
 logger.info('Extracting diode_np_1p8_nat')
 extract_devices(diode('diode_np_1p8_nat'), { 'N' => diode_np_1p8_nat_terminal_n, 
-                                             'P' => diode_np_1p8_nat_terminal_p, })
+                                             'P' => sub, })
 
 # diode_np_3p3_nat
 logger.info('Extracting diode_np_3p3_nat')
 extract_devices(diode('diode_np_3p3_nat'), { 'N' => diode_np_3p3_nat_terminal_n, 
-                                             'P' => diode_np_3p3_nat_terminal_p, })
+                                             'P' => sub, })
 
 # diode_dnwpw
 logger.info('Extracting diode_dnwpw')
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwps.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwps.gds
new file mode 100644
index 0000000..3e2cd60
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwps.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwpw.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwpw.gds
new file mode 100644
index 0000000..91baff7
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_dnwpw.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8.gds
new file mode 100644
index 0000000..00e0788
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8_nat.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8_nat.gds
new file mode 100644
index 0000000..5ea84d3
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_1p8_nat.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3.gds
new file mode 100644
index 0000000..888e4a5
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3_nat.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3_nat.gds
new file mode 100644
index 0000000..7a7cad2
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_np_3p3_nat.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_nwp.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_nwp.gds
new file mode 100644
index 0000000..7b82ed3
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_nwp.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_1p8.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_1p8.gds
new file mode 100644
index 0000000..f32b27a
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_1p8.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_3p3.gds b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_3p3.gds
new file mode 100644
index 0000000..68d16b3
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/layout/diode_pn_3p3.gds
Binary files differ
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwps.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwps.cdl
new file mode 100644
index 0000000..4654fe7
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwps.cdl
@@ -0,0 +1,49 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_dnwps
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:04:18 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL gnd!
+
+*.PIN gnd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_dnwps
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_dnwps I1_0_0_0_0_R0_NEG I1_0_1_0_0_R0_NEG I1_0_2_0_0_R0_NEG 
++ I1_1_0_0_0_R0_NEG I1_1_1_0_0_R0_NEG I1_1_2_0_0_R0_NEG I1_2_0_0_0_R0_NEG 
++ I1_2_1_0_0_R0_NEG I1_2_2_0_0_R0_NEG I1_default_NEG gnd!
+*.PININFO I1_0_0_0_0_R0_NEG:I I1_0_1_0_0_R0_NEG:I I1_0_2_0_0_R0_NEG:I 
+*.PININFO I1_1_0_0_0_R0_NEG:I I1_1_1_0_0_R0_NEG:I I1_1_2_0_0_R0_NEG:I 
+*.PININFO I1_2_0_0_0_R0_NEG:I I1_2_1_0_0_R0_NEG:I I1_2_2_0_0_R0_NEG:I 
+*.PININFO I1_default_NEG:I gnd!:I
+DI1_2_2_0_0_R0 gnd! I1_2_2_0_0_R0_NEG diode_dnwps AREA=10n PJ=400e-6 m=1
+DI1_2_1_0_0_R0 gnd! I1_2_1_0_0_R0_NEG diode_dnwps AREA=1.034n PJ=220.68e-6 m=1
+DI1_2_0_0_0_R0 gnd! I1_2_0_0_0_R0_NEG diode_dnwps AREA=170p PJ=203.4e-6 m=1
+DI1_1_2_0_0_R0 gnd! I1_1_2_0_0_R0_NEG diode_dnwps AREA=1.034n PJ=220.68e-6 m=1
+DI1_1_1_0_0_R0 gnd! I1_1_1_0_0_R0_NEG diode_dnwps AREA=106.916p PJ=41.36e-6 m=1
+DI1_1_0_0_0_R0 gnd! I1_1_0_0_0_R0_NEG diode_dnwps AREA=17.578p PJ=24.08e-6 m=1
+DI1_0_2_0_0_R0 gnd! I1_0_2_0_0_R0_NEG diode_dnwps AREA=170p PJ=203.4e-6 m=1
+DI1_0_1_0_0_R0 gnd! I1_0_1_0_0_R0_NEG diode_dnwps AREA=17.578p PJ=24.08e-6 m=1
+DI1_0_0_0_0_R0 gnd! I1_0_0_0_0_R0_NEG diode_dnwps AREA=3.1535p PJ=7.11e-6 m=1
+DI1_default gnd! I1_default_NEG diode_dnwps AREA=100e-12 PJ=40e-6 m=1
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwpw.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwpw.cdl
new file mode 100644
index 0000000..4f085b6
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_dnwpw.cdl
@@ -0,0 +1,50 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_dnwpw
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:06:01 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_dnwpw
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_dnwpw I1_0_0_0_0_0_R0_POS I1_0_1_0_0_0_R0_POS I1_0_2_0_0_0_R0_POS 
++ I1_1_0_0_0_0_R0_POS I1_1_1_0_0_0_R0_POS I1_1_2_0_0_0_R0_POS 
++ I1_2_0_0_0_0_R0_POS I1_2_1_0_0_0_R0_POS I1_2_2_0_0_0_R0_POS I1_default_POS 
++ vdd!
+*.PININFO I1_0_0_0_0_0_R0_POS:I I1_0_1_0_0_0_R0_POS:I I1_0_2_0_0_0_R0_POS:I 
+*.PININFO I1_1_0_0_0_0_R0_POS:I I1_1_1_0_0_0_R0_POS:I I1_1_2_0_0_0_R0_POS:I 
+*.PININFO I1_2_0_0_0_0_R0_POS:I I1_2_1_0_0_0_R0_POS:I I1_2_2_0_0_0_R0_POS:I 
+*.PININFO I1_default_POS:I vdd!:I
+DI1_2_2_0_0_0_R0 I1_2_2_0_0_0_R0_POS vdd! diode_dnwpw AREA=10n      PJ=400e-6    m=1
+DI1_2_1_0_0_0_R0 I1_2_1_0_0_0_R0_POS vdd! diode_dnwpw AREA=1.023n   PJ=220.46e-6 m=1
+DI1_2_0_0_0_0_R0 I1_2_0_0_0_0_R0_POS vdd! diode_dnwpw AREA=60p      PJ=201.2e-6  m=1
+DI1_1_2_0_0_0_R0 I1_1_2_0_0_0_R0_POS vdd! diode_dnwpw AREA=1.023n   PJ=220.46e-6 m=1
+DI1_1_1_0_0_0_R0 I1_1_1_0_0_0_R0_POS vdd! diode_dnwpw AREA=104.653p PJ=40.92e-6  m=1
+DI1_1_0_0_0_0_R0 I1_1_0_0_0_0_R0_POS vdd! diode_dnwpw AREA=6.138p   PJ=21.66e-6  m=1
+DI1_0_2_0_0_0_R0 I1_0_2_0_0_0_R0_POS vdd! diode_dnwpw AREA=60p      PJ=201.2e-6  m=1
+DI1_0_1_0_0_0_R0 I1_0_1_0_0_0_R0_POS vdd! diode_dnwpw AREA=6.138p   PJ=21.66e-6  m=1
+DI1_0_0_0_0_0_R0 I1_0_0_0_0_0_R0_POS vdd! diode_dnwpw AREA=627f     PJ=3.29e-6   m=1
+DI1_default I1_default_POS vdd! diode_dnwpw AREA=100e-12 PJ=40e-6 m=1
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8.cdl
new file mode 100644
index 0000000..4d94bbb
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8.cdl
@@ -0,0 +1,61 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_np_1p8
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:16:13 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_np_1p8
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_np_1p8 I1_0_0_0_0_R0_MINUS I1_0_1_0_0_R0_MINUS I1_0_2_0_0_R0_MINUS 
++ I1_0_3_0_0_R0_MINUS I1_1_0_0_0_R0_MINUS I1_1_1_0_0_R0_MINUS 
++ I1_1_2_0_0_R0_MINUS I1_1_3_0_0_R0_MINUS I1_2_0_0_0_R0_MINUS 
++ I1_2_1_0_0_R0_MINUS I1_2_2_0_0_R0_MINUS I1_2_3_0_0_R0_MINUS 
++ I1_3_0_0_0_R0_MINUS I1_3_1_0_0_R0_MINUS I1_3_2_0_0_R0_MINUS 
++ I1_3_3_0_0_R0_MINUS I1_default_MINUS vdd!
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_1_0_0_R0_MINUS:I I1_0_2_0_0_R0_MINUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_1_0_0_0_R0_MINUS:I I1_1_1_0_0_R0_MINUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_3_0_0_R0_MINUS:I I1_2_0_0_0_R0_MINUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_2_0_0_R0_MINUS:I I1_2_3_0_0_R0_MINUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_1_0_0_R0_MINUS:I I1_3_2_0_0_R0_MINUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_default_MINUS:I vdd!:I
+DI1_3_3_0_0_R0 vdd! I1_3_3_0_0_R0_MINUS diode_np_1p8 m=1 AREA=10n PJ=400u
+DI1_3_2_0_0_R0 vdd! I1_3_2_0_0_R0_MINUS diode_np_1p8 m=1 AREA=1.32n PJ=226.4u
+DI1_3_1_0_0_R0 vdd! I1_3_1_0_0_R0_MINUS diode_np_1p8 m=1 AREA=110p PJ=202.2u
+DI1_3_0_0_0_R0 vdd! I1_3_0_0_0_R0_MINUS diode_np_1p8 m=1 AREA=36p PJ=200.72u
+DI1_2_3_0_0_R0 vdd! I1_2_3_0_0_R0_MINUS diode_np_1p8 m=1 AREA=1.32n PJ=226.4u
+DI1_2_2_0_0_R0 vdd! I1_2_2_0_0_R0_MINUS diode_np_1p8 m=1 AREA=174.24p PJ=52.8u
+DI1_2_1_0_0_R0 vdd! I1_2_1_0_0_R0_MINUS diode_np_1p8 m=1 AREA=14.52p PJ=28.6u
+DI1_2_0_0_0_R0 vdd! I1_2_0_0_0_R0_MINUS diode_np_1p8 m=1 AREA=4.752p PJ=27.12u
+DI1_1_3_0_0_R0 vdd! I1_1_3_0_0_R0_MINUS diode_np_1p8 m=1 AREA=110p PJ=202.2u
+DI1_1_2_0_0_R0 vdd! I1_1_2_0_0_R0_MINUS diode_np_1p8 m=1 AREA=14.52p PJ=28.6u
+DI1_1_1_0_0_R0 vdd! I1_1_1_0_0_R0_MINUS diode_np_1p8 m=1 AREA=1.21p PJ=4.4u
+DI1_1_0_0_0_R0 vdd! I1_1_0_0_0_R0_MINUS diode_np_1p8 m=1 AREA=396f PJ=2.92u
+DI1_0_3_0_0_R0 vdd! I1_0_3_0_0_R0_MINUS diode_np_1p8 m=1 AREA=36p PJ=200.72u
+DI1_0_2_0_0_R0 vdd! I1_0_2_0_0_R0_MINUS diode_np_1p8 m=1 AREA=4.752p PJ=27.12u
+DI1_0_1_0_0_R0 vdd! I1_0_1_0_0_R0_MINUS diode_np_1p8 m=1 AREA=396f PJ=2.92u
+DI1_0_0_0_0_R0 vdd! I1_0_0_0_0_R0_MINUS diode_np_1p8 m=1 AREA=203.4f PJ=1.85u
+DI1_default vdd! I1_default_MINUS diode_np_1p8 m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8_nat.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8_nat.cdl
new file mode 100644
index 0000000..07c0cab
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_1p8_nat.cdl
@@ -0,0 +1,61 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_np_1p8_nat
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:16:13 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_np_1p8_nat
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_np_1p8_nat I1_0_0_0_0_R0_MINUS I1_0_1_0_0_R0_MINUS I1_0_2_0_0_R0_MINUS 
++ I1_0_3_0_0_R0_MINUS I1_1_0_0_0_R0_MINUS I1_1_1_0_0_R0_MINUS 
++ I1_1_2_0_0_R0_MINUS I1_1_3_0_0_R0_MINUS I1_2_0_0_0_R0_MINUS 
++ I1_2_1_0_0_R0_MINUS I1_2_2_0_0_R0_MINUS I1_2_3_0_0_R0_MINUS 
++ I1_3_0_0_0_R0_MINUS I1_3_1_0_0_R0_MINUS I1_3_2_0_0_R0_MINUS 
++ I1_3_3_0_0_R0_MINUS I1_default_MINUS vdd!
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_1_0_0_R0_MINUS:I I1_0_2_0_0_R0_MINUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_1_0_0_0_R0_MINUS:I I1_1_1_0_0_R0_MINUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_3_0_0_R0_MINUS:I I1_2_0_0_0_R0_MINUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_2_0_0_R0_MINUS:I I1_2_3_0_0_R0_MINUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_1_0_0_R0_MINUS:I I1_3_2_0_0_R0_MINUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_default_MINUS:I vdd!:I
+DI1_3_3_0_0_R0 vdd! I1_3_3_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=10n PJ=400u
+DI1_3_2_0_0_R0 vdd! I1_3_2_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=1.32n PJ=226.4u
+DI1_3_1_0_0_R0 vdd! I1_3_1_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=110p PJ=202.2u
+DI1_3_0_0_0_R0 vdd! I1_3_0_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=36p PJ=200.72u
+DI1_2_3_0_0_R0 vdd! I1_2_3_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=1.32n PJ=226.4u
+DI1_2_2_0_0_R0 vdd! I1_2_2_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=174.24p PJ=52.8u
+DI1_2_1_0_0_R0 vdd! I1_2_1_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=14.52p PJ=28.6u
+DI1_2_0_0_0_R0 vdd! I1_2_0_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=4.752p PJ=27.12u
+DI1_1_3_0_0_R0 vdd! I1_1_3_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=110p PJ=202.2u
+DI1_1_2_0_0_R0 vdd! I1_1_2_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=14.52p PJ=28.6u
+DI1_1_1_0_0_R0 vdd! I1_1_1_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=1.21p PJ=4.4u
+DI1_1_0_0_0_R0 vdd! I1_1_0_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=396f PJ=2.92u
+DI1_0_3_0_0_R0 vdd! I1_0_3_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=36p PJ=200.72u
+DI1_0_2_0_0_R0 vdd! I1_0_2_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=4.752p PJ=27.12u
+DI1_0_1_0_0_R0 vdd! I1_0_1_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=396f PJ=2.92u
+DI1_0_0_0_0_R0 vdd! I1_0_0_0_0_R0_MINUS diode_np_1p8_nat m=1 AREA=203.4f PJ=1.85u
+DI1_default vdd! I1_default_MINUS diode_np_1p8_nat m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3.cdl
new file mode 100644
index 0000000..5714936
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3.cdl
@@ -0,0 +1,61 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_np_3p3
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:18:14 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_np_3p3
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_np_3p3 I1_0_0_0_0_R0_MINUS I1_0_1_0_0_R0_MINUS I1_0_2_0_0_R0_MINUS 
++ I1_0_3_0_0_R0_MINUS I1_1_0_0_0_R0_MINUS I1_1_1_0_0_R0_MINUS 
++ I1_1_2_0_0_R0_MINUS I1_1_3_0_0_R0_MINUS I1_2_0_0_0_R0_MINUS 
++ I1_2_1_0_0_R0_MINUS I1_2_2_0_0_R0_MINUS I1_2_3_0_0_R0_MINUS 
++ I1_3_0_0_0_R0_MINUS I1_3_1_0_0_R0_MINUS I1_3_2_0_0_R0_MINUS 
++ I1_3_3_0_0_R0_MINUS I1_default_MINUS vdd!
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_1_0_0_R0_MINUS:I I1_0_2_0_0_R0_MINUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_1_0_0_0_R0_MINUS:I I1_1_1_0_0_R0_MINUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_3_0_0_R0_MINUS:I I1_2_0_0_0_R0_MINUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_2_0_0_R0_MINUS:I I1_2_3_0_0_R0_MINUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_1_0_0_R0_MINUS:I I1_3_2_0_0_R0_MINUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_default_MINUS:I vdd!:I
+DI1_3_3_0_0_R0 vdd! I1_3_3_0_0_R0_MINUS diode_np_3p3 m=1 AREA=10n PJ=400u
+DI1_3_2_0_0_R0 vdd! I1_3_2_0_0_R0_MINUS diode_np_3p3 m=1 AREA=1.32n PJ=226.4u
+DI1_3_1_0_0_R0 vdd! I1_3_1_0_0_R0_MINUS diode_np_3p3 m=1 AREA=110p PJ=202.2u
+DI1_3_0_0_0_R0 vdd! I1_3_0_0_0_R0_MINUS diode_np_3p3 m=1 AREA=36p PJ=200.72u
+DI1_2_3_0_0_R0 vdd! I1_2_3_0_0_R0_MINUS diode_np_3p3 m=1 AREA=1.32n PJ=226.4u
+DI1_2_2_0_0_R0 vdd! I1_2_2_0_0_R0_MINUS diode_np_3p3 m=1 AREA=174.24p PJ=52.8u
+DI1_2_1_0_0_R0 vdd! I1_2_1_0_0_R0_MINUS diode_np_3p3 m=1 AREA=14.52p PJ=28.6u
+DI1_2_0_0_0_R0 vdd! I1_2_0_0_0_R0_MINUS diode_np_3p3 m=1 AREA=4.752p PJ=27.12u
+DI1_1_3_0_0_R0 vdd! I1_1_3_0_0_R0_MINUS diode_np_3p3 m=1 AREA=110p PJ=202.2u
+DI1_1_2_0_0_R0 vdd! I1_1_2_0_0_R0_MINUS diode_np_3p3 m=1 AREA=14.52p PJ=28.6u
+DI1_1_1_0_0_R0 vdd! I1_1_1_0_0_R0_MINUS diode_np_3p3 m=1 AREA=1.21p PJ=4.4u
+DI1_1_0_0_0_R0 vdd! I1_1_0_0_0_R0_MINUS diode_np_3p3 m=1 AREA=396f PJ=2.92u
+DI1_0_3_0_0_R0 vdd! I1_0_3_0_0_R0_MINUS diode_np_3p3 m=1 AREA=36p PJ=200.72u
+DI1_0_2_0_0_R0 vdd! I1_0_2_0_0_R0_MINUS diode_np_3p3 m=1 AREA=4.752p PJ=27.12u
+DI1_0_1_0_0_R0 vdd! I1_0_1_0_0_R0_MINUS diode_np_3p3 m=1 AREA=396f PJ=2.92u
+DI1_0_0_0_0_R0 vdd! I1_0_0_0_0_R0_MINUS diode_np_3p3 m=1 AREA=203.4f PJ=1.85u
+DI1_default vdd! I1_default_MINUS diode_np_3p3 m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3_nat.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3_nat.cdl
new file mode 100644
index 0000000..568c3bb
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_np_3p3_nat.cdl
@@ -0,0 +1,61 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_np_3p3_nat
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:18:14 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_np_3p3_nat
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_np_3p3_nat I1_0_0_0_0_R0_MINUS I1_0_1_0_0_R0_MINUS I1_0_2_0_0_R0_MINUS 
++ I1_0_3_0_0_R0_MINUS I1_1_0_0_0_R0_MINUS I1_1_1_0_0_R0_MINUS 
++ I1_1_2_0_0_R0_MINUS I1_1_3_0_0_R0_MINUS I1_2_0_0_0_R0_MINUS 
++ I1_2_1_0_0_R0_MINUS I1_2_2_0_0_R0_MINUS I1_2_3_0_0_R0_MINUS 
++ I1_3_0_0_0_R0_MINUS I1_3_1_0_0_R0_MINUS I1_3_2_0_0_R0_MINUS 
++ I1_3_3_0_0_R0_MINUS I1_default_MINUS vdd!
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_1_0_0_R0_MINUS:I I1_0_2_0_0_R0_MINUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_1_0_0_0_R0_MINUS:I I1_1_1_0_0_R0_MINUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_3_0_0_R0_MINUS:I I1_2_0_0_0_R0_MINUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_2_0_0_R0_MINUS:I I1_2_3_0_0_R0_MINUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_1_0_0_R0_MINUS:I I1_3_2_0_0_R0_MINUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_default_MINUS:I vdd!:I
+DI1_3_3_0_0_R0 vdd! I1_3_3_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=10n PJ=400u
+DI1_3_2_0_0_R0 vdd! I1_3_2_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=1.32n PJ=226.4u
+DI1_3_1_0_0_R0 vdd! I1_3_1_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=110p PJ=202.2u
+DI1_3_0_0_0_R0 vdd! I1_3_0_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=36p PJ=200.72u
+DI1_2_3_0_0_R0 vdd! I1_2_3_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=1.32n PJ=226.4u
+DI1_2_2_0_0_R0 vdd! I1_2_2_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=174.24p PJ=52.8u
+DI1_2_1_0_0_R0 vdd! I1_2_1_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=14.52p PJ=28.6u
+DI1_2_0_0_0_R0 vdd! I1_2_0_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=4.752p PJ=27.12u
+DI1_1_3_0_0_R0 vdd! I1_1_3_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=110p PJ=202.2u
+DI1_1_2_0_0_R0 vdd! I1_1_2_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=14.52p PJ=28.6u
+DI1_1_1_0_0_R0 vdd! I1_1_1_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=1.21p PJ=4.4u
+DI1_1_0_0_0_R0 vdd! I1_1_0_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=396f PJ=2.92u
+DI1_0_3_0_0_R0 vdd! I1_0_3_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=36p PJ=200.72u
+DI1_0_2_0_0_R0 vdd! I1_0_2_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=4.752p PJ=27.12u
+DI1_0_1_0_0_R0 vdd! I1_0_1_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=396f PJ=2.92u
+DI1_0_0_0_0_R0 vdd! I1_0_0_0_0_R0_MINUS diode_np_3p3_nat m=1 AREA=203.4f PJ=1.85u
+DI1_default vdd! I1_default_MINUS diode_np_3p3_nat m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_nwp.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_nwp.cdl
new file mode 100644
index 0000000..e68eada
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_nwp.cdl
@@ -0,0 +1,61 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_nwp
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:42:29 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+*.GLOBAL vdd!
+
+*.PIN vdd!
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_nwp
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_nwp I1_0_0_0_0_R0_MINUS I1_0_1_0_0_R0_MINUS I1_0_2_0_0_R0_MINUS 
++ I1_0_3_0_0_R0_MINUS I1_1_0_0_0_R0_MINUS I1_1_1_0_0_R0_MINUS 
++ I1_1_2_0_0_R0_MINUS I1_1_3_0_0_R0_MINUS I1_2_0_0_0_R0_MINUS 
++ I1_2_1_0_0_R0_MINUS I1_2_2_0_0_R0_MINUS I1_2_3_0_0_R0_MINUS 
++ I1_3_0_0_0_R0_MINUS I1_3_1_0_0_R0_MINUS I1_3_2_0_0_R0_MINUS 
++ I1_3_3_0_0_R0_MINUS I1_default_MINUS vdd!
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_1_0_0_R0_MINUS:I I1_0_2_0_0_R0_MINUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_1_0_0_0_R0_MINUS:I I1_1_1_0_0_R0_MINUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_3_0_0_R0_MINUS:I I1_2_0_0_0_R0_MINUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_2_0_0_R0_MINUS:I I1_2_3_0_0_R0_MINUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_1_0_0_R0_MINUS:I I1_3_2_0_0_R0_MINUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_default_MINUS:I vdd!:I
+DI1_3_3_0_0_R0 vdd! I1_3_3_0_0_R0_MINUS diode_nwp m=1 AREA=10n PJ=400u
+DI1_3_2_0_0_R0 vdd! I1_3_2_0_0_R0_MINUS diode_nwp m=1 AREA=1.21n PJ=224.2u
+DI1_3_1_0_0_R0 vdd! I1_3_1_0_0_R0_MINUS diode_nwp m=1 AREA=123p PJ=202.46u
+DI1_3_0_0_0_R0 vdd! I1_3_0_0_0_R0_MINUS diode_nwp m=1 AREA=86p PJ=201.72u
+DI1_2_3_0_0_R0 vdd! I1_2_3_0_0_R0_MINUS diode_nwp m=1 AREA=1.21n PJ=224.2u
+DI1_2_2_0_0_R0 vdd! I1_2_2_0_0_R0_MINUS diode_nwp m=1 AREA=146.41p PJ=48.4u
+DI1_2_1_0_0_R0 vdd! I1_2_1_0_0_R0_MINUS diode_nwp m=1 AREA=14.883p PJ=26.66u
+DI1_2_0_0_0_R0 vdd! I1_2_0_0_0_R0_MINUS diode_nwp m=1 AREA=10.406p PJ=25.92u
+DI1_1_3_0_0_R0 vdd! I1_1_3_0_0_R0_MINUS diode_nwp m=1 AREA=123p PJ=202.46u
+DI1_1_2_0_0_R0 vdd! I1_1_2_0_0_R0_MINUS diode_nwp m=1 AREA=14.883p PJ=26.66u
+DI1_1_1_0_0_R0 vdd! I1_1_1_0_0_R0_MINUS diode_nwp m=1 AREA=1.5129p PJ=4.92u
+DI1_1_0_0_0_R0 vdd! I1_1_0_0_0_R0_MINUS diode_nwp m=1 AREA=1.0578p PJ=4.18u
+DI1_0_3_0_0_R0 vdd! I1_0_3_0_0_R0_MINUS diode_nwp m=1 AREA=86p PJ=201.72u
+DI1_0_2_0_0_R0 vdd! I1_0_2_0_0_R0_MINUS diode_nwp m=1 AREA=10.406p PJ=25.92u
+DI1_0_1_0_0_R0 vdd! I1_0_1_0_0_R0_MINUS diode_nwp m=1 AREA=1.0578p PJ=4.18u
+DI1_0_0_0_0_R0 vdd! I1_0_0_0_0_R0_MINUS diode_nwp m=1 AREA=739.6f PJ=3.44u
+DI1_default vdd! I1_default_MINUS diode_nwp m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_1p8.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_1p8.cdl
new file mode 100644
index 0000000..f5087d7
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_1p8.cdl
@@ -0,0 +1,86 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_pn_1p8
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:49:28 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_pn_1p8
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_pn_1p8 I1_0_0_0_0_R0_MINUS I1_0_0_0_0_R0_PLUS I1_0_1_0_0_R0_MINUS 
++ I1_0_1_0_0_R0_PLUS I1_0_2_0_0_R0_MINUS I1_0_2_0_0_R0_PLUS 
++ I1_0_3_0_0_R0_MINUS I1_0_3_0_0_R0_PLUS I1_1_0_0_0_R0_MINUS 
++ I1_1_0_0_0_R0_PLUS I1_1_1_0_0_R0_MINUS I1_1_1_0_0_R0_PLUS 
++ I1_1_2_0_0_R0_MINUS I1_1_2_0_0_R0_PLUS I1_1_3_0_0_R0_MINUS 
++ I1_1_3_0_0_R0_PLUS I1_2_0_0_0_R0_MINUS I1_2_0_0_0_R0_PLUS 
++ I1_2_1_0_0_R0_MINUS I1_2_1_0_0_R0_PLUS I1_2_2_0_0_R0_MINUS 
++ I1_2_2_0_0_R0_PLUS I1_2_3_0_0_R0_MINUS I1_2_3_0_0_R0_PLUS 
++ I1_3_0_0_0_R0_MINUS I1_3_0_0_0_R0_PLUS I1_3_1_0_0_R0_MINUS 
++ I1_3_1_0_0_R0_PLUS I1_3_2_0_0_R0_MINUS I1_3_2_0_0_R0_PLUS 
++ I1_3_3_0_0_R0_MINUS I1_3_3_0_0_R0_PLUS I1_default_MINUS I1_default_PLUS
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_0_0_0_R0_PLUS:I I1_0_1_0_0_R0_MINUS:I 
+*.PININFO I1_0_1_0_0_R0_PLUS:I I1_0_2_0_0_R0_MINUS:I I1_0_2_0_0_R0_PLUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_0_3_0_0_R0_PLUS:I I1_1_0_0_0_R0_MINUS:I 
+*.PININFO I1_1_0_0_0_R0_PLUS:I I1_1_1_0_0_R0_MINUS:I I1_1_1_0_0_R0_PLUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_2_0_0_R0_PLUS:I I1_1_3_0_0_R0_MINUS:I 
+*.PININFO I1_1_3_0_0_R0_PLUS:I I1_2_0_0_0_R0_MINUS:I I1_2_0_0_0_R0_PLUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_1_0_0_R0_PLUS:I I1_2_2_0_0_R0_MINUS:I 
+*.PININFO I1_2_2_0_0_R0_PLUS:I I1_2_3_0_0_R0_MINUS:I I1_2_3_0_0_R0_PLUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_0_0_0_R0_PLUS:I I1_3_1_0_0_R0_MINUS:I 
+*.PININFO I1_3_1_0_0_R0_PLUS:I I1_3_2_0_0_R0_MINUS:I I1_3_2_0_0_R0_PLUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_3_3_0_0_R0_PLUS:I I1_default_MINUS:I 
+*.PININFO I1_default_PLUS:I
+DI1_3_3_0_0_R0 I1_3_3_0_0_R0_PLUS I1_3_3_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=10n 
++ PJ=400u
+DI1_3_2_0_0_R0 I1_3_2_0_0_R0_PLUS I1_3_2_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=1.32n 
++ PJ=226.4u
+DI1_3_1_0_0_R0 I1_3_1_0_0_R0_PLUS I1_3_1_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=110p 
++ PJ=202.2u
+DI1_3_0_0_0_R0 I1_3_0_0_0_R0_PLUS I1_3_0_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=36p 
++ PJ=200.72u
+DI1_2_3_0_0_R0 I1_2_3_0_0_R0_PLUS I1_2_3_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=1.32n 
++ PJ=226.4u
+DI1_2_2_0_0_R0 I1_2_2_0_0_R0_PLUS I1_2_2_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=174.24p 
++ PJ=52.8u
+DI1_2_1_0_0_R0 I1_2_1_0_0_R0_PLUS I1_2_1_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=14.52p 
++ PJ=28.6u
+DI1_2_0_0_0_R0 I1_2_0_0_0_R0_PLUS I1_2_0_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=4.752p 
++ PJ=27.12u
+DI1_1_3_0_0_R0 I1_1_3_0_0_R0_PLUS I1_1_3_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=110p 
++ PJ=202.2u
+DI1_1_2_0_0_R0 I1_1_2_0_0_R0_PLUS I1_1_2_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=14.52p 
++ PJ=28.6u
+DI1_1_1_0_0_R0 I1_1_1_0_0_R0_PLUS I1_1_1_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=1.21p 
++ PJ=4.4u
+DI1_1_0_0_0_R0 I1_1_0_0_0_R0_PLUS I1_1_0_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=396f 
++ PJ=2.92u
+DI1_0_3_0_0_R0 I1_0_3_0_0_R0_PLUS I1_0_3_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=36p 
++ PJ=200.72u
+DI1_0_2_0_0_R0 I1_0_2_0_0_R0_PLUS I1_0_2_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=4.752p 
++ PJ=27.12u
+DI1_0_1_0_0_R0 I1_0_1_0_0_R0_PLUS I1_0_1_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=396f 
++ PJ=2.92u
+DI1_0_0_0_0_R0 I1_0_0_0_0_R0_PLUS I1_0_0_0_0_R0_MINUS diode_pn_1p8 m=1 AREA=203.4f 
++ PJ=1.85u
+DI1_default I1_default_PLUS I1_default_MINUS diode_pn_1p8 m=1 AREA=1p PJ=4u
+.ENDS
+
diff --git a/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_3p3.cdl b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_3p3.cdl
new file mode 100644
index 0000000..2c9deae
--- /dev/null
+++ b/IC/klayout/lvs/testing/testcases/unit/diode_devices/netlist/diode_pn_3p3.cdl
@@ -0,0 +1,86 @@
+************************************************************************
+* auCdl Netlist:
+* 
+* Library Name:  TCG_Library
+* Top Cell Name: diode_pn_3p3
+* View Name:     schematic
+* Netlisted on:  Nov 24 09:50:38 2021
+************************************************************************
+
+*.BIPOLAR
+*.RESI = 2000 
+*.RESVAL
+*.CAPVAL
+*.DIOPERI
+*.DIOAREA
+*.EQUATION
+*.SCALE METER
+*.MEGA
+.PARAM
+
+
+
+************************************************************************
+* Library Name: TCG_Library
+* Cell Name:    diode_pn_3p3
+* View Name:    schematic
+************************************************************************
+
+.SUBCKT diode_pn_3p3 I1_0_0_0_0_R0_MINUS I1_0_0_0_0_R0_PLUS I1_0_1_0_0_R0_MINUS 
++ I1_0_1_0_0_R0_PLUS I1_0_2_0_0_R0_MINUS I1_0_2_0_0_R0_PLUS 
++ I1_0_3_0_0_R0_MINUS I1_0_3_0_0_R0_PLUS I1_1_0_0_0_R0_MINUS 
++ I1_1_0_0_0_R0_PLUS I1_1_1_0_0_R0_MINUS I1_1_1_0_0_R0_PLUS 
++ I1_1_2_0_0_R0_MINUS I1_1_2_0_0_R0_PLUS I1_1_3_0_0_R0_MINUS 
++ I1_1_3_0_0_R0_PLUS I1_2_0_0_0_R0_MINUS I1_2_0_0_0_R0_PLUS 
++ I1_2_1_0_0_R0_MINUS I1_2_1_0_0_R0_PLUS I1_2_2_0_0_R0_MINUS 
++ I1_2_2_0_0_R0_PLUS I1_2_3_0_0_R0_MINUS I1_2_3_0_0_R0_PLUS 
++ I1_3_0_0_0_R0_MINUS I1_3_0_0_0_R0_PLUS I1_3_1_0_0_R0_MINUS 
++ I1_3_1_0_0_R0_PLUS I1_3_2_0_0_R0_MINUS I1_3_2_0_0_R0_PLUS 
++ I1_3_3_0_0_R0_MINUS I1_3_3_0_0_R0_PLUS I1_default_MINUS I1_default_PLUS
+*.PININFO I1_0_0_0_0_R0_MINUS:I I1_0_0_0_0_R0_PLUS:I I1_0_1_0_0_R0_MINUS:I 
+*.PININFO I1_0_1_0_0_R0_PLUS:I I1_0_2_0_0_R0_MINUS:I I1_0_2_0_0_R0_PLUS:I 
+*.PININFO I1_0_3_0_0_R0_MINUS:I I1_0_3_0_0_R0_PLUS:I I1_1_0_0_0_R0_MINUS:I 
+*.PININFO I1_1_0_0_0_R0_PLUS:I I1_1_1_0_0_R0_MINUS:I I1_1_1_0_0_R0_PLUS:I 
+*.PININFO I1_1_2_0_0_R0_MINUS:I I1_1_2_0_0_R0_PLUS:I I1_1_3_0_0_R0_MINUS:I 
+*.PININFO I1_1_3_0_0_R0_PLUS:I I1_2_0_0_0_R0_MINUS:I I1_2_0_0_0_R0_PLUS:I 
+*.PININFO I1_2_1_0_0_R0_MINUS:I I1_2_1_0_0_R0_PLUS:I I1_2_2_0_0_R0_MINUS:I 
+*.PININFO I1_2_2_0_0_R0_PLUS:I I1_2_3_0_0_R0_MINUS:I I1_2_3_0_0_R0_PLUS:I 
+*.PININFO I1_3_0_0_0_R0_MINUS:I I1_3_0_0_0_R0_PLUS:I I1_3_1_0_0_R0_MINUS:I 
+*.PININFO I1_3_1_0_0_R0_PLUS:I I1_3_2_0_0_R0_MINUS:I I1_3_2_0_0_R0_PLUS:I 
+*.PININFO I1_3_3_0_0_R0_MINUS:I I1_3_3_0_0_R0_PLUS:I I1_default_MINUS:I 
+*.PININFO I1_default_PLUS:I
+DI1_3_3_0_0_R0 I1_3_3_0_0_R0_PLUS I1_3_3_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=10n 
++ PJ=400u
+DI1_3_2_0_0_R0 I1_3_2_0_0_R0_PLUS I1_3_2_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=1.32n 
++ PJ=226.4u
+DI1_3_1_0_0_R0 I1_3_1_0_0_R0_PLUS I1_3_1_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=110p 
++ PJ=202.2u
+DI1_3_0_0_0_R0 I1_3_0_0_0_R0_PLUS I1_3_0_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=36p 
++ PJ=200.72u
+DI1_2_3_0_0_R0 I1_2_3_0_0_R0_PLUS I1_2_3_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=1.32n 
++ PJ=226.4u
+DI1_2_2_0_0_R0 I1_2_2_0_0_R0_PLUS I1_2_2_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=174.24p 
++ PJ=52.8u
+DI1_2_1_0_0_R0 I1_2_1_0_0_R0_PLUS I1_2_1_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=14.52p 
++ PJ=28.6u
+DI1_2_0_0_0_R0 I1_2_0_0_0_R0_PLUS I1_2_0_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=4.752p 
++ PJ=27.12u
+DI1_1_3_0_0_R0 I1_1_3_0_0_R0_PLUS I1_1_3_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=110p 
++ PJ=202.2u
+DI1_1_2_0_0_R0 I1_1_2_0_0_R0_PLUS I1_1_2_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=14.52p 
++ PJ=28.6u
+DI1_1_1_0_0_R0 I1_1_1_0_0_R0_PLUS I1_1_1_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=1.21p 
++ PJ=4.4u
+DI1_1_0_0_0_R0 I1_1_0_0_0_R0_PLUS I1_1_0_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=396f 
++ PJ=2.92u
+DI1_0_3_0_0_R0 I1_0_3_0_0_R0_PLUS I1_0_3_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=36p 
++ PJ=200.72u
+DI1_0_2_0_0_R0 I1_0_2_0_0_R0_PLUS I1_0_2_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=4.752p 
++ PJ=27.12u
+DI1_0_1_0_0_R0 I1_0_1_0_0_R0_PLUS I1_0_1_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=396f 
++ PJ=2.92u
+DI1_0_0_0_0_R0 I1_0_0_0_0_R0_PLUS I1_0_0_0_0_R0_MINUS diode_pn_3p3 m=1 AREA=203.4f 
++ PJ=1.85u
+DI1_default I1_default_PLUS I1_default_MINUS diode_pn_3p3 m=1 AREA=1p PJ=4u
+.ENDS
+