blob: 93b8da18af7d33ca8c36a7cb2ba174927a82c2fb [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.
################################################################################################
#================================
# ---- RESISTOR DERIVATIONS -----
#================================
logger.info('Starting RESISTOR DERIVATIONS')
#====================
# ---- Diff RES ----
#====================
# general contacts derivations
nplus_cont = ncomp.outside(nwell).interacting(res_mk).not(res_mk).not_interacting(poly2).not(nat)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
pplus_cont = pcomp.inside(nwell).interacting(res_mk).not(res_mk).not_interacting(poly2).not(nat)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# nplus_s (Model for Salicide N+ diffusion resistor)
nplus_s_layer = ncomp.and(res_mk).not_interacting(sab).interacting(nplus_cont)
# nplus_u (Model for Unsalicide N+ diffusion resistor)
nplus_u_layer = ncomp.and(res_mk).and(sab).interacting(nplus_cont)
# pplus_s (Model for Salicide P+ diffusion resistor)
pplus_s_layer = pcomp.and(res_mk).not_interacting(sab).interacting(pplus_cont)
# pplus_u (Model for Unsalicide P+ diffusion resistor)
pplus_u_layer = pcomp.and(res_mk).and(sab).interacting(pplus_cont)
#====================
# ---- POLY RES ----
#====================
# npolyf_s (Model for Salicide N+poly resistor on field)
npolyf_s_layer = nplus.and(poly2).and(res_mk).not_interacting(sab).not(nat).outside(nwell)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# npolyf_u (Model for Unsalicide N+poly resistor on field)
npolyf_u_layer = nplus.and(poly2).and(res_mk).and(sab).not(nat).outside(nwell)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# ppolyf_s (Model for Salicide P+poly resistor on field)
ppolyf_s_layer = pplus.and(poly2).and(res_mk).not_interacting(sab).not(nat).not(nwell)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# ppolyf_u (Model for Unsalicide P+poly resistor on field)
ppolyf_u_layer = pplus.and(poly2).and(res_mk).and(sab).not(nat).not(nwell)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
#====================
# ---- POLY HRES ----
#====================
# npolyf_u_1k (Model for Unsalicide 1k high Rs N+poly resistor on field)
npolyf_u_1k_layer = poly2.interacting(nplus).and(res_mk).and(sab).not(nat).not(nwell)
.not(dualgate).and(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# ppolyf_u_1k (Model for Unsalicide 1k high Rs P+poly resistor on field)
ppolyf_u_1k_layer = poly2.interacting(pplus).and(res_mk).and(sab).not(nat).not(nwell)
.not(dualgate).and(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)
# ppolyf_u_2k (Model for Unsalicide 2k high Rs P+poly resistor on field)
ppolyf_u_2k_layer = poly2.interacting(pplus).and(res_mk_type1).and(sab).and(resistor).not(nwell)
.not_interacting(res_mk).not(dualgate).not(diode_mk).not(lvs_bjt).not(nat)
ppolyf_u_2k_cont = poly2.and(pplus).interacting(res_mk_type1).not(res_mk_type1).interacting(ppolyf_u_2k_layer)
#====================
# ---- NWELL RES ----
#====================
# nwell (Model for n-well diffusion resistor)
nwell_res = nwell.and(res_mk).not_covering(comp).not(dnwell).not(poly2).not_interacting(sab).not(nat)
.not(dualgate).not(resistor).not(diode_mk).not(lvs_bjt).not_interacting(res_mk_type1)