# -*- Mode:Python -*- viewerConfig = { 'precision':2, 'gridstep':1.0 } # Format of : # The third parameter must be present only for blockage material. # ('layer_name' , MATERIAL , ASSOCIATED ROUTING) # # Note: concerning the LayerMask, real layers are implementeds as BasicLayer, # and are associated to exactly one bit of the mask. Symbolic layers # then combine BasicLayer to create composite objects, an thus can have # a mask which have multiple bits set. Getting the mask from a layer # is straigthforward, but the reverse is not true. One mask may match # multiple symbolic layers. To overcome this ambiguity we introduce the # concept of "working layer", which, for one given mask tells the layer # that will be returned (generally the symbolic one). realLayersTable = \ ( ('nWell' , BasicLayer.Material.nWell ) # Non-Routing Layers. , ('pWell' , BasicLayer.Material.pWell ) , ('nImplant' , BasicLayer.Material.nImplant) , ('pImplant' , BasicLayer.Material.pImplant) , ('active' , BasicLayer.Material.active ) , ('poly' , BasicLayer.Material.poly ) , ('cut0' , BasicLayer.Material.cut ) # Routing Layers & VIA Cuts. , ('metal1' , BasicLayer.Material.metal ) # WARNING: order *is* meaningful. , ('cut1' , BasicLayer.Material.cut ) , ('metal2' , BasicLayer.Material.metal ) , ('cut2' , BasicLayer.Material.cut ) , ('metal3' , BasicLayer.Material.metal ) , ('cut3' , BasicLayer.Material.cut ) , ('metal4' , BasicLayer.Material.metal ) , ('cut4' , BasicLayer.Material.cut ) , ('metal5' , BasicLayer.Material.metal ) , ('cut5' , BasicLayer.Material.cut ) , ('metal6' , BasicLayer.Material.metal ) , ('topmim6' , BasicLayer.Material.other ) # For Capacitances & Pads. , ('botmim6' , BasicLayer.Material.other ) , ('padopen' , BasicLayer.Material.other ) , ('alucap' , BasicLayer.Material.other ) , ('text.cell' , BasicLayer.Material.other ) # Misc. non-physical layers. , ('text.instance', BasicLayer.Material.other ) # Used by the software for visualization , ('SPL1' , BasicLayer.Material.other ) # purposes only. , ('AutoLayer' , BasicLayer.Material.other ) , ('blockage1' , BasicLayer.Material.blockage, 'metal1') # Blockages , ('blockage2' , BasicLayer.Material.blockage, 'metal2') , ('blockage3' , BasicLayer.Material.blockage, 'metal3') , ('blockage4' , BasicLayer.Material.blockage, 'metal4') , ('blockage5' , BasicLayer.Material.blockage, 'metal5') , ('blockage6' , BasicLayer.Material.blockage, 'metal6') , ('gmetalh' , BasicLayer.Material.metal ) # Special BasicLayers for Knik & Kite Routers. , ('gcut' , BasicLayer.Material.cut ) # *Must be after all others* , ('gmetalv' , BasicLayer.Material.metal ) ) # Format of : # The length of the list of real layers depends on the type. # In some case, the last of the list may be optional, it must be # sets to None and not left empty. # # ('SYMB_LAYER' , Type , (LIST_OF_REAL_LAYERS) ) symbolicLayersTable = \ ( ('NWELL' , TypeRegular , ('nWell' ,)) , ('PWELL' , TypeRegular , ('pWell' ,)) , ('NTIE' , TypeDiffusion , ('nImplant' , 'active', 'nWell')) , ('PTIE' , TypeDiffusion , ('pImplant' , 'active', 'pWell')) , ('NDIF' , TypeDiffusion , ('nImplant' , 'active', None )) , ('PDIF' , TypeDiffusion , ('pImplant' , 'active', None )) , ('GATE' , TypeDiffusion , ('poly' , 'active', None )) , ('NTRANS' , TypeTransistor, ('nImplant' , 'active', 'poly', None )) , ('PTRANS' , TypeTransistor, ('pImplant' , 'active', 'poly', 'nWell')) , ('POLY' , TypeRegular , ('poly' ,)) , ('METAL1' , TypeRegular , ('metal1' ,)) , ('METAL2' , TypeRegular , ('metal2' ,)) , ('METAL3' , TypeRegular , ('metal3' ,)) , ('METAL4' , TypeRegular , ('metal4' ,)) , ('METAL5' , TypeRegular , ('metal5' ,)) , ('METAL6' , TypeRegular , ('metal6' ,)) , ('CONT_BODY_N', TypeContact , ('nImplant' , 'active', 'cut0', 'metal1', 'nWell')) , ('CONT_BODY_P', TypeContact , ('pImplant' , 'active', 'cut0', 'metal1', 'pWell')) , ('CONT_DIF_N' , TypeContact , ('nImplant' , 'active', 'cut0', 'metal1', None )) , ('CONT_DIF_P' , TypeContact , ('pImplant' , 'active', 'cut0', 'metal1', None )) , ('CONT_POLY' , TypeVia , ( 'poly' , 'cut0', 'metal1')) , ('VIA12' , TypeVia , ( 'metal1', 'cut1', 'metal2')) , ('VIA23' , TypeVia , ( 'metal2', 'cut2', 'metal3')) , ('VIA34' , TypeVia , ( 'metal3', 'cut3', 'metal4')) , ('VIA45' , TypeVia , ( 'metal4', 'cut4', 'metal5')) , ('VIA56' , TypeVia , ( 'metal5', 'cut5', 'metal6')) , ('BLOCKAGE1' , TypeRegular , ('blockage1', )) , ('BLOCKAGE2' , TypeRegular , ('blockage2', )) , ('BLOCKAGE3' , TypeRegular , ('blockage3', )) , ('BLOCKAGE4' , TypeRegular , ('blockage4', )) , ('BLOCKAGE5' , TypeRegular , ('blockage5', )) , ('BLOCKAGE6' , TypeRegular , ('blockage6', )) , ('gcontact' , TypeVia , ('gmetalh' , 'gcut', 'gmetalv')) ) # Format of : # Each entry is a pair of (string, value). # * string: a synthetic way to designate the symbolic layer on which # it applies, an optional real layer in case where there is # more than one, and the dimension name. # * value : the rule (dimension) value expressed in lambda. symbolicRulesTable = \ ( ('NWELL.nWell.extention.cap' , 0.0) , ('PWELL.pWell.extention.cap' , 0.0) , ('NTIE.minimum.width' , 3.0) , ('NTIE.nWell.extention.cap' , 1.5) , ('NTIE.nWell.extention.width' , 0.5) , ('NTIE.nImplant.extention.cap' , 1.0) , ('NTIE.nImplant.extention.width' , 0.5) , ('NTIE.active.extention.cap' , 0.5) , ('NTIE.active.extention.width' , 0.0) , ('PTIE.minimum.width' , 3.0) , ('PTIE.pWell.extention.cap' , 1.5) , ('PTIE.pWell.extention.width' , 0.5) , ('PTIE.pImplant.extention.cap' , 1.0) , ('PTIE.pImplant.extention.width' , 0.5) , ('PTIE.active.extention.cap' , 0.5) , ('PTIE.active.extention.width' , 0.0) , ('NDIF.minimum.width' , 3.0) , ('NDIF.nImplant.extention.cap' , 1.0) , ('NDIF.nImplant.extention.width' , 0.5) , ('NDIF.active.extention.cap' , 0.5) , ('NDIF.active.extention.width' , 0.0) , ('PDIF.minimum.width' , 3.0) , ('PDIF.pImplant.extention.cap' , 1.0) , ('PDIF.pImplant.extention.width' , 0.5) , ('PDIF.active.extention.cap' , 0.5) , ('PDIF.active.extention.width' , 0.0) , ('GATE.minimum.width' , 1.0) , ('GATE.poly.extention.cap' , 1.5) , ('NTRANS.minimum.width' , 1.0) , ('NTRANS.nImplant.extention.cap' , -1.0) , ('NTRANS.nImplant.extention.width' , 2.5) , ('NTRANS.active.extention.cap' , -1.5) , ('NTRANS.active.extention.width' , 2.0) , ('PTRANS.minimum.width' , 1.0) , ('PTRANS.nWell.extention.cap' , -1.0) , ('PTRANS.nWell.extention.width' , 4.5) , ('PTRANS.pImplant.extention.cap' , -1.0) , ('PTRANS.pImplant.extention.width' , 4.0) , ('PTRANS.active.extention.cap' , -1.5) , ('PTRANS.active.extention.width' , 3.0) , ('POLY.minimum.width' , 1.0) , ('POLY.poly.extention.cap' , 0.5) # Routing Layers. , ('METAL1.minimum.width' , 1.0) , ('METAL1.metal1.extention.cap' , 0.5) , ('METAL2.minimum.width' , 1.0) , ('METAL2.metal2.extention.cap' , 1.0) , ('METAL3.minimum.width' , 1.0) , ('METAL3.metal3.extention.cap' , 1.0) , ('METAL4.minimum.width' , 1.0) , ('METAL4.metal4.extention.cap' , 1.0) , ('METAL5.minimum.width' , 2.0) , ('METAL5.metal5.extention.cap' , 1.0) , ('METAL6.minimum.width' , 2.0) , ('METAL6.metal6.extention.cap' , 1.0) # Contacts (i.e. Active <--> Metal). , ('CONT_BODY_N.minimum.side' , 1.0) , ('CONT_BODY_N.nWell.enclosure' , 1.5) , ('CONT_BODY_N.nImplant.enclosure' , 1.5) , ('CONT_BODY_N.active.enclosure' , 1.0) , ('CONT_BODY_N.metal1.enclosure' , 0.5) , ('CONT_BODY_P.minimum.side' , 1.0) , ('CONT_BODY_P.pWell.enclosure' , 1.5) , ('CONT_BODY_P.pImplant.enclosure' , 1.5) , ('CONT_BODY_P.active.enclosure' , 1.0) , ('CONT_BODY_P.metal1.enclosure' , 0.5) , ('CONT_DIF_N.minimum.side' , 1.0) , ('CONT_DIF_N.nImplant.enclosure' , 1.0) , ('CONT_DIF_N.active.enclosure' , 0.5) , ('CONT_DIF_N.metal1.enclosure' , 0.5) , ('CONT_DIF_P.minimum.side' , 1.0) , ('CONT_DIF_P.pImplant.enclosure' , 1.0) , ('CONT_DIF_P.active.enclosure' , 0.5) , ('CONT_DIF_P.metal1.enclosure' , 0.5) , ('CONT_POLY.minimum.width' , 1.0) , ('CONT_POLY.poly.enclosure' , 0.5) , ('CONT_POLY.metal1.enclosure' , 0.5) # VIAs (i.e. Metal <--> Metal). , ('VIA12.minimum.side' , 1.0) , ('VIA12.metal1.enclosure' , 0.5) , ('VIA12.metal2.enclosure' , 0.5) , ('VIA23.minimum.side' , 1.0) , ('VIA23.metal2.enclosure' , 0.5) , ('VIA23.metal3.enclosure' , 0.5) , ('VIA34.minimum.side' , 1.0) , ('VIA34.metal3.enclosure' , 0.5) , ('VIA34.metal4.enclosure' , 0.5) , ('VIA45.minimum.side' , 1.0) , ('VIA45.metal4.enclosure' , 0.5) , ('VIA45.metal5.enclosure' , 0.5) , ('VIA56.minimum.side' , 1.0) , ('VIA56.metal5.enclosure' , 0.5) , ('VIA56.metal6.enclosure' , 0.5) # Blockages. , ('BLOCKAGE1.minimum.width' , 1.0) , ('BLOCKAGE1.blockage1.extention.cap' , 0.5) , ('BLOCKAGE2.minimum.width' , 2.0) , ('BLOCKAGE2.blockage2.extention.cap' , 0.5) , ('BLOCKAGE3.minimum.width' , 2.0) , ('BLOCKAGE3.blockage3.extention.cap' , 0.5) , ('BLOCKAGE4.minimum.width' , 2.0) , ('BLOCKAGE4.blockage4.extention.cap' , 0.5) , ('BLOCKAGE5.minimum.width' , 2.0) , ('BLOCKAGE5.blockage5.extention.cap' , 1.0) , ('BLOCKAGE6.minimum.width' , 2.0) , ('BLOCKAGE6.blockage6.extention.cap' , 1.0) ) # Format of : # This is a simple list of Real & Symbolic layers. workingLayersTable = \ [ 'cut0', 'cut1' , 'cut2' , 'cut3' , 'cut4' , 'cut5' , 'POLY', 'METAL1' , 'METAL2' , 'METAL3' , 'METAL4' , 'METAL5' , 'METAL6' , 'BLOCKAGE1', 'BLOCKAGE2', 'BLOCKAGE3', 'BLOCKAGE4', 'BLOCKAGE5', 'BLOCKAGE6' , 'VIA12' , 'VIA23' , 'VIA34' , 'VIA45' , 'VIA56' , 'gcut', 'gmetalh' , 'gmetalv' , 'gcontact' ]