| ################################################################################################ |
| # 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 |
| |
| #====================================================== |
| #----------------- Metaltop Slotting ------------------ |
| #====================================================== |
| |
| top_metal_slot = top_metal.holes |
| |
| # Rule MSLOT.1_MT : Maximum metaltop width without slotting is 30.0um |
| logger.info('Executing rule MSLOT.1_MT') |
| mslot1_mt = top_metal.not(top_metal.width(30.001.um).polygons(0.001)) |
| mslot1_mt.output('MSLOT.1_MT','MSLOT.1_MT : Maximum metaltop width without slotting: 30.0um') |
| mslot1_mt.forget |
| |
| # Rule MSLOT.2_MT : Minimum metaltop slot width (slot layers) is 2.0um |
| logger.info('Executing rule MSLOT.2_MT') |
| mslot2_mt = top_metal_slot.width(2.0.um).polygons(0.001) |
| mslot2_mt.output('MSLOT.2_MT','MSLOT.2_MT : Minimum metaltop slot width (slot layers): 2.0um') |
| mslot2_mt.forget |
| |
| # Rule MSLOT.3a_MT : Minimum metaltop Slot length (slot mark layers) is 10.0um |
| logger.info('Executing rule MSLOT.3a_MT') |
| mslot3a_mt = top_metal_slot.with_bbox_max(nil,10.um) |
| mslot3a_mt.output('MSLOT.3a_MT','MSLOT.3a_MT : Minimum metaltop Slot length (slot mark layers): 10.0um') |
| mslot3a_mt.forget |
| |
| # Rule MSLOT.3b_MT : Maximum metaltop Slot length (slot mark layers) is 250 um |
| logger.info('Executing rule MSLOT.3b_MT') |
| mslot3b_mt = top_metal_slot.with_bbox_max(250.001,nil) |
| mslot3b_mt.output('MSLOT.3b_MT','MSLOT.3b_MT : Maximum Slot length (slot mark layers): 250 um') |
| mslot3b_mt.forget |
| |
| # Rule MSLOT.4a_MT : Minimum metaltop Slot space (slot mark layers) is 10 um |
| logger.info('Executing rule MSLOT.4a_MT') |
| mslot4a_mt = top_metal_slot.space(10.um).polygons(0.001) |
| mslot4a_mt.output('MSLOT.4a_MT','MSLOT.4a_MT : Minimum metaltop Slot space (slot mark layers): 10 um') |
| mslot4a_mt.forget |
| |
| if top_metal_slot.count() > 1 |
| # Rule MSLOT.4b_MT : Maximum metaltop Slot space (slot mark layers) is 30 um |
| logger.info('Executing rule MSLOT.4b_MT') |
| mslot4b_mt = top_metal_slot.not_interacting(top_metal_slot.space(30.um).polygons(0.001)) |
| mslot4b_mt.output('MSLOT.4b_MT','MSLOT.4b_MT : Maximum metaltop Slot space (slot mark layers): 30µm') |
| mslot4b_mt.forget |
| end |
| |
| # Rule MSLOT.5_MT : Minimum metaltop slot (slot mark layers) to metaltop edge spacing is 10 um |
| logger.info('Executing rule MSLOT.5_MT') |
| mslot5_mt_l1 = top_metal.or(top_metal_slot).enclosing(top_metal_slot,10.0.um).polygons(0.001) |
| mslot5_mt_l2 = top_metal.or(top_metal_slot).not_inside(top_metal.extents) |
| mslot5_mt = mslot5_mt_l1.or(mslot5_mt_l2) |
| mslot5_mt.output('MSLOT.5_MT','MSLOT.5_MT : Minimum metaltop slot (slot mark layers) to metaltop edge spacing: 10 um') |
| mslot5_mt_l1.forget |
| mslot5_mt_l2.forget |
| mslot5_mt.forget |
| |
| # Rule MSLOT.8_MT : Minimum space from via(n-1) to metaltop slot is 0.2 um |
| logger.info('Executing rule MSLOT.8_MT') |
| mslot8_mt = top_via.separation(top_metal_slot,0.2.um).polygons(0.001).or(top_via.not_outside(top_metal_slot)) |
| mslot8_mt.output('MSLOT.8_MT','MSLOT.8_MT : Minimum space from via(n-1) to metaltop slot: 0.2 um') |
| mslot8_mt.forget |
| |
| top_metal_slot = top_metal.holes |
| # Rule MSLOT.9a : No slotting allowed for Top Metal directly under the Pad , Minimum distance to pad is 5.0 um |
| logger.info('Executing rule MSLOT.9a') |
| mslot9a_l1 = top_metal_slot.interacting(pad) |
| mslot9a_l2 = top_metal_slot.separation(pad,5.0.um).polygons(0.001) |
| mslot9a_l = mslot9a_l1.or(mslot9a_l2) |
| mslot9a_l.output('MSLOT.9a','MSLOT.9a : No slotting allowed for Top Metal area directly under the Pad , Minimum distance to pad: 5.0 um ') |
| mslot9a_l.forget |
| |
| topmin1_metal_slot = topmin1_metal.holes |
| if MIM_OPTION == 'B' |
| # Rule MSLOT.9b_OptionB : No slotting allowed for MIM bottom plate directly under FuseTop , Minimum distance to FuseTop is 5.0 um |
| mslot9b_mimB_l1 = topmin1_metal_slot.interacting(fusetop) |
| mslot9b_mimB_l2 = topmin1_metal_slot.separation(fusetop,5.0.um).polygons(0.001) |
| mslot9b_mimB = mslot9b_mimB_l1.or(mslot9b_mimB_l2) |
| mslot9b_mimB.output('MSLOT.9b_OptionB','MSLOT.9b_OptionB : No slotting allowed for MIM bottom plate directly under FuseTop , Minimum distance to FuseTop: 5.0 um') |
| mslot9b_mimB_l1.forget |
| mslot9b_mimB_l2.forget |
| mslot9b_mimB.forget |
| end |
| |
| # Rule MSLOT.9c : No slotting allowed on the metal directly underneath and within the area following layers: FuseWindow_D , Minimum distance to FuseWindow_D is 5.0um |
| logger.info('Executing rule MSLOT.9c') |
| mslot9c_l1 = top_metal_slot.interacting(fusewindow_d) |
| mslot9c_l2 = top_metal_slot.separation(fusewindow_d,5.0.um).polygons(0.001) |
| mslot9c_l = mslot9c_l1.or(mslot9c_l2) |
| mslot9c_l.output('MSLOT.9c','MSLOT.9c :No slotting allowed on the metal directly underneath and within the area following layers: FuseWindow_D , Minimum distance to FuseWindow_D is 5.0um') |
| mslot9c_l1.forget |
| mslot9c_l2.forget |
| mslot9c_l.forget |
| |
| end #BEOL |