| ################################################################################################ |
| # 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') |
| v3_1_l1 = via3.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001) |
| v3_1_l1.output('V3.1', 'V3.1 : Min/max Via3 size . : 0.26µm') |
| v3_1_l1.forget |
| |
| # Rule V3.2: min. via3 spacing is 0.26µm |
| logger.info('Executing rule V3.2') |
| v3_2_l1 = via3.space(0.26.um, euclidian).polygons(0.001) |
| v3_2_l1.output('V3.2', 'V3.2 : min. via3 spacing : 0.26µm') |
| v3_2_l1.forget |
| |
| # Rule V3.3a: metal3 overlap of via3. is 0.01um |
| logger.info('Executing rule V3.3a') |
| v3_3a_l1 = metal3.enclosing(via3, 0.01.um, euclidian).polygons(0.001).or(via3.not(metal3)) |
| v3_3a_l1.output('V3.3a', 'V3.3a : metal3 overlap of via3. : 0.01um') |
| v3_3a_l1.forget |
| |
| v3_3b_cond = metal3.drc( width <= 0.34.um).with_length(0.28.um,nil,both) |
| v3_3b_eol = metal3.edges.with_length(nil, 0.34.um).interacting(v3_3b_cond.first_edges).interacting(v3_3b_cond.second_edges).not(v3_3b_cond.first_edges).not(v3_3b_cond.second_edges) |
| # Rule V3.3b: metal3 (< 0.34um) end-of-line overlap. is 0.06µm |
| logger.info('Executing rule V3.3b') |
| v3_3b_l1 = v3_3b_eol.enclosing(via3.edges,0.06.um, projection).polygons(0.001) |
| v3_3b_l1.output('V3.3b', 'V3.3b : metal3 (< 0.34um) end-of-line overlap. : 0.06µm') |
| v3_3b_l1.forget |
| v3_3b_cond.forget |
| v3_3b_eol.forget |
| |
| v3_3c_1 = via3.edges.interacting(via3.drc(enclosed(metal3, projection) < 0.04.um).edges.centers(0, 0.5)) |
| v3_3c_2 = via3.edges.interacting(via3.drc(0.04.um <= enclosed(metal3, projection) < 0.06.um).centers(0, 0.5)) |
| v3_3c_3 = v3_3c_1.extended(0, 0, 0, 0.001, joined).corners(90) |
| # Rule V3.3c: If metal3 overlap via3 by < 0.04um on one side, adjacent metal3 edges overlap. is 0.06µm |
| logger.info('Executing rule V3.3c') |
| v3_3c_l1 = v3_3c_2.not(v3_3c_1).interacting(v3_3c_1).or(v3_3c_1.interacting(v3_3c_3)).enclosed(metal3.edges, 0.06.um).polygons(0.001) |
| v3_3c_l1.output('V3.3c', 'V3.3c : If metal3 overlap via3 by < 0.04um on one side, adjacent metal3 edges overlap. : 0.06µm') |
| v3_3c_l1.forget |
| v3_3c_1.forget |
| v3_3c_2.forget |
| v3_3c_3.forget |
| |
| # rule V3.3d is not a DRC check |
| |
| # Rule V3.4a: metal4 overlap of via3. is 0.01um |
| logger.info('Executing rule V3.4a') |
| v3_4a_l1 = metal4.enclosing(via3, 0.01.um, euclidian).polygons(0.001) |
| v3_4a_l2 = via3.interacting(metal4).not(metal4) |
| v3_4a_l = v3_4a_l1.join(v3_4a_l2) |
| v3_4a_l.output('V3.4a', 'V3.4a : metal4 overlap of via3.: 0.01um') |
| v3_4a_l1.forget |
| v3_4a_l2.forget |
| v3_4a_l.forget |
| |
| v3_4b_cond = metal4.drc( width <= 0.34.um).with_length(0.28.um,nil,both) |
| v3_4b_eol = metal4.edges.with_length(nil, 0.34.um).interacting(v3_4b_cond.first_edges).interacting(v3_4b_cond.second_edges).not(v3_4b_cond.first_edges).not(v3_4b_cond.second_edges) |
| # Rule V3.4b: metal4 (< 0.34um) end-of-line overlap. is 0.06µm |
| logger.info('Executing rule V3.4b') |
| v3_4b_l1 = v3_4b_eol.enclosing(via3.edges,0.06.um, projection).polygons(0.001) |
| v3_4b_l1.output('V3.4b', 'V3.4b : metal4 (< 0.34um) end-of-line overlap. : 0.06µm') |
| v3_4b_l1.forget |
| v3_4b_cond.forget |
| v3_4b_eol.forget |
| |
| v3_4c_1 = via3.edges.interacting(via3.drc(enclosed(metal4, projection) < 0.04.um).edges.centers(0, 0.5)) |
| v3_4c_2 = via3.edges.interacting(via3.drc(0.04.um <= enclosed(metal4, projection) < 0.06.um).centers(0, 0.5)) |
| v3_4c_3 = v3_4c_1.extended(0, 0, 0, 0.001, joined).corners(90) |
| # Rule V3.4c: If metal4 overlap via3 by < 0.04um on one side, adjacent metal4 edges overlap. is 0.06µm |
| logger.info('Executing rule V3.4c') |
| v3_4c_l1 = v3_4c_2.not_in(v3_4c_1).interacting(v3_4c_1).or(v3_4c_1.interacting(v3_4c_3)).enclosed(metal4.edges, 0.06.um).polygons(0.001) |
| v3_4c_l1.output('V3.4c', 'V3.4c : If metal4 overlap via3 by < 0.04um on one side, adjacent metal4 edges overlap. : 0.06µm') |
| v3_4c_l1.forget |
| v3_4c_1.forget |
| v3_4c_2.forget |
| v3_4c_3.forget |
| |
| # rule V3.4d is not a DRC check |
| |
| # rule V3.5 is not a DRC check |
| end #METAL_LEVEL |
| end #BEOL |