blob: d49b7b011831cac87802e0aabca0544d8463a119 [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.
################################################################################################
#==================================
# ------ GENERAL DERIVATIONS ------
#==================================
dnwell_n = dnwell.not(lvpwell)
dnwell_p = dnwell.and(lvpwell)
all_nwell = dnwell_n.join(nwell)
all_nwell_pw = dnwell.join(nwell)
ncomp = comp.and(nplus)
pcomp = comp.and(pplus)
tgate = poly2.and(comp).not(res_mk)
nactive = ncomp.not(all_nwell)
nactive_pw = ncomp.not(all_nwell_pw)
ngate = nactive.and(tgate)
ngate_pw = nactive_pw.and(tgate)
nsd = nactive.interacting(ngate).not(ngate).not(res_mk)
ptap = pcomp.not(all_nwell_pw).not(res_mk)
pactive = pcomp.and(all_nwell)
pgate = pactive.and(tgate)
psd = pactive.interacting(pgate).not(pgate).not(res_mk)
ntap = ncomp.and(all_nwell).not(res_mk)
ngate_dn = ngate.and(dnwell_p)
ptap_dn = ptap.and(dnwell_p)
pgate_dn = pgate.and(dnwell_n)
ntap_dn = ntap.and(dnwell_n)
psd_dn = pcomp.and(dnwell_n).interacting(pgate_dn).not(pgate_dn).not(res_mk)
nsd_dn = ncomp.and(dnwell_p).interacting(ngate_dn).not(ngate_dn).not(res_mk)
nwell_con = nwell.not(res_mk)
lvpwell_con = lvpwell.not(res_mk)
poly2_con = poly2.not(res_mk)
case METAL_LEVEL
when '3LM', '4LM', '5LM', '6LM'
via2_n_cap = via2.not(fusetop)
via2_cap = via2.and(fusetop)
end
case METAL_LEVEL
when '4LM', '5LM', '6LM'
via3_n_cap = via3.not(fusetop)
via3_cap = via3.and(fusetop)
end
case METAL_LEVEL
when '5LM', '6LM'
via4_n_cap = via4.not(fusetop)
via4_cap = via4.and(fusetop)
end
case METAL_LEVEL
when '6LM'
via5_n_cap = via5.not(fusetop)
via5_cap = via5.and(fusetop)
end
case METAL_LEVEL
when '2LM'
top_via_n_cap = via1.not(fusetop)
top_via_cap = via1.and(fusetop)
when '3LM'
top_via_n_cap = via2.not(fusetop)
top_via_cap = via2.and(fusetop)
when '4LM'
top_via_n_cap = via3.not(fusetop)
top_via_cap = via3.and(fusetop)
when '5LM'
top_via_n_cap = via4.not(fusetop)
top_via_cap = via4.and(fusetop)
when '6LM'
top_via_n_cap = via5.not(fusetop)
top_via_cap = via5.and(fusetop)
else
logger.error("Unknown metal stack #{METAL_LEVEL}")
raise
end