blob: 42902b14f62050a40cb32833137ed12eeec0b305 [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.
################################################################################################
if BEOL
if METAL_LEVEL == '3LM' || METAL_LEVEL == '4LM' || METAL_LEVEL == '5LM' || METAL_LEVEL == '6LM'
#================================================
#----------------------VIA2----------------------
#================================================
# Rule V2.1: Min/max Via2 size . is 0.26µm
logger.info('Executing rule V2.1')
v21_l1 = via2.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001)
v21_l1.output('V2.1', 'V2.1 : Min/max Via2 size . : 0.26µm')
v21_l1.forget
# Rule V2.2: min. via2 spacing is 0.26µm
logger.info('Executing rule V2.2')
v22a_l1 = via2.space(0.26.um, euclidian).polygons(0.001)
v22a_l1.output('V2.2', 'V2.2 : min. via2 spacing : 0.26µm')
v22a_l1.forget
v2p3a_cond = metal2.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal2.corners(90))
v2p3a_m = metal2.edges.interacting(v2p3a_cond)
# Rule V2.3a : Min. Metal2 enclose Via2 [Metal2 with width <0.34um, Protrusion >=0.28um] is 0.06
v2p3a_l1 = v2p3a_m.enclosing(via2.edges,0.06.um,square).polygons(0.001).or(via2.not_outside(metal2).not(metal2))
v2p3a_l1.output('V2.3a','V2.3a: Min. Metal2 enclose Via2 [Metal2 with width <0.34um, Protrusion >=0.28um] is 0.06')
v2p3a_cond.forget
v2p3a_m.forget
v2p3a_l1.forget
v2p3a_l1.forget
# rule V2.3d is not a DRC check
v2p3c_ed_s1 = via2.drc(enclosed(metal2, projection) <= 0.01.um).polygons(0.001)
v2p3c_ed_s2 = via2.drc(0.01.um < enclosed(metal2, projection) < 0.04.um)
# Rule V2.3c : Min. Metal2 enclose Via2 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v2p3c_l1 = metal2.enclosing(via2,0.06.um,projection).polygons(0.001).interacting(v2p3c_ed_s1).not(v2p3c_ed_s1)
v2p3c_l2 = metal2.edges.enclosing(v2p3c_ed_s2,0.04.um).polygons(0.001)
v2p3c_l3 = (v2p3c_l1.or(v2p3c_l2)).or(via2.not_outside(metal2).not(metal2))
v2p3c_l3.output('V2.3c','V2.3c : Min. Metal2 enclose Via2 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v2p3c_ed_s1.forget
v2p3c_ed_s2.forget
v2p3c_l1.forget
v2p3c_l2.forget
v2p3c_l3.forget
v2p4a_cond = (metal3.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal3.corners(90)))
v2p4a_m = metal3.edges.interacting(v2p4a_cond)
# Rule V2.4a : Min. Metal3 enclose Via2 [Metal3 with width <0.34um, Protrusion >=0.28um] is 0.06
v2p4a_l1 = v2p4a_m.enclosing(via2.edges,0.06.um,square).polygons(0.001).or(via2.not_outside(metal3).not(metal3))
v2p4a_l1.output('V2.4a','V2.4a : Min. Metal3 enclose Via2 [Metal3 with width <0.34um, Protrusion >=0.28um] is 0.06 ')
v2p4a_cond.forget
v2p4a_m.forget
v2p4a_l1.forget
v2p4b_ed_s1 = via2.drc(enclosed(metal3, projection) <= 0.01.um).polygons(0.001)
v2p4b_ed_s2 = via2.drc(0.01.um < enclosed(metal3, projection) < 0.04.um)
# Rule V2.4b : Min. Metal3 enclose Via2 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v2p4b_l1 = metal3.enclosing(via2,0.06.um,projection).polygons(0.001).interacting(v2p4b_ed_s1).not(v2p4b_ed_s1)
v2p4b_l2 = metal3.edges.enclosing(v2p4b_ed_s2,0.04.um).polygons(0.001)
v2p4b_l3 = (v2p4b_l1.or(v2p4b_l2)).or(via2.not_outside(metal3).not(metal3))
v2p4b_l3.output('V2.4b','V2.4b : Min. Metal3 enclose Via2 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v2p4b_ed_s1.forget
v2p4b_ed_s2.forget
v2p4b_l1.forget
v2p4b_l2.forget
v2p4b_l3.forget
# rule V2.4c is not a DRC check
end #METAL_LEVEL
end #BEOL