blob: 689b0e8c8b2de1f1e9b8e6bf8678dc191393cf2b [file] [log] [blame]
################################################################################################
# Copyright 2023 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')
# ==============
# ---- vnpn ----
# ==============
logger.info('Starting vnpn layers DERIVATIONS')
# vnpn general nodes DERIVATIONS
nwell_dnwell = nwell.and(dnwell)
vnpn_e = ncomp.and(nwell_dnwell).and(lvs_bjt).not(dualgate)
.not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
vnpn_b = pcomp.and(nwell_dnwell).and(lvs_bjt).not(dualgate)
.not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
vnpn_c = ncomp.and(dnwell).not(nwell).and(lvs_bjt).not(dualgate)
.not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
# npn_05p00x05p00 nodes DERIVATIONS
npn_05p00x05p00_e = vnpn_e.with_area(24.5.um, 25.5.um).interacting(vnpn_e.edges.with_length(4.8.um, 5.2.um))
npn_05p00x05p00_b = vnpn_b.interacting(vnpn_b.extents.interacting(npn_05p00x05p00_e))
npn_05p00x05p00_c = vnpn_c.interacting(vnpn_c.extents.interacting(npn_05p00x05p00_e))
# npn_02p00x02p00 nodes DERIVATIONS
npn_02p00x02p00_e = vnpn_e.with_area(3.5.um, 4.5.um).interacting(vnpn_e.edges.with_length(1.8.um, 2.2.um))
npn_02p00x02p00_b = vnpn_b.interacting(vnpn_b.extents.interacting(npn_02p00x02p00_e))
npn_02p00x02p00_c = vnpn_c.interacting(vnpn_c.extents.interacting(npn_02p00x02p00_e))
#===============
# ---- vpnp ----
# ==============
logger.info('Starting vpnp layers DERIVATIONS')
# vpnp general nodes DERIVATIONS
vpnp_e = pcomp.inside(nwell).outside(dnwell).interacting(lvs_bjt).not(dualgate)
.not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
vpnp_b = ncomp.and(nwell).outside(dnwell).inside(lvs_bjt).not(dualgate)
.not(res_mk).not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
vpnp_c = ptap.inside(lvs_bjt).not(dualgate)
.not(nat).not(sab).not(poly2).not(res_mk_type1).not(resistor)
# pnp_00p46x00p46 nodes DERIVATIONS
pnp_00p46x00p46_e = vpnp_e.with_area(0.18.um, 0.26.um).interacting(vpnp_e.edges.with_length(0.4.um, 0.5.um))
pnp_00p46x00p46_b = vpnp_b.interacting(vpnp_b.extents.interacting(pnp_00p46x00p46_e))
pnp_00p46x00p46_c = vpnp_c.interacting(vpnp_c.extents.interacting(pnp_00p46x00p46_e))
# pnp_00p46x01p20 nodes DERIVATIONS
pnp_00p46x01p20_e = vpnp_e.with_area(0.5.um, 0.6.um).interacting(vpnp_e.edges.with_length(1.um, 1.4.um))
pnp_00p46x01p20_b = vpnp_b.interacting(vpnp_b.extents.interacting(pnp_00p46x01p20_e))
pnp_00p46x01p20_c = vpnp_c.interacting(vpnp_c.extents.interacting(pnp_00p46x01p20_e))
# pnp_01p20x02p50 nodes DERIVATIONS
pnp_01p20x02p50_e = vpnp_e.with_area(2.5.um, 3.5.um).interacting(vpnp_e.edges.with_length(2.3.um, 2.7.um))
pnp_01p20x02p50_b = vpnp_b.interacting(vpnp_b.extents.interacting(pnp_01p20x02p50_e))
pnp_01p20x02p50_c = vpnp_c.interacting(vpnp_c.extents.interacting(pnp_01p20x02p50_e))
# pnp_10p00x10p00 nodes DERIVATIONS
pnp_10p00x10p00_e = vpnp_e.with_area(99.5.um, 100.5.um).interacting(vpnp_e.edges.with_length(9.8.um, 10.2.um))
pnp_10p00x10p00_b = vpnp_b.interacting(vpnp_b.extents.interacting(pnp_10p00x10p00_e))
pnp_10p00x10p00_c = vpnp_c.interacting(vpnp_c.extents.interacting(pnp_10p00x10p00_e))
# pnp_05p00x05p00 nodes DERIVATIONS
pnp_05p00x05p00_e = vpnp_e.with_area(24.5.um, 25.5.um).interacting(vpnp_e.edges.with_length(4.8.um, 5.2.um))
pnp_05p00x05p00_b = vpnp_b.interacting(vpnp_b.extents.interacting(pnp_05p00x05p00_e))
pnp_05p00x05p00_c = vpnp_c.interacting(vpnp_c.extents.interacting(pnp_05p00x05p00_e))