| ################################################################################################ |
| # 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') |
| v4_1_l1 = via4.edges.without_length(0.26.um).extended(0, 0, 0.001, 0.001) |
| v4_1_l1.output('V4.1', 'V4.1 : Min/max Via4 size . : 0.26µm') |
| v4_1_l1.forget |
| |
| # Rule V4.2: min. via4 spacing is 0.26µm |
| logger.info('Executing rule V4.2') |
| v4_2_l1 = via4.space(0.26.um, euclidian).polygons(0.001) |
| v4_2_l1.output('V4.2', 'V4.2 : min. via4 spacing : 0.26µm') |
| v4_2_l1.forget |
| |
| # Rule V4.3a: metal4 overlap of via4. is 0.01um |
| logger.info('Executing rule V4.3a') |
| v4_3a_l1 = metal4.enclosing(via4, 0.01.um, euclidian).polygons(0.001).or(via4.not(metal4)) |
| v4_3a_l1.output('V4.3a', 'V4.3a : metal4 overlap of via4. : 0.01um') |
| v4_3a_l1.forget |
| |
| v4_3b_cond = metal4.drc( width <= 0.34.um).with_length(0.28.um,nil,both) |
| v4_3b_eol = metal4.edges.with_length(nil, 0.34.um).interacting(v4_3b_cond.first_edges).interacting(v4_3b_cond.second_edges).not(v4_3b_cond.first_edges).not(v4_3b_cond.second_edges) |
| # Rule V4.3b: metal4 (< 0.34um) end-of-line overlap. is 0.06µm |
| logger.info('Executing rule V4.3b') |
| v4_3b_l1 = v4_3b_eol.enclosing(via4.edges,0.06.um, projection).polygons(0.001) |
| v4_3b_l1.output('V4.3b', 'V4.3b : metal4 (< 0.34um) end-of-line overlap. : 0.06µm') |
| v4_3b_l1.forget |
| v4_3b_cond.forget |
| v4_3b_eol.forget |
| |
| v4_3c_1 = via4.edges.interacting(via4.drc(enclosed(metal4, projection) < 0.04.um).edges.centers(0, 0.5)) |
| v4_3c_2 = via4.edges.interacting(via4.drc(0.04.um <= enclosed(metal4, projection) < 0.06.um).centers(0, 0.5)) |
| v4_3c_3 = v4_3c_1.extended(0, 0, 0, 0.001, joined).corners(90) |
| # Rule V4.3c: If metal4 overlap Vian by < 0.04um on one side, adjacent metal4 edges overlap. is 0.06µm |
| logger.info('Executing rule V4.3c') |
| v4_3c_l1 = v4_3c_2.not_in(v4_3c_1).interacting(v4_3c_1).or(v4_3c_1.interacting(v4_3c_3)).enclosed(metal4.edges, 0.06.um).polygons(0.001) |
| v4_3c_l1.output('V4.3c', 'V4.3c : If metal4 overlap Vian by < 0.04um on one side, adjacent metal4 edges overlap. : 0.06µm') |
| v4_3c_l1.forget |
| v4_3c_1.forget |
| v4_3c_2.forget |
| v4_3c_3.forget |
| |
| # rule V4.3d is not a DRC check |
| |
| # Rule V4.4a: metal5 overlap of via4. is 0.01um |
| logger.info('Executing rule V4.4a') |
| v4_4a_l1 = metal5.enclosing(via4, 0.01.um, euclidian).polygons(0.001) |
| v4_4a_l2 = via4.interacting(metal5).not(metal5) |
| v4_4a_l = v4_4a_l1.join(v4_4a_l2) |
| v4_4a_l.output('V4.4a', 'V4.4a : metal5 overlap of via4.: 0.01um') |
| v4_4a_l1.forget |
| v4_4a_l2.forget |
| v4_4a_l.forget |
| |
| v4_4b_cond = metal5.drc( width <= 0.34.um).with_length(0.28.um,nil,both) |
| v4_4b_eol = metal5.edges.with_length(nil, 0.34.um).interacting(v4_4b_cond.first_edges).interacting(v4_4b_cond.second_edges).not(v4_4b_cond.first_edges).not(v4_4b_cond.second_edges) |
| # Rule V4.4b: metal5 (< 0.34um) end-of-line overlap. is 0.06µm |
| logger.info('Executing rule V4.4b') |
| v44b_l1 = v4_4b_eol.enclosing(via4.edges,0.06.um, projection).polygons(0.001) |
| v44b_l1.output('V4.4b', 'V4.4b : metal5 (< 0.34um) end-of-line overlap. : 0.06µm') |
| v44b_l1.forget |
| v4_4b_cond.forget |
| v4_4b_eol.forget |
| |
| v4_4c_1 = via4.edges.interacting(via4.drc(enclosed(metal5, projection) < 0.04.um).edges.centers(0, 0.5)) |
| v4_4c_2 = via4.edges.interacting(via4.drc(0.04.um <= enclosed(metal5, projection) < 0.06.um).centers(0, 0.5)) |
| v4_4c_3 = v4_4c_1.extended(0, 0, 0, 0.001, joined).corners(90) |
| # Rule V4.4c: If metal5 overlap via4 by < 0.04um on one side, adjacent metal5 edges overlap. is 0.06µm |
| logger.info('Executing rule V4.4c') |
| v44c_l1 = v4_4c_2.not_in(v4_4c_1).interacting(v4_4c_1).or(v4_4c_1.interacting(v4_4c_3)).enclosed(metal5.edges, 0.06.um).polygons(0.001) |
| v44c_l1.output('V4.4c', 'V4.4c : If metal5 overlap via4 by < 0.04um on one side, adjacent metal5 edges overlap. : 0.06µm') |
| v44c_l1.forget |
| v4_4c_1.forget |
| v4_4c_2.forget |
| v4_4c_3.forget |
| |
| # rule V4.4d is not a DRC check |
| |
| # rule V4.5 is not a DRC check |
| end #METAL_LEVEL |
| end #BEOL |