Merge pull request #61 from mabrains/lateral_bjt_devs
adding lateral bjt devices for IC
diff --git a/IC/klayout/lvs/rule_decks/lateral_bjt_derivations.lvs b/IC/klayout/lvs/rule_decks/lateral_bjt_derivations.lvs
new file mode 100644
index 0000000..1d8878c
--- /dev/null
+++ b/IC/klayout/lvs/rule_decks/lateral_bjt_derivations.lvs
@@ -0,0 +1,58 @@
+################################################################################################
+# Copyright 2022 GlobalFoundries PDK Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################################
+
+#================================
+# ------ BJT DERIVATIONS --------
+#================================
+
+logger.info('Starting BJT DERIVATIONS')
+
+#===============
+# ---- lpnp ----
+# ==============
+logger.info('Starting lpnp layers DERIVATIONS')
+
+# lpnp general nodes DERIVATIONS
+e_c_layer = pcomp.inside(nwell).outside(dnwell).inside(lvs_bjt).not(dualgate)
+ .not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
+
+lpnp_b = ncomp.and(nwell).outside(dnwell).interacting(lvs_bjt).covering(e_c_layer)
+ .not(dualgate).not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
+
+lpnp_c = e_c_layer.inside(lpnp_b)
+
+lpnp_e = e_c_layer.inside(lpnp_b).outside(lpnp_c)
+
+
+# lpnp_1p8_0p54x0p54 nodes DERIVATIONS
+lpnp_1p8_0p54x0p54_e = lpnp_e.with_area(0.2.um, 0.4.um).interacting(vpnp_e.edges.with_length(0.5.um, 0.6.um))
+lpnp_1p8_0p54x0p54_b = lpnp_b.interacting(vpnp_b.extents.interacting(lpnp_1p8_0p54x0p54_e))
+lpnp_1p8_0p54x0p54_c = lpnp_c.interacting(vpnp_c.extents.interacting(lpnp_1p8_0p54x0p54_e))
+
+# lpnp_1p8_0p54x1p2 nodes DERIVATIONS
+lpnp_1p8_0p54x1p2_e = lpnp_e.with_area(0.5.um, 0.8.um).interacting(vpnp_e.edges.with_length(1.um, 1.4.um))
+lpnp_1p8_0p54x1p2_b = lpnp_b.interacting(vpnp_b.extents.interacting(lpnp_1p8_0p54x1p2_e))
+lpnp_1p8_0p54x1p2_c = lpnp_c.interacting(vpnp_c.extents.interacting(lpnp_1p8_0p54x1p2_e))
+
+# lpnp_1p8_1p2x2p5 nodes DERIVATIONS
+lpnp_1p8_1p2x2p5_e = lpnp_e.with_area(2.5.um, 3.5.um).interacting(vpnp_e.edges.with_length(2.3.um, 2.7.um))
+lpnp_1p8_1p2x2p5_b = lpnp_b.interacting(vpnp_b.extents.interacting(lpnp_1p8_1p2x2p5_e))
+lpnp_1p8_1p2x2p5_c = lpnp_c.interacting(vpnp_c.extents.interacting(lpnp_1p8_1p2x2p5_e))
+
+# lpnp_1p8_05p00x05p00 nodes DERIVATIONS
+lpnp_1p8_05p00x05p00_e = lpnp_e.with_area(24.5.um, 25.5.um).interacting(vpnp_e.edges.with_length(4.8.um, 5.2.um))
+lpnp_1p8_05p00x05p00_b = lpnp_b.interacting(vpnp_b.extents.interacting(lpnp_1p8_1p2x2p5_e))
+lpnp_1p8_05p00x05p00_c = lpnp_c.interacting(vpnp_c.extents.interacting(lpnp_1p8_1p2x2p5_e))
\ No newline at end of file
diff --git a/IC/klayout/lvs/rule_decks/lateral_bjt_extraction.lvs b/IC/klayout/lvs/rule_decks/lateral_bjt_extraction.lvs
new file mode 100644
index 0000000..591275a
--- /dev/null
+++ b/IC/klayout/lvs/rule_decks/lateral_bjt_extraction.lvs
@@ -0,0 +1,75 @@
+################################################################################################
+# Copyright 2022 GlobalFoundries PDK Authors
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+################################################################################################
+
+#================================
+# ------- BJT EXTRACTION --------
+#================================
+
+
+# ====================
+# ------- lpnp--------
+# ====================
+logger.info('Starting lpnp BJT EXTRACTION')
+
+# lpnp_1p8_0p54x0p54 BJT
+ignore_parameter('lpnp_1p8_0p54x0p54', 'AE')
+logger.info('Extracting lpnp_1p8_0p54x0p54 BJT')
+extract_devices(bjt4('lpnp_1p8_0p54x0p54'), { 'C' => lpnp_1p8_0p54x0p54_c.extents,
+ 'B' => lpnp_1p8_0p54x0p54_b.extents,
+ 'E' => lpnp_1p8_0p54x0p54_e,
+ 'S' => sub.extents,
+ 'tC' => lpnp_1p8_0p54x0p54_c,
+ 'tB' => lpnp_1p8_0p54x0p54_b,
+ 'tE' => lpnp_1p8_0p54x0p54_e
+ 'tS' => sub })
+
+# lpnp_1p8_0p54x1p2 BJT
+ignore_parameter('lpnp_1p8_0p54x1p2', 'AE')
+logger.info('Extracting lpnp_1p8_0p54x1p2 BJT')
+extract_devices(bjt4('lpnp_1p8_0p54x1p2'), { 'C' => lpnp_1p8_0p54x1p2_c.extents,
+ 'B' => lpnp_1p8_0p54x1p2_b.extents,
+ 'E' => lpnp_1p8_0p54x1p2_e,
+ 'S' => sub.extents,
+ 'tC' => lpnp_1p8_0p54x1p2_c,
+ 'tB' => lpnp_1p8_0p54x1p2_b,
+ 'tE' => lpnp_1p8_0p54x1p2_e
+ 'tS' => sub })
+
+# lpnp_1p8_1p2x2p5 BJT
+ignore_parameter('lpnp_1p8_1p2x2p5', 'AE')
+logger.info('Extracting lpnp_1p8_1p2x2p5 BJT')
+extract_devices(bjt4('lpnp_1p8_1p2x2p5'), { 'C' => lpnp_1p8_1p2x2p5_c.extents,
+ 'B' => lpnp_1p8_1p2x2p5_b.extents,
+ 'E' => lpnp_1p8_1p2x2p5_e,
+ 'S' => sub.extents,
+ 'tC' => lpnp_1p8_1p2x2p5_c,
+ 'tB' => lpnp_1p8_1p2x2p5_b,
+ 'tE' => lpnp_1p8_1p2x2p5_e
+ 'tS' => sub})
+
+
+# lpnp_1p8_05p00x05p00 BJT
+ignore_parameter('lpnp_1p8_05p00x05p00', 'AE')
+logger.info('Extracting lpnp_1p8_05p00x05p00 BJT')
+extract_devices(bjt4('lpnp_1p8_05p00x05p00'), { 'C' => lpnp_1p8_05p00x05p00_c.extents,
+ 'B' => lpnp_1p8_05p00x05p00_b.extents,
+ 'E' => lpnp_1p8_05p00x05p00_e,
+ 'S' => sub.extents,
+ 'tC' => lpnp_1p8_05p00x05p00_c,
+ 'tB' => lpnp_1p8_05p00x05p00_b,
+ 'tE' => lpnp_1p8_05p00x05p00_e
+ 'tS' => sub})
+