blob: c39842f1c24491d436dcdcc462bb156327386caa [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 == '6LM'
#================================================
#----------------------VIA5----------------------
#================================================
# Rule V5.1: Min/max Via5 size . is 0.26µm
logger.info('Executing rule V5.1')
v51_l1 = via5.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001)
v51_l1.output('V5.1', 'V5.1 : Min/max Via5 size . : 0.26µm')
v51_l1.forget
# Rule V5.2: min. via5 spacing is 0.26µm
logger.info('Executing rule V5.2')
v52a_l1 = via5.space(0.26.um, euclidian).polygons(0.001)
v52a_l1.output('V5.2', 'V5.2 : min. via5 spacing : 0.26µm')
v52a_l1.forget
v5p3a_cond = metal5.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal5.corners(90))
v5p3a_m = metal5.edges.interacting(v5p3a_cond)
# Rule V5.3a : Min. Metal5 enclose Via5 [Metal5 with width <0.34um, Protrusion >=0.28um] is 0.06
v5p3a_l1 = v5p3a_m.enclosing(via5.edges,0.06.um,square).polygons(0.001).or(via5.not_outside(metal5).not(metal5))
v5p3a_l1.output('V5.3a','V5.3a: Min. Metal5 enclose Via5 [Metal5 with width <0.34um, Protrusion >=0.28um] is 0.06')
v5p3a_cond.forget
v5p3a_m.forget
v5p3a_l1.forget
v5p3a_l1.forget
# rule V5.3d is not a DRC check
v5p3c_ed_s1 = via5.drc(enclosed(metal5, projection) <= 0.01.um).polygons(0.001)
v5p3c_ed_s2 = via5.drc(0.01.um < enclosed(metal5, projection) < 0.04.um)
# Rule V5.3c : Min. Metal5 enclose Via5 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v5p3c_l1 = metal5.enclosing(via5,0.06.um,projection).polygons(0.001).interacting(v5p3c_ed_s1).not(v5p3c_ed_s1)
v5p3c_l2 = metal5.edges.enclosing(v5p3c_ed_s2,0.04.um).polygons(0.001)
v5p3c_l3 = (v5p3c_l1.or(v5p3c_l2)).or(via5.not_outside(metal5).not(metal5))
v5p3c_l3.output('V5.3c','V5.3c : Min. Metal5 enclose Via5 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v5p3c_ed_s1.forget
v5p3c_ed_s2.forget
v5p3c_l1.forget
v5p3c_l2.forget
v5p3c_l3.forget
v5p4a_cond = (metaltop.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metaltop.corners(90)))
v5p4a_m = metaltop.edges.interacting(v5p4a_cond)
# Rule V5.4a : Min. Metaltop enclose Via5 [Metaltop with width <0.34um, Protrusion >=0.28um] is 0.06
v5p4a_l1 = v5p4a_m.enclosing(via5.edges,0.06.um,square).polygons(0.001).or(via5.not_outside(metaltop).not(metaltop))
v5p4a_l1.output('V5.4a','V5.4a : Min. Metaltop enclose Via5 [Metaltop with width <0.34um, Protrusion >=0.28um] is 0.06 ')
v5p4a_cond.forget
v5p4a_m.forget
v5p4a_l1.forget
v5p4b_ed_s1 = via5.drc(enclosed(metaltop, projection) <= 0.01.um).polygons(0.001)
v5p4b_ed_s2 = via5.drc(0.01.um < enclosed(metaltop, projection) < 0.04.um)
# Rule V5.4b : Min. Metaltop enclose Via5 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v5p4b_l1 = metaltop.enclosing(via5,0.06.um,projection).polygons(0.001).interacting(v5p4b_ed_s1).not(v5p4b_ed_s1)
v5p4b_l2 = metaltop.edges.enclosing(v5p4b_ed_s2,0.04.um).polygons(0.001)
v5p4b_l3 = (v5p4b_l1.or(v5p4b_l2)).or(via5.not_outside(metaltop).not(metaltop))
v5p4b_l3.output('V5.4b','V5.4b : Min. Metaltop enclose Via5 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v5p4b_ed_s1.forget
v5p4b_ed_s2.forget
v5p4b_l1.forget
v5p4b_l2.forget
v5p4b_l3.forget
# rule V5.4c is not a DRC check
end # METAL_LEVEL
end #BEOL