DIRECTORY CD, CDAtomicObjects, CDBasics, CDCells, CDLayers, CDProperties, CDOrient, CDRects, CDSymbolicObjects, CDTexts, CMosB, Core, CoreClasses, CoreOps, CoreProperties, PW, PWObjects, PWPins, Sinix, SinixCMos, SinixHighlight; SinixCMosB: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CDLayers, CDOrient, CDProperties, CDRects, CDSymbolicObjects, CDTexts, CMosB, CoreClasses, CoreOps, CoreProperties, PW, PWObjects, PWPins, Sinix, SinixCMos, SinixHighlight EXPORTS SinixCMos SHARES CDCells, CDRects, CDSymbolicObjects, CDTexts = BEGIN OPEN SinixCMos; extractBMode: PUBLIC Sinix.Mode _ NEW [Sinix.ModeRec _ [ name: "CMosB", extractProcProp: PW.RegisterProp[$SinixCMosBExtractProc, TRUE], pinsProp: CoreProperties.RegisterProperty[$SinixCMosBPins, CoreProperties.Props[[CoreProperties.propPrint, CoreProperties.PropDontPrint]]], wireGeometryProp: CoreProperties.RegisterProperty[$SinixCMosBWireGeometry, CoreProperties.Props[[CoreProperties.propCopy, CoreProperties.PropDoCopy], [CoreProperties.propPrint, CoreProperties.PropDontPrint]]], instanceProp: CoreProperties.RegisterProperty[$SinixCMosBInstance, CoreProperties.Props[[CoreProperties.propCopy, CoreProperties.PropDoCopy], [CoreProperties.propPrint, CoreProperties.PropDontPrint]]], nbOfLayers: NbOfInterestingLayers, instanceLayer: InstanceLayer, cacheProp: PW.RegisterProp[$SinixCMosBCache, FALSE, TRUE], cachePropsProp: PW.RegisterProp[$SinixCMosBCacheProps, FALSE, TRUE], flatNameSpace: TRUE, equalProc: Sinix.CompareProps ]]; InterestingLayers: ARRAY [0 .. NbOfInterestingLayers) OF CD.Layer _ [CMosB.met2, CMosB.cut2, CMosB.met, CMosB.cut, CMosB.ovg, CMosB.pol, CMosB.pdif, CMosB.ndif, CMosB.pwellCont, CMosB.nwellCont]; NbOfInterestingLayers: NAT = 10; InstanceLayer: PROC [inst: CD.Instance] RETURNS [Sinix.LayerRange] = { layer: CD.Layer _ CDLayers.AbstractToPaint[IF CDSymbolicObjects.IsSymbolicOb[inst.ob] THEN CDSymbolicObjects.GetLayer[inst] ELSE inst.ob.layer]; FOR i: NAT IN [0 .. NbOfInterestingLayers) DO IF InterestingLayers[i]=layer THEN RETURN [[i, i]]; ENDLOOP; RETURN [[0, NbOfInterestingLayers-1]]; }; ExtractPin: Sinix.ExtractProc = { instance: CD.Instance _ PWPins.NewInstance[ob: obj, properties: properties]; layer: CD.Layer _ CDSymbolicObjects.GetLayer[instance]; IF IsWellLayer[layer] OR layer=CD.commentLayer THEN RETURN [NIL]; [result] _ Sinix.ExtractPin[obj, mode, properties, userData]; AddNamesToWire[NARROW [result], properties]; }; ExtractRect: Sinix.ExtractProc = { IF IsWellLayer[obj.layer] OR obj.layer=CD.commentLayer THEN RETURN [NIL]; [result] _ Sinix.ExtractWire[obj, mode, properties, userData]; AddNamesToWire[NARROW [result], properties]; }; ExtractAtomicWell: Sinix.ExtractProc = { wire: Wire _ CoreOps.CreateWire[]; FOR rList: CDAtomicObjects.DrawList _ NARROW [obj.specificRef, CDAtomicObjects.AtomicObsPtr].rList, rList.rest WHILE rList#NIL DO IF ~IsWellLayer[rList.first.lev] THEN AddRect[mode, wire, rList.first.r, rList.first.lev]; ENDLOOP; AddNamesToWire[wire, properties]; result _ wire; }; ExtractWellDiff: Sinix.ExtractProc = { wire: Wire; wire _ CoreOps.CreateWire[]; AddRect[mode, wire, CDBasics.Extend[CDBasics.RectAt[[0, 0], obj.size], -CMosB.wellSurround], CMosB.pdif]; AddNamesToWire[wire, properties]; result _ wire; }; TouchWellDiff: Sinix.TouchProc = { RETURN [Sinix.TouchRectObject[ mode, instance2, CDOrient.MapRect[ CDBasics.Extend[CDBasics.RectAt[[0, 0], instance1.ob.size], -CMosB.wellSurround], instance1.ob.size, instance1.orientation, instance1.location], CMosB.pdif]]; }; nsource: CD.Layer _ MakeAbstract[CD.NewLayer[CMosB.cmosB, $CNSource], CMosB.ndif]; ndrain: CD.Layer _ MakeAbstract[CD.NewLayer[CMosB.cmosB, $CNDrain], CMosB.ndif]; psource: CD.Layer _ MakeAbstract[CD.NewLayer[CMosB.cmosB, $CPSource], CMosB.pdif]; pdrain: CD.Layer _ MakeAbstract[CD.NewLayer[CMosB.cmosB, $CPDrain], CMosB.pdif]; ExtractTransistor: Sinix.ExtractProc = { cellType: CellType; lambda: CD.Number = CMosB.lambda; ext: CD.Number = 2*lambda; wellSurr: CD.Number _ 0; innerX: CD.Number _ 0; dif: CD.Layer _ IF obj.layer=CMosB.wpdif OR obj.layer=CMosB.pdif THEN CMosB.pdif ELSE CMosB.ndif; gateWire, sourceWire, drainWire: Wire; IF obj.layer=CMosB.wpdif OR obj.layer=CMosB.wndif THEN { wellSurr _ CMosB.wellSurround; innerX _ CMosB.wellSurround-ext; }; cellType _ CoreClasses.CreateTransistor[[IF dif=CMosB.pdif THEN pE ELSE nE]]; gateWire _ cellType.public[0]; sourceWire _ cellType.public[1]; drainWire _ cellType.public[2]; AddRect[mode, sourceWire, [x1: innerX+ext, x2: obj.size.x-ext-innerX, y1: wellSurr, y2: ext+wellSurr], IF dif=CMosB.pdif THEN psource ELSE nsource]; AddRect[mode, drainWire, [x1: innerX+ext, x2: obj.size.x-ext-innerX, y1: obj.size.y-wellSurr-ext, y2: obj.size.y-wellSurr], IF dif=CMosB.pdif THEN pdrain ELSE ndrain]; FOR rList: CDAtomicObjects.DrawList _ NARROW [obj.specificRef, CDAtomicObjects.AtomicObsPtr].rList, rList.rest WHILE rList#NIL DO rect: CD.Rect _ rList.first.r; layer: CD.Layer _ rList.first.lev; SELECT layer FROM CMosB.ndif => {}; CMosB.pdif => {}; CMosB.pol => AddRect[mode, gateWire, rect, CMosB.pol]; CMosB.nwell, CMosB.pwell => {}; ENDCASE => ERROR; ENDLOOP; result _ cellType; }; ExtractTransistorL: Sinix.ExtractProc = { cellType: CellType; lambda: CD.Number = CMosB.lambda; wellSurround: CD.Number = CMosB.wellSurround; ext: CD.Number = 2*lambda; wellSurr: CD.Number _ 0; innerX: CD.Number _ 0; gateWire, sourceWire, drainWire: Wire; dif: CD.Layer _ IF obj.layer=CMosB.wpdif OR obj.layer=CMosB.pdif THEN CMosB.pdif ELSE CMosB.ndif; cellType _ CoreClasses.CreateTransistor[[IF obj.layer=CMosB.wpdif OR obj.layer=CMosB.pdif THEN pE ELSE nE]]; gateWire _ cellType.public[0]; sourceWire _ cellType.public[1]; drainWire _ cellType.public[2]; IF obj.layer=CMosB.wpdif OR obj.layer=CMosB.wndif THEN { wellSurr _ wellSurround; innerX _ wellSurround-ext; }; AddRect[mode, sourceWire, [x1: innerX+ext, x2: obj.size.x-wellSurr-6*lambda, y1: wellSurr+6*lambda, y2: wellSurr+8*lambda], IF dif=CMosB.pdif THEN psource ELSE nsource]; AddRect[mode, sourceWire, [x1: obj.size.x-wellSurr-8*lambda, x2: obj.size.x-wellSurr-6*lambda, y1: wellSurr+6*lambda, y2: obj.size.y-innerX-ext], IF dif=CMosB.pdif THEN psource ELSE nsource]; AddRect[mode, drainWire, [x1: innerX+ext, x2: obj.size.x-wellSurr, y1: wellSurr, y2: wellSurr+2*lambda], IF dif=CMosB.pdif THEN pdrain ELSE ndrain]; AddRect[mode, drainWire, [x1: obj.size.x-wellSurr-2*lambda, x2: obj.size.x-wellSurr, y1: wellSurr, y2: obj.size.y-innerX-ext], IF dif=CMosB.pdif THEN pdrain ELSE ndrain]; FOR rList: CDAtomicObjects.DrawList _ NARROW [obj.specificRef, CDAtomicObjects.AtomicObsPtr].rList, rList.rest WHILE rList#NIL DO rect: CD.Rect _ rList.first.r; layer: CD.Layer _ rList.first.lev; SELECT layer FROM CMosB.pol => AddRect[mode, gateWire, rect, CMosB.pol]; CMosB.ndif => {}; CMosB.pdif => {}; CMosB.nwell, CMosB.pwell => {}; ENDCASE => ERROR; ENDLOOP; result _ cellType; }; CMosBContextCreator: SinixHighlight.ExtractContextCreator = { context _ NEW [SinixHighlight.ExtractContextRec _ [mode: extractBMode, userData: NIL]]; }; Atomic: PROC [className: ATOM, extractProc: ATOM _ $CMosBExtractAtomicWell, touchProc: Sinix.TouchProc _ Sinix.TouchAtomic] = { class: CD.ObjectClass = CD.FetchObjectClass[className, CMosB.cmosB]; CDProperties.PutProp[class, extractBMode.extractProcProp, extractProc]; CDProperties.PutProp[class, Sinix.touchProcProp, NEW [Sinix.TouchProc _ touchProc]]; }; SinixHighlight.RegisterDefaultLayoutMode[CMosB.cmosB, CMosBContextCreator]; Sinix.RegisterExtractProc[$CMosBExtractPin, ExtractPin]; Sinix.RegisterExtractProc[$CMosBExtractRect, ExtractRect]; Sinix.RegisterExtractProc[$CMosBExtractAtomicWell, ExtractAtomicWell]; Sinix.RegisterExtractProc[$CMosBExtractWellDiff, ExtractWellDiff]; Sinix.RegisterExtractProc[$CMosBExtractTransistor, ExtractTransistor]; Sinix.RegisterExtractProc[$CMosBExtractTransistorL, ExtractTransistorL]; CDProperties.PutProp[CDCells.cellClass, extractBMode.extractProcProp, $ExtractCell]; CDProperties.PutProp[CDCells.cellClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchCell]]; CDProperties.PutProp[PWObjects.abutXClass, extractBMode.extractProcProp, $ExtractAbut]; CDProperties.PutProp[PWObjects.abutYClass, extractBMode.extractProcProp, $ExtractAbut]; CDProperties.PutProp[CDSymbolicObjects.pinClass, extractBMode.extractProcProp, $CMosBExtractPin]; CDProperties.PutProp[CDSymbolicObjects.pinClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDSymbolicObjects.segmentClass, extractBMode.extractProcProp, $CMosBExtractPin]; CDProperties.PutProp[CDSymbolicObjects.segmentClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDSymbolicObjects.markClass, extractBMode.extractProcProp, $CMosBExtractPin]; CDProperties.PutProp[CDSymbolicObjects.markClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDRects.bareRectClass, extractBMode.extractProcProp, $CMosBExtractRect]; CDProperties.PutProp[CDRects.bareRectClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchRect]]; Atomic[className: $C2SimpleCon]; Atomic[className: $C2WellSimpleCon, touchProc: TouchAtomicWell]; Atomic[className: $C2LargeSimpleCon]; Atomic[className: $C2LargeWellSimpleCon, touchProc: TouchAtomicWell]; Atomic[className: $C2DifShortCon]; Atomic[className: $C2WellDifShortCon, touchProc: TouchAtomicWell]; Atomic[className: $C2Via]; Atomic[className: $C2LargeVia]; Atomic[className: $C2PDifRect, extractProc: $CMosBExtractWellDiff, touchProc: TouchWellDiff]; Atomic[className: $C2NDifRect, extractProc: $CMosBExtractWellDiff, touchProc: TouchWellDiff]; CDProperties.PutProp[CD.FetchObjectClass[$C2Trans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistor]; CDProperties.PutProp[CD.FetchObjectClass[$C2WellTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistor]; CDProperties.PutProp[CD.FetchObjectClass[$C2LTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistorL]; CDProperties.PutProp[CD.FetchObjectClass[$C2LWellTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistorL]; CDProperties.PutProp[CDTexts.textClass, extractBMode.extractProcProp, $ExtractNull]; END. SinixCMosB.mesa Copyright c 1985 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet January 20, 1986 6:24:09 pm PST Bertrand Serlet June 4, 1986 5:33:13 pm PDT Jean-Marc Frailong May 30, 1986 9:46:16 pm PDT Properties and extraction of common objects Contacts Copies the rectangles of rList which are not well in the returned wire Diffusion wires Transistors New layers for transistors source is the smallest diff Initialization Highlight for this technology Registering extract procs Cells, Abuts Pins Rectangles Contacts Diffusion wires Transistors Angle Transistors In the future, replace CLWellTrans by C2LWellTrans Texts Κh˜codešœ™Kšœ Οmœ1™˜>Jšœžœ˜,Jšœ˜——™J™Fš œ˜(Jšœ"˜"š žœ#žœCžœžœž˜Jšžœžœ5˜ZJšžœ˜—Jšœ!˜!J˜J˜——™š œ˜&J˜ Jšœ˜Jšœi˜iJšœ!˜!J˜J˜—J˜š  œ˜"šžœ˜J˜Jšœ ˜ šœ˜JšœR˜RJšœ?˜?—Jšœ˜—J˜——™ ™Kšœ žœžœ/˜RKšœžœžœ.˜PKšœ žœžœ/˜RKšœžœžœ.˜P—J˜šŸœ˜(J˜Jšœžœ˜!Jšœžœ˜Jšœ žœ ˜Jšœžœ ˜Jš œžœ žœžœžœ žœ ˜aJšœ&˜&šžœžœžœ˜8Jšœ˜Jšœ ˜ Jšœ˜—Jšœ)žœžœžœ˜MKšœ˜Kšœ ˜ Kšœ˜šœ˜JšœM˜MJšžœžœ žœ ˜-—šœ˜Jšœc˜cJšžœžœžœ ˜+—š žœ#žœCžœžœž˜Jšœžœ˜Jšœžœ˜"šžœž˜Jšœ˜Jšœ˜Jšœ;˜;Jšœ˜Jšžœ žœ˜—Jšžœ˜—J˜J˜—J˜šŸœ˜)J˜Jšœžœ˜!Jšœžœ˜-Jšœžœ˜Jšœ žœ ˜Jšœžœ ˜Jšœ&˜&Jš œžœ žœžœžœ žœ ˜aJš œ)žœžœžœžœ˜lKšœ˜Kšœ ˜ Kšœ˜šžœžœžœ˜8Jšœ˜Jšœ˜J˜—Jšœ™šœ˜Jšœb˜bJšžœžœ žœ ˜-—šœ˜Jšœx˜xJšžœžœ žœ ˜-—šœ˜JšœP˜PJšžœžœžœ ˜+—šœ˜Jšœf˜fJšžœžœžœ ˜+—š žœ#žœCžœžœž˜Jšœžœ˜Jšœžœ˜"šžœž˜Jšœ;˜;Jšœ˜Jšœ˜Jšœ˜Jšžœ žœ˜—Jšžœ˜—J˜J˜——šœ™š œ*˜=Kšœ žœDžœ˜WK˜K˜—š œžœ žœžœO˜Kšœžœžœ*˜DKšœG˜GKšœ1žœ ˜TK˜K˜—J˜™KšœK˜KK˜—™Kšœ8˜8Kšœ:˜:KšœF˜FKšœB˜BKšœF˜FKšœH˜HK˜—™ KšœT˜TKšœ=žœ&˜fJšœW˜WJšœX˜X—™Kšœa˜aKšœFžœ%˜nKšœe˜eKšœJžœ%˜rKšœb˜bKšœGžœ%˜oK˜—™ Kšœ]˜]KšœAžœ&˜j—šœ™Kšœ!˜!Kšœ@˜@Kšœ&˜&KšœE˜EKšœ#˜#KšœB˜BKšœ˜Kšœ˜—™Kšœ]˜]Kšœ]˜]—™ Kšœžœa˜xKšœžœe˜|—™Kšœžœc˜zKšœ2™2Kšœžœg˜~—™KšœT˜T—Kšžœ˜K˜——…—(43,