DIRECTORY CD, CDBasics, CDCells, CDCommandOps, CDLayers, CDOps, CDProperties, CDRects, CDRoutingObjects, CDSequencer, CDSymbolicObjects, CDTexts, CMosB, CoreGeometry, CoreGeometryBackdoor, ExtractOps, PW, Rope, Sinix, SinixOps; SinixCMosB: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CDCommandOps, CDLayers, CDOps, CDProperties, CDRects, CDRoutingObjects, CDSymbolicObjects, CDTexts, CMosB, CoreGeometry, CoreGeometryBackdoor, ExtractOps, PW, Sinix, SinixOps SHARES CDCells, CDLayers, CDRects, CDSymbolicObjects, CDTexts = BEGIN mode: Sinix.Mode _ NEW [Sinix.ModeRec _ [ extractProcProp: PW.RegisterProp[$CMosBExtractProc, TRUE], decoration: CoreGeometry.CreateDecoration["CMosB"], instanceEqualProc: Sinix.CompareProperties, objectEqualProc: Sinix.AlwaysTrue, nbOfLayers: nbOfInterestingLayers, instanceLayer: InstanceLayer, touchProc: Touch, nameProc: Sinix.DefaultName ]]; Touch: CoreGeometry.TouchProc = { IsRect: PROC [instance: CoreGeometry.Instance, layer: CD.Layer] RETURNS [BOOL] = INLINE { RETURN [instance.obj.class=CDRects.bareRectClass AND instance.obj.layer=layer]; }; ChangeRect: PROC [instance: CoreGeometry.Instance, layer: CD.Layer] RETURNS [CoreGeometry.Instance] = INLINE { RETURN [[obj: CDRects.CreateRect[CD.InterestSize[instance.obj], layer], trans: instance.trans]]; }; IF IsRect[instance1, CMosB.pwellCont] THEN RETURN [ touch[touch, ChangeRect[instance1, CMosB.pwell], instance2] OR touch[touch, ChangeRect[instance1, CMosB.pdif], instance2] ]; IF IsRect[instance1, CMosB.nwellCont] THEN RETURN [ touch[touch, ChangeRect[instance1, CMosB.nwell], instance2] OR touch[touch, ChangeRect[instance1, CMosB.ndif], instance2] ]; IF IsRect[instance2, CMosB.pwellCont] THEN RETURN [ touch[touch, ChangeRect[instance2, CMosB.pwell], instance1] OR touch[touch, ChangeRect[instance2, CMosB.pdif], instance1] ]; IF IsRect[instance2, CMosB.nwellCont] THEN RETURN [ touch[touch, ChangeRect[instance2, CMosB.nwell], instance1] OR touch[touch, ChangeRect[instance2, CMosB.ndif], instance1] ]; IF IsRect[instance1, CMosB.met2] AND IsRect[instance2, CMosB.ovg] THEN RETURN [ CDBasics.Inside[CoreGeometry.BBox[instance2], CoreGeometry.BBox[instance1]] ]; IF IsRect[instance1, CMosB.ovg] AND IsRect[instance2, CMosB.met2] THEN RETURN [ CDBasics.Inside[CoreGeometry.BBox[instance1], CoreGeometry.BBox[instance2]] ]; RETURN CoreGeometry.Touch[touch, instance1, instance2]; }; nbOfInterestingLayers: NAT = 10; defaultLayerRange: Sinix.LayerRange = [min: 0, max: nbOfInterestingLayers-1]; InterestingLayersArray: TYPE = PACKED ARRAY CD.Layer OF Sinix.LayerRange _ ALL [defaultLayerRange]; interestingLayers: REF InterestingLayersArray; InstanceLayer: PROC [inst: CoreGeometry.Instance] RETURNS [layerRange: Sinix.LayerRange] = { EachInstance: CoreGeometry.EachInstanceProc = { thisLayerRange: Sinix.LayerRange _ InstanceLayer[instance]; layerRange _ [min: MIN [thisLayerRange.min, layerRange.min], max: MAX [thisLayerRange.max, layerRange.max]]; IF layerRange=defaultLayerRange THEN quit _ TRUE; }; SELECT TRUE FROM inst.obj.class=CDRects.bareRectClass => layerRange _ interestingLayers[CDLayers.AbstractToPaint[inst.obj.layer]]; CDSymbolicObjects.IsSymbolicOb[inst.obj] => layerRange _ interestingLayers[CDLayers.AbstractToPaint[CDSymbolicObjects.GetLayer[CoreGeometry.CoreGeometryPinToCDPin[inst]]]]; ENDCASE => { layerRange _ [nbOfInterestingLayers-1, 0]; [] _ CoreGeometry.FlattenInstance[inst, EachInstance]; IF layerRange.min>layerRange.max THEN layerRange _ defaultLayerRange; }; }; ExtractWellRect: Sinix.ExtractProc = { RETURN (IF obj.layer=CMosB.wpwellCont OR obj.layer=CMosB.wnwellCont THEN Sinix.ExtractAtomic ELSE Sinix.ExtractWellAtomic)[obj, mode, properties, userData]; }; Set: PROC [ref: REF, extractAtom: ATOM] = INLINE { WITH ref SELECT FROM class: CD.ObjectClass => CDProperties.PutProp[class, mode.extractProcProp, extractAtom]; className: ATOM => CDProperties.PutProp[CD.FetchObjectClass[className, CMosB.cmosB], mode.extractProcProp, extractAtom]; ENDCASE => ERROR; }; MakeCMosBShell: PROC [comm: CDSequencer.Command] = { inst: CD.Instance = CDOps.TheInstance[comm.design]; IF inst=NIL THEN RETURN; [] _ CDOps.IncludeObjectI[comm.design, CoreGeometry.CreateShell[ decoration: mode.decoration, cellType: ExtractOps.ExtractCDInstanceCellTypeAndReport[inst, comm.design, mode], withCuteFonts: TRUE], comm.pos]; }; interestingLayers _ NEW [InterestingLayersArray]; interestingLayers[CMosB.met2] _ [0, 0]; interestingLayers[CMosB.met] _ [1, 1]; interestingLayers[CMosB.pol] _ [2, 2]; interestingLayers[CMosB.pdif] _ [3, 3]; interestingLayers[CMosB.ndif] _ [4, 4]; interestingLayers[CMosB.pwell] _ [5, 5]; interestingLayers[CMosB.nwell] _ [6, 6]; interestingLayers[CMosB.ovg] _ [0, 7]; interestingLayers[CMosB.pwellCont] _ [8, 8]; interestingLayers[CMosB.nwellCont] _ [9, 9]; interestingLayers[CMosB.cut2] _ [0, 1]; interestingLayers[CMosB.cut] _ [1, 4]; CDCommandOps.RegisterWithMenu[$Debug, "Make CMosB shell", "Make a shell from the extracted object", $MakeCMosBShell, MakeCMosBShell, doQueue]; CDProperties.PutLayerProp[CMosB.ndif, $RoutingLayer, $RoutingLayer]; CDProperties.PutLayerProp[CMosB.pdif, $RoutingLayer, $RoutingLayer]; CDProperties.PutLayerProp[CMosB.pol, $RoutingLayer, $RoutingLayer]; CDProperties.PutLayerProp[CMosB.met, $RoutingLayer, $RoutingLayer]; CDProperties.PutLayerProp[CMosB.met2, $RoutingLayer, $RoutingLayer]; CDProperties.PutLayerProp[CMosB.ovg, $RoutingLayer, $RoutingLayer]; SinixOps.RegisterDefaultLayoutMode[mode, CMosB.cmosB]; Sinix.RegisterExtractProc[$CMosBExtractWellRect, ExtractWellRect]; Set[ CDCells.pCellClass, $ExtractCell]; Set[ PW.indirectClass, $ExtractIndirect]; Set[ PW.abutXClass, $ExtractAbut]; Set[ PW.abutYClass, $ExtractAbut]; Set[ PW.rotationClass, $ExtractRotation]; Set[ PW.tilingClass, $ExtractTiling]; Set[ CDRoutingObjects.routingClass, $ExtractRouting]; Set[ CDSymbolicObjects.pinClass, $ExtractPin]; Set[ CDSymbolicObjects.segmentClass, $ExtractPin]; Set[ CDSymbolicObjects.markClass, $ExtractPin]; Set[ CDRects.bareRectClass, $ExtractRect]; Set[ CDRects.wellRectClass, $CMosBExtractWellRect]; Set[ $C2SimpleCon, $ExtractAtomic]; Set[ $C2WellSimpleCon, $CMosBExtractWellRect]; Set[ $C2LargeSimpleCon, $ExtractAtomic]; Set[ $C2LargeWellSimpleCon, $CMosBExtractWellRect]; Set[ $C2DifShortCon, $ExtractAtomic]; Set[ $C2DiffShortCon, $ExtractAtomic]; Set[ $C2WellDifShortCon, $CMosBExtractWellRect]; Set[ $C2Via, $ExtractAtomic]; Set[ $C2LargeVia, $ExtractAtomic]; Set[ $C2Trans, $ExtractTransistor]; Set[ $C2WellTrans, $ExtractTransistor]; Set[ $C2LTrans, $ExtractTransistor]; Set[ $C2LWellTrans, $ExtractTransistor]; Set[ CDTexts.rigidTextClass, $ExtractNull]; Set[ CDTexts.flipTextClass, $ExtractNull]; CoreGeometryBackdoor.RegisterDecorationIO[mode.decoration]; END. <SinixCMosB.mesa Copyright Σ 1985, 1987 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet January 20, 1986 6:24:09 pm PST Bertrand Serlet September 15, 1987 7:33:20 pm PDT Jean-Marc Frailong January 17, 1988 5:47:02 pm PST Properties and extraction of common objects The standard Touch is hacked both for well and ovg rectangles. Hack for WellRect Initialization FilterMask: SinixOps.FilterProc = {RETURN [Rope.Match["*.mask", name]]}; Layers Command to see the shell Layer properties Highlight and background extraction for this technology SinixOps.RegisterBackgroundExtractionCommand[CMosB.cmosB, mode, "CMosB background extraction", $CMosBBackgroundExtract, FilterMask]; Extraction Procs Cells, Abuts, Rotations, RoutingClass, Tiling Pins Rectangles Contacts Transistors Angle Transistors Texts ΚF˜codešœ™KšœB™BKšœ7Οk™:Kšœ1™1Kšœ2™2K™—š œ˜ Kšœ…˜‡Kšœ˜Kšœ#˜#K˜ Kšœ˜Kšœ˜Kšœ˜—K˜•StartOfExpansion[]šΟn œœ˜Kšœœ°œ˜ΝKšœ:˜@Kš˜—head™+šœœ˜)Jšœœ!œ˜:Jšœ3˜3Jšœ+˜+Jšœ"˜"Jšœ"˜"Jšœ˜Jšœ˜Jšœ˜J˜—J˜Jšœ>™>šžœ˜!š žœœ*œœœœ˜YJšœ+œ˜OJ˜—š ž œœ*œœœ˜nJšœœ=˜`J˜—šœ$œœ˜3Jšœ<œ˜?Jšœ:˜:Jšœ˜—šœ$œœ˜3Jšœ<œ˜?Jšœ:˜:Jšœ˜—šœ$œœ˜3Jšœ<œ˜?Jšœ:˜:Jšœ˜—šœ$œœ˜3Jšœ<œ˜?Jšœ:˜:Jšœ˜—šœœœœ˜OJšœK˜KJšœ˜—šœœœœ˜OJšœK˜KJšœ˜—Jšœ1˜7J˜J˜—Jšœœ˜ JšœM˜MJš œœœœœœœ˜cJšœœ˜.J˜šž œœœ#˜\šž œ#˜/Jšœ;˜;Jšœœ,œ'˜lJšœœœ˜1J˜—šœœ˜Jšœr˜rJšœ¬˜¬šœ˜ Jšœ*˜*Jšœ6˜6Jšœœ ˜EJ˜——J˜——™šžœ˜&Jš œœœœœ;˜œJ˜——šœ™š žœœœœœ˜2šœœœ˜KšœœO˜XKšœ œœN˜xKšœœ˜—K˜K˜—šžœœ ˜4Jšœœ+˜3Jšœœœœ˜šœ&˜&šœ˜Jšœ˜JšœQ˜QJšœ œ˜—Jšœ ˜ —J˜J˜—Jšž œœ™HJ˜™Kšœœ˜1Kšœ'˜'Kšœ&˜&Kšœ&˜&Kšœ'˜'Kšœ'˜'Kšœ(˜(Kšœ(˜(Kšœ&˜&Kšœ,˜,Kšœ,˜,Kšœ'˜'Kšœ&˜&K˜—™KšœŽ˜ŽK˜—™KšœD˜DKšœD˜DKšœC˜CKšœC˜CKšœD˜DKšœC˜CK˜—™7Kšœ6˜6Kšœ„™„K˜—™JšœB˜BK™—™-Kšœ)˜)Kšœœ$˜+Kšœœ˜$Kšœœ˜$Kšœœ$˜+Kšœœ ˜'Kšœ6˜6—™Kšœ/˜/Kšœ3˜3Kšœ0˜0—™ Kšœ,˜,Kšœ5˜5—šœ™Kšœ%˜%Kšœ0˜0Kšœ+˜+Kšœ4˜4Kšœ(˜(Kšœ Πblœ˜)Kšœ2˜2Kšœ ˜ Kšœ$˜$—™ Kšœ&˜&Kšœ)˜)—™Kšœ'˜'Kšœ*˜*—™Kšœ-˜-Kšœ,˜,K˜—šœ;˜;K˜——šœ˜K˜——…—²$4