| ################################################################################################ |
| # 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 FEOL |
| |
| #================================================ |
| #---------------------NWELL---------------------- |
| #================================================ |
| |
| # Rule NW.1a: Min. Nwell Width. is 0.86µm |
| logger.info('Executing rule NW.1a') |
| nw1a_l1 = nwell.width(0.86.um, euclidian).polygons(0.001) |
| nw1a_l1.output('NW.1a', 'NW.1a : Min. Nwell Width. : 0.86µm') |
| nw1a_l1.forget |
| |
| nw_1b = nwell.outside(dnwell).and(res_mk).not(comp).not(poly2) |
| # Rule NW.1b: Min. Nwell Width as a resistor. is 2.1µm |
| logger.info('Executing rule NW.1b') |
| nw1b_l1 = nw_1b.width(2.1.um, euclidian).polygons(0.001) |
| nw1b_l1.output('NW.1b', 'NW.1b : Min. Nwell Width as a resistor. : 2.1µm') |
| nw1b_l1.forget |
| |
| if CONNECTIVITY_RULES |
| logger.info('CONNECTIVITY_RULES section') |
| |
| connected_nwell, unconnected_nwell = conn_space(nwell, 0.6, 1.4, euclidian) |
| |
| # Rule NW.2a: Min. Nwell Space (Outside DNWELL) [Equi-potential], Merge if the space is less than. is 0.6µm |
| logger.info('Executing rule NW.2a') |
| nw2a_l1 = connected_nwell |
| nw2a_l1.output('NW.2a', 'NW.2a : Min. Nwell Space (Outside DNWELL) [Equi-potential], Merge if the space is less than. : 0.6µm') |
| nw2a_l1.forget |
| |
| # Rule NW.2b: Min. Nwell Space (Outside DNWELL) [Different potential]. is 1.4µm |
| logger.info('Executing rule NW.2b') |
| nw2b_l1 = unconnected_nwell |
| nw2b_l1.output('NW.2b', 'NW.2b : Min. Nwell Space (Outside DNWELL) [Different potential]. : 1.4µm') |
| nw2b_l1.forget |
| |
| else |
| logger.info('CONNECTIVITY_RULES disabled section') |
| |
| # Rule NW.2b : Min. Nwell Space (Outside DNWELL) [Different potential]. is 1.4µm |
| logger.info('Executing rule NW.2b ') |
| nw2b_l1 = nwell.isolated(1.4.um, euclidian).polygons(0.001) |
| nw2b_l1.output('NW.2b', 'NW.2b : Min. Nwell Space (Outside DNWELL) [Different potential]. : 1.4µm') |
| nw2b_l1.forget |
| |
| end #CONNECTIVITY_RULES |
| |
| end #FEOL |