| ################################################################################################ |
| # 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 == '3LM' || METAL_LEVEL == '4LM' || METAL_LEVEL == '5LM' || METAL_LEVEL == '6LM' |
| #==================================================== |
| #----------------- Metal3 Slotting ------------------ |
| #==================================================== |
| |
| # Rule MSLOT.1_M3 : Maximum metal3 width without slotting ((Exclude Top Metal layer overlapping with TANRES_MK)) |
| logger.info('Executing rule MSLOT.1_M3') |
| mslot1_m3 = metal3.not(metal3.width(30.001.um).polygons(0.001)).not_interacting(metal3_slot).not(top_metal.interacting(tanres_mk)) |
| mslot1_m3.output('MSLOT.1_M3','MSLOT.1_M3 : Maximum metal3 width without slotting ((Exclude Top Metal layer overlapping with TANRES_MK))') |
| mslot1_m3.forget |
| |
| # Rule MSLOT.2_M3 : Minimum metal3 slot width (slot layers) |
| logger.info('Executing rule MSLOT.2_M3') |
| mslot2_m3 = metal3_slot.width(2.0.um).polygons(0.001) |
| mslot2_m3.output('MSLOT.2_M3','MSLOT.2_M3 : Minimum metal3 slot width (slot layers)') |
| mslot2_m3.forget |
| |
| # Rule MSLOT.3a_M3 : Minimum metal3 Slot length (slot mark layers) |
| logger.info('Executing rule MSLOT.3a_M3') |
| mslot3a_m3 = metal3_slot.with_bbox_max(nil,10.um) |
| mslot3a_m3.output('MSLOT.3a_M3','MSLOT.3a_M3 : Minimum metal3 Slot length (slot mark layers) ') |
| mslot3a_m3.forget |
| |
| # Rule MSLOT.3b_M3 : Maximum metal3 Slot length (slot mark layers) is 250 um |
| logger.info('Executing rule MSLOT.3b_M3') |
| mslot3b_m3 = metal3_slot.with_bbox_max(250.001,nil) |
| mslot3b_m3.output('MSLOT.3b_M3','MSLOT.3b_M3 : Maximum Slot length (slot mark layers) is 250 um') |
| mslot3b_m3.forget |
| |
| # Rule MSLOT.4a_M3 : Minimum metal3 Slot space (slot mark layers) is 10 um |
| logger.info('Executing rule MSLOT.4a_M3') |
| mslot4a_m3 = metal3_slot.space(10.um).polygons(0.001) |
| mslot4a_m3.output('MSLOT.4a_M3','MSLOT.4a_M3 : Minimum metal3 Slot space (slot mark layers) is 10 um') |
| mslot4a_m3.forget |
| |
| if metal3_slot.count() > 1 |
| # Rule MSLOT.4b_M3 : Maximum metal3 Slot space (slot mark layers) is 30 um |
| logger.info('Executing rule MSLOT.4b_M3') |
| mslot4b_m3 = metal3_slot.not_interacting(metal3_slot.space(30.001.um).polygons(0.001)) |
| mslot4b_m3.output('MSLOT.4b_M3','MSLOT.4b_M3 : Maximum metal3 Slot space (slot mark layers) is 30µm') |
| mslot4b_m3.forget |
| end |
| |
| # Rule MSLOT.5_M3 : Minimum metal3 slot (slot mark layers) to metal3 edge spacing is 10 um |
| logger.info('Executing rule MSLOT.5_M3') |
| mslot5_m3_l1 = metal3.enclosing(metal3_slot,10.0.um).polygons(0.001) |
| mslot5_m3_l2 = metal3_slot.not_inside(metal3) |
| mslot5_m3 = mslot5_m3_l1.or(mslot5_m3_l2) |
| mslot5_m3.output('MSLOT.5_M3','MSLOT.5_M3 : Minimum metal3 slot (slot mark layers) to metal3 edge spacing is 10 um') |
| mslot5_m3_l1.forget |
| mslot5_m3_l2.forget |
| mslot5_m3.forget |
| |
| if METAL_LEVEL == '4LM' || METAL_LEVEL == '5LM' || METAL_LEVEL == '6LM' |
| # Rule MSLOT.7_M3 : Minimum space from via3 to metal3 slot is 0.2 um |
| logger.info('Executing rule MSLOT.7_M3') |
| mslot7_m3 = via3.separation(metal3_slot,0.2.um).polygons(0.001).or(via3.not_outside(metal3_slot)) |
| mslot7_m3.output('MSLOT.7_M3','MSLOT.7_M3 : Minimum space from via3 to metal3 slot is 0.2 um') |
| mslot7_m3.forget |
| end #METAL_LEVEL |
| |
| # Rule MSLOT.8_M3 : Minimum space from via2 to metal3 slot is 0.2 um |
| logger.info('Executing rule MSLOT.8_M3') |
| mslot8_m3 = via2.separation(metal3_slot,0.2.um).polygons(0.001).or(via2.not_outside(metal3_slot)) |
| mslot8_m3.output('MSLOT.8_M3','MSLOT.8_M3 : Minimum space from via2 to metal3 slot is 0.2 um') |
| mslot8_m3.forget |
| |
| if MIM_OPTION == 'A' |
| # Rule MSLOT.9d_OptionA : Metal3 slots are not allowed to interact with via2 in FuseTop area |
| logger.info('Executing rule MSLOT.9d_OptionA') |
| mslot9d_l1 = metal3_slot.interacting(via2).interacting(fusetop) |
| mslot9d_l1.output('MSLOT.9d_OptionA','MSLOT.9d_OptionA : Metal3 slots are not allowed to interact with via2 in FuseTop area ') |
| mslot9d_l1.forget |
| end |
| |
| # Rule MSLOT.10_M3 : Slot mark layer (metal3 slot) on the metal3 hole are not allowed |
| logger.info('Executing rule MSLOT.10_M3') |
| mslot10_m3 = metal3_slot.interacting(metal3.holes) |
| mslot10_m3.output('MSLOT.10_M3','MSLOT.10_M3 : Slot mark layer (metal3 slot) on the metal3 hole are not allowed') |
| mslot10_m3.forget |
| end #METAL_LEVEL |
| end #BEOL |