blob: a72f4b78faba83cf371cd3cfe16c3b9c8befff9a [file] [log] [blame]
################################################################################################
# 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.
################################################################################################
#================================================
#------------ DEVICES CONNECTIVITY --------------
#================================================
logger.info('Starting GF180 LVS connectivity setup')
#================================
# ----- GENERAL CONNECTIONS -----
#================================
logger.info('Starting GF180 LVS connectivity setup (Inter-layer)')
# Inter-layer
connect(sub, ptap)
connect(dnwell, ntap_dw)
connect(nwell_con, ntap)
connect(ptap, contact)
connect(ptap_dw, contact)
connect(ntap, contact)
connect(ntap_dw, contact)
connect(psd, contact)
connect(psd_dw, contact)
connect(nsd, contact)
connect(poly2_con, contact)
connect(contact, metal1)
connect(metal1, via1)
connect(via1, metal2_ncap)
if METAL_LEVEL != '2LM'
connect(metal2_ncap, via2)
connect(via2, metal3_ncap)
if METAL_LEVEL != '3LM'
connect(metal3_ncap, via3)
connect(via3, metal4_ncap)
if METAL_LEVEL != '4LM'
connect(metal4_ncap, via4)
connect(via4, metal5_ncap)
if METAL_LEVEL != '5LM'
connect(metal5_ncap, via5)
connect(via5, metaltop)
end
end
end
end
logger.info('Starting GF180 LVS connectivity setup (Attaching labels)')
# Attaching labels
connect(comp, comp_label)
connect(poly2_con, poly2_label)
connect(metal1, metal1_label)
connect(metal2_ncap, metal2_label)
if METAL_LEVEL != '2LM'
connect(metal3_ncap, metal3_label)
if METAL_LEVEL != '3LM'
connect(metal4_ncap, metal4_label)
if METAL_LEVEL != '4LM'
connect(metal5_ncap, metal5_label)
connect(metaltop, metaltop_label) if METAL_LEVEL != '5LM'
end
end
end
logger.info('Starting GF180 LVS connectivity setup (Global)')
# Global
connect_global(sub, substrate_name)
logger.info('Starting GF180 LVS connectivity setup (Multifinger Devices)')
# Multifinger Devices
connect_implicit('*')
#================================
# ------ BJT CONNECTIONS --------
#================================
logger.info('Starting LVS BJT CONNECTIONS')
# ==============
# ---- vnpn ----
# ==============
# npn_02p00x02p00 nodes connections
connect(npn_02p00x02p00_e, contact)
connect(npn_02p00x02p00_b, contact)
connect(npn_02p00x02p00_c, contact)
# npn_05p00x05p00 nodes connections
connect(npn_05p00x05p00_e, contact)
connect(npn_05p00x05p00_b, contact)
connect(npn_05p00x05p00_c, contact)
# ==============
# ---- vpnp ----
# ==============
# pnp_10p00x10p00 nodes connections
connect(pnp_10p00x10p00_e, contact)
connect(pnp_10p00x10p00_b, contact)
connect(pnp_10p00x10p00_c, contact)
# pnp_05p00x05p00 nodes connections
connect(pnp_05p00x05p00_e, contact)
connect(pnp_05p00x05p00_b, contact)
connect(pnp_05p00x05p00_c, contact)
# pnp_05p00x00p42 nodes connections
connect(pnp_05p00x00p42_e, contact)
connect(pnp_05p00x00p42_b, contact)
connect(pnp_05p00x00p42_c, contact)
# pnp_1p2x2p5 nodes connections
connect(pnp_1p2x2p5_e, contact)
connect(pnp_1p2x2p5_b, contact)
connect(pnp_1p2x2p5_c, contact)
# pnp_00p46x1p2 nodes connections
connect(pnp_00p46x1p2_e, contact)
connect(pnp_00p46x1p2_b, contact)
connect(pnp_00p46x1p2_c, contact)
# pnp_00p46x00p46 nodes connections
connect(pnp_00p46x00p46_e, contact)
connect(pnp_00p46x00p46_b, contact)
connect(pnp_00p46x00p46_c, contact)
#================================
# ----- DIODE CONNECTIONS -------
#================================
logger.info('Starting LVS DIODE CONNECTIONS')
# diode_np_1p8
connect(diode_np_1p8_terminal_n, contact)
# diode_pn_1p8
connect(diode_pn_1p8_terminal_p, contact)
# diode_np_3p3
connect(diode_np_3p3_terminal_n, contact)
# diode_pn_3p3
connect(diode_pn_3p3_terminal_p, contact)
# diode_nwp
connect(diode_nwp_terminal_n, contact)
connect(diode_nwp_terminal_p, contact)
# diode_np_1p8_nat
connect(diode_np_1p8_nat_terminal_n, contact)
# diode_np_3p3_nat
connect(diode_np_3p3_nat_terminal_n, contact)
# diode_dnwpw
connect(diode_dnwpw_terminal_p, contact)
# diode_dnwps
connect(diode_dnwps_terminal_p, contact)
#==================================
# ------ MIMCAP CONNECTIONS -------
#==================================
logger.info('Starting LVS MIMCAP CONNECTIONS')
case MIM_OPTION
when 'A'
if MIM_CAP
connect(metal2, mim_virtual)
connect(fuse_cap, via2)
end
when 'B'
if MIM_CAP
connect(topmin1_metal, mimtm_virtual)
connect(fuse_cap, top_via)
end
if MIM_CAP_STACK
connect(topmin1_metal, mimtm_stack1_virtual)
connect(fuse_cap, top_via)
connect(topmin2_metal, mimtm_stack2_virtual)
connect(fuse2_cap, topmin1_via)
end
end
#========================================
# ------ PN Varactors CONNECTIONS -------
#========================================
# pnvar_1p8 varactor nodes connections
connect(pnvar_1p8_terminal_n, contact)
connect(pnvar_1p8_terminal_p, contact)
#================================
# ---- RESISTOR DERIVATIONS -----
#================================
logger.info('Starting LVS RESISTOR CONNECTIONS')
connect(nplus_cont, contact)
connect(pplus_cont, contact)