| ################################################################################################ |
| # 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 == '4LM' || METAL_LEVEL == '5LM' || METAL_LEVEL == '6LM' |
| #================================================ |
| #----------------------VIA3---------------------- |
| #================================================ |
| |
| # Rule V3.1: Min/max Via3 size . is 0.26µm |
| logger.info('Executing rule V3.1') |
| v31_l1 = via3.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001) |
| v31_l1.output('V3.1', 'V3.1 : Min/max Via3 size . : 0.26µm') |
| v31_l1.forget |
| |
| # Rule V3.2: min. via3 spacing is 0.26µm |
| logger.info('Executing rule V3.2') |
| v32a_l1 = via3.space(0.26.um, euclidian).polygons(0.001) |
| v32a_l1.output('V3.2', 'V3.2 : min. via3 spacing : 0.26µm') |
| v32a_l1.forget |
| |
| v3p3a_cond = metal3.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal3.corners(90)) |
| v3p3a_m = metal3.edges.interacting(v3p3a_cond) |
| # Rule V3.3a : Min. Metal3 enclose Via3 [Metal3 with width <0.34um, Protrusion >=0.28um] is 0.06 |
| v3p3a_l1 = v3p3a_m.enclosing(via3.edges,0.06.um,square).polygons(0.001).or(via3.not_outside(metal3).not(metal3)) |
| v3p3a_l1.output('V3.3a','V3.3a: Min. Metal3 enclose Via3 [Metal3 with width <0.34um, Protrusion >=0.28um] is 0.06') |
| |
| v3p3a_cond.forget |
| v3p3a_m.forget |
| v3p3a_l1.forget |
| v3p3a_l1.forget |
| |
| # rule V3.3d is not a DRC check |
| |
| v3p3c_ed_s1 = via3.drc(enclosed(metal3, projection) <= 0.01.um).polygons(0.001) |
| v3p3c_ed_s2 = via3.drc(0.01.um < enclosed(metal3, projection) < 0.04.um) |
| # Rule V3.3c : Min. Metal3 enclose Via3 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04) |
| v3p3c_l1 = metal3.enclosing(via3,0.06.um,projection).polygons(0.001).interacting(v3p3c_ed_s1).not(v3p3c_ed_s1) |
| v3p3c_l2 = metal3.edges.enclosing(v3p3c_ed_s2,0.04.um).polygons(0.001) |
| v3p3c_l3 = (v3p3c_l1.or(v3p3c_l2)).or(via3.not_outside(metal3).not(metal3)) |
| v3p3c_l3.output('V3.3c','V3.3c : Min. Metal3 enclose Via3 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)') |
| |
| v3p3c_ed_s1.forget |
| v3p3c_ed_s2.forget |
| v3p3c_l1.forget |
| v3p3c_l2.forget |
| v3p3c_l3.forget |
| |
| v3p4a_cond = (metal4.drc(width <= 0.34.um).with_length(0.28.um,nil,both).edges.interacting(metal4.corners(90))) |
| v3p4a_m = metal4.edges.interacting(v3p4a_cond) |
| # Rule V3.4a : Min. Metal4 enclose Via3 [Metal4 with width <0.34um, Protrusion >=0.28um] is 0.06 |
| v3p4a_l1 = v3p4a_m.enclosing(via3.edges,0.06.um,square).polygons(0.001).or(via3.not_outside(metal4).not(metal4)) |
| v3p4a_l1.output('V3.4a','V3.4a : Min. Metal4 enclose Via3 [Metal4 with width <0.34um, Protrusion >=0.28um] is 0.06 ') |
| |
| v3p4a_cond.forget |
| v3p4a_m.forget |
| v3p4a_l1.forget |
| |
| v3p4b_ed_s1 = via3.drc(enclosed(metal4, projection) <= 0.01.um).polygons(0.001) |
| v3p4b_ed_s2 = via3.drc(0.01.um < enclosed(metal4, projection) < 0.04.um) |
| # Rule V3.4b : Min. Metal4 enclose Via3 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04) |
| v3p4b_l1 = metal4.enclosing(via3,0.06.um,projection).polygons(0.001).interacting(v3p4b_ed_s1).not(v3p4b_ed_s1) |
| v3p4b_l2 = metal4.edges.enclosing(v3p4b_ed_s2,0.04.um).polygons(0.001) |
| v3p4b_l3 = (v3p4b_l1.or(v3p4b_l2)).or(via3.not_outside(metal4).not(metal4)) |
| v3p4b_l3.output('V3.4b','V3.4b : Min. Metal4 enclose Via3 by sides (a, b, c, d) is (0.01,0.06,0.01,0.06) or (0.04,0.04,0.04,0.04)') |
| |
| v3p4b_ed_s1.forget |
| v3p4b_ed_s2.forget |
| v3p4b_l1.forget |
| v3p4b_l2.forget |
| v3p4b_l3.forget |
| |
| # rule V3.4c is not a DRC check |
| end #METAL_LEVEL |
| end #BEOL |