blob: 50f875ead205078c62319c3ca3095774b508d80b [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 == '5LM' || METAL_LEVEL == '6LM'
#================================================
#----------------------VIA4----------------------
#================================================
# Rule V4.1: Min/max Via4 size . is 0.26µm
logger.info('Executing rule V4.1')
v41_l1 = via4.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001)
v41_l1.output('V4.1', 'V4.1 : Min/max Via4 size . : 0.26µm')
v41_l1.forget
# Rule V4.2: min. via4 spacing is 0.26µm
logger.info('Executing rule V4.2')
v42a_l1 = via4.space(0.26.um, euclidian).polygons(0.001)
v42a_l1.output('V4.2', 'V4.2 : min. via4 spacing : 0.26µm')
v42a_l1.forget
v4p3a_cond = metal4.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal4.corners(90))
v4p3a_m = metal4.edges.interacting(v4p3a_cond)
# Rule V4.3a : Min. Metal4 enclose Via4 [Metal4 with width <0.34um, Protrusion >=0.28um] is 0.06
v4p3a_l1 = v4p3a_m.enclosing(via4.edges,0.06.um,square).polygons(0.001).or(via4.not_outside(metal4).not(metal4))
v4p3a_l1.output('V4.3a','V4.3a: Min. Metal4 enclose Via4 [Metal4 with width <0.34um, Protrusion >=0.28um] is 0.06')
v4p3a_cond.forget
v4p3a_m.forget
v4p3a_l1.forget
v4p3a_l1.forget
# rule V4.3d is not a DRC check
v4p3c_ed_s1 = via4.drc(enclosed(metal4, projection) <= 0.01.um).polygons(0.001)
v4p3c_ed_s2 = via4.drc(0.01.um < enclosed(metal4, projection) < 0.04.um)
# Rule V4.3c : Min. Metal4 enclose Via4 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v4p3c_l1 = metal4.enclosing(via4,0.06.um,projection).polygons(0.001).interacting(v4p3c_ed_s1).not(v4p3c_ed_s1)
v4p3c_l2 = metal4.edges.enclosing(v4p3c_ed_s2,0.04.um).polygons(0.001)
v4p3c_l3 = (v4p3c_l1.or(v4p3c_l2)).or(via4.not_outside(metal4).not(metal4))
v4p3c_l3.output('V4.3c','V4.3c : Min. Metal4 enclose Via4 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v4p3c_ed_s1.forget
v4p3c_ed_s2.forget
v4p3c_l1.forget
v4p3c_l2.forget
v4p3c_l3.forget
v4p4a_cond = (metal5.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal5.corners(90)))
v4p4a_m = metal5.edges.interacting(v4p4a_cond)
# Rule V4.4a : Min. Metal5 enclose Via4 [Metal5 with width <0.34um, Protrusion >=0.28um] is 0.06
v4p4a_l1 = v4p4a_m.enclosing(via4.edges,0.06.um,square).polygons(0.001).or(via4.not_outside(metal5).not(metal5))
v4p4a_l1.output('V4.4a','V4.4a : Min. Metal5 enclose Via4 [Metal5 with width <0.34um, Protrusion >=0.28um] is 0.06 ')
v4p4a_cond.forget
v4p4a_m.forget
v4p4a_l1.forget
v4p4b_ed_s1 = via4.drc(enclosed(metal5, projection) <= 0.01.um).polygons(0.001)
v4p4b_ed_s2 = via4.drc(0.01.um < enclosed(metal5, projection) < 0.04.um)
# Rule V4.4b : Min. Metal5 enclose Via4 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)
v4p4b_l1 = metal5.enclosing(via4,0.06.um,projection).polygons(0.001).interacting(v4p4b_ed_s1).not(v4p4b_ed_s1)
v4p4b_l2 = metal5.edges.enclosing(v4p4b_ed_s2,0.04.um).polygons(0.001)
v4p4b_l3 = (v4p4b_l1.or(v4p4b_l2)).or(via4.not_outside(metal5).not(metal5))
v4p4b_l3.output('V4.4b','V4.4b : Min. Metal5 enclose Via4 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)')
v4p4b_ed_s1.forget
v4p4b_ed_s2.forget
v4p4b_l1.forget
v4p4b_l2.forget
v4p4b_l3.forget
# rule V4.4c is not a DRC check
end #METAL_LEVEL
end #BEOL