DIRECTORY CD, CDAtomicObjects, CDBasics, CDCells, CDProperties, CDOrient, CDRects, CDSymbolicObjects, CDTexts, CMos, Core, CoreClasses, CoreOps, CoreProperties, PW, Sinix, SinixCMos, SinixHighlight; SinixCMosA: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CDOrient, CDProperties, CDRects, CDSymbolicObjects, CDTexts, CMos, CoreClasses, CoreOps, CoreProperties, PW, Sinix, SinixCMos, SinixHighlight EXPORTS SinixCMos SHARES CDCells, CDRects, CDSymbolicObjects, CDTexts = BEGIN OPEN SinixCMos; extractAMode: PUBLIC Sinix.Mode _ NEW [Sinix.ModeRec _ [ name: "CMosA", extractProcProp: PW.RegisterProp[$CMosAExtractProc, TRUE, TRUE], pinsProp: CoreProperties.RegisterProperty[$SinixCMosAPins], wireGeometryProp: CoreProperties.RegisterProperty[$SinixCMosAWireGeometry, CoreProperties.Props[[CoreProperties.propCopy, CoreProperties.PropDoCopy]]], instanceProp: CoreProperties.RegisterProperty[$SinixCMosAInstance, CoreProperties.Props[[CoreProperties.propCopy, CoreProperties.PropDoCopy]]], cacheProp: PW.RegisterProp[$SinixCMosACache, FALSE, TRUE], cachePropsProp: PW.RegisterProp[$SinixCMosACacheProps, FALSE, TRUE], flatNameSpace: TRUE, equalProc: Sinix.CompareProps ]]; IsWellLayer: PUBLIC PROC [layer: CD.Layer] RETURNS [BOOL] = { RETURN [layer=CMos.pwell OR layer=CMos.nwell]; }; TouchAtomicWell: PUBLIC Sinix.TouchProc = { FOR rList: CDAtomicObjects.DrawList _ NARROW [instance1.ob.specificRef, CDAtomicObjects.AtomicObsPtr].rList, rList.rest WHILE rList#NIL DO IF ~IsWellLayer[rList.first.lev] AND Sinix.TouchRectObject[mode, instance2, CDOrient.MapRect[rList.first.r, instance1.ob.size, instance1.orientation, instance1.location], rList.first.lev] THEN RETURN [TRUE]; ENDLOOP; }; ExtractPin: Sinix.ExtractProc = { [result] _ Sinix.ExtractPin[obj, mode, properties, userData]; AddNamesToWire[NARROW [result], properties]; }; ExtractRect: Sinix.ExtractProc = { IF IsWellLayer[obj.layer] THEN RETURN [NIL]; [result] _ Sinix.ExtractWire[obj, mode, properties, userData]; AddNamesToWire[NARROW [result], properties]; }; ExtractAtomicWell: Sinix.ExtractProc = { result _ 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, NARROW [result], rList.first.r, rList.first.lev]; ENDLOOP; AddNamesToWire[NARROW [result], properties]; }; ExtractWellDiff: Sinix.ExtractProc = { result _ CoreOps.CreateWire[]; AddRect[mode, NARROW [result], CDBasics.Extend[CDBasics.RectAt[[0, 0], obj.size], -CMos.wellSurround], CMos.pdif]; AddNamesToWire[NARROW [result], properties]; }; TouchWellDiff: Sinix.TouchProc = { RETURN [Sinix.TouchRectObject[ mode, instance2, CDOrient.MapRect[ CDBasics.Extend[CDBasics.RectAt[[0, 0], instance1.ob.size], -CMos.wellSurround], instance1.ob.size, instance1.orientation, instance1.location], CMos.pdif]]; }; nsource: CD.Layer _ MakeAbstract[CD.NewLayer[CMos.cmos, $CNSource], CMos.ndif]; ndrain: CD.Layer _ MakeAbstract[CD.NewLayer[CMos.cmos, $CNDrain], CMos.ndif]; psource: CD.Layer _ MakeAbstract[CD.NewLayer[CMos.cmos, $CPSource], CMos.pdif]; pdrain: CD.Layer _ MakeAbstract[CD.NewLayer[CMos.cmos, $CPDrain], CMos.pdif]; ExtractTransistor: Sinix.ExtractProc = { cellType: CellType; lambda: CD.Number = CMos.lambda; ext: CD.Number = 2*lambda; wellSurr: CD.Number _ 0; innerX: CD.Number _ 0; dif: CD.Layer _ IF obj.layer=CMos.wpdif OR obj.layer=CMos.pdif THEN CMos.pdif ELSE CMos.ndif; gateWire, sourceWire, drainWire: Wire; IF obj.layer=CMos.wpdif OR obj.layer=CMos.wndif THEN { wellSurr _ CMos.wellSurround; innerX _ CMos.wellSurround-ext; }; cellType _ CoreClasses.CreateTransistor[[IF dif=CMos.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=CMos.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=CMos.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 CMos.ndif => {}; CMos.pdif => {}; CMos.pol => AddRect[mode, gateWire, rect, CMos.pol]; CMos.nwell, CMos.pwell => {}; ENDCASE => ERROR; ENDLOOP; result _ cellType; }; ExtractTransistorL: Sinix.ExtractProc = { cellType: CellType; lambda: CD.Number = CMos.lambda; wellSurround: CD.Number = CMos.wellSurround; ext: CD.Number = 2*lambda; wellSurr: CD.Number _ 0; innerX: CD.Number _ 0; gateWire, sourceWire, drainWire: Wire; dif: CD.Layer _ IF obj.layer=CMos.wpdif OR obj.layer=CMos.pdif THEN CMos.pdif ELSE CMos.ndif; cellType _ CoreClasses.CreateTransistor[[IF obj.layer=CMos.wpdif OR obj.layer=CMos.pdif THEN pE ELSE nE]]; gateWire _ cellType.public[0]; sourceWire _ cellType.public[1]; drainWire _ cellType.public[2]; IF obj.layer=CMos.wpdif OR obj.layer=CMos.wndif THEN { wellSurr _ wellSurround; innerX _ wellSurround-ext; }; AddRect[mode, sourceWire, [x1: innerX+ext, x2: obj.size.x-wellSurr-4*lambda, y1: wellSurr+4*lambda, y2: wellSurr+6*lambda], IF dif=CMos.pdif THEN psource ELSE nsource]; AddRect[mode, sourceWire, [x1: obj.size.x-wellSurr-6*lambda, x2: obj.size.x-wellSurr-4*lambda, y1: wellSurr+4*lambda, y2: obj.size.y-innerX-ext], IF dif=CMos.pdif THEN psource ELSE nsource]; AddRect[mode, drainWire, [x1: innerX+ext, x2: obj.size.x-wellSurr, y1: wellSurr, y2: wellSurr+2*lambda], IF dif=CMos.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=CMos.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 CMos.pol => AddRect[mode, gateWire, rect, CMos.pol]; CMos.ndif => {}; CMos.pdif => {}; CMos.nwell, CMos.pwell => {}; ENDCASE => ERROR; ENDLOOP; result _ cellType; }; CMosAContextCreator: SinixHighlight.ExtractContextCreator = { context _ NEW [SinixHighlight.ExtractContextRec _ [mode: extractAMode, userData: NIL]]; }; Atomic: PROC [className: ATOM, extractProc: ATOM _ $CMosAExtractAtomicWell, touchProc: Sinix.TouchProc _ Sinix.TouchAtomic] = { class: CD.ObjectClass = CD.FetchObjectClass[className, CMos.cmos]; CDProperties.PutProp[class, extractAMode.extractProcProp, extractProc]; CDProperties.PutProp[class, Sinix.touchProcProp, NEW [Sinix.TouchProc _ touchProc]]; }; SinixHighlight.RegisterDefaultLayoutMode[CMos.cmos, CMosAContextCreator]; Sinix.RegisterExtractProc[$CMosAExtractPin, ExtractPin]; Sinix.RegisterExtractProc[$CMosAExtractRect, ExtractRect]; Sinix.RegisterExtractProc[$CMosAExtractAtomicWell, ExtractAtomicWell]; Sinix.RegisterExtractProc[$CMosAExtractWellDiff, ExtractWellDiff]; Sinix.RegisterExtractProc[$CMosAExtractTransistor, ExtractTransistor]; Sinix.RegisterExtractProc[$CMosAExtractTransistorL, ExtractTransistorL]; CDProperties.PutProp[CDCells.cellClass, extractAMode.extractProcProp, $ExtractCell]; CDProperties.PutProp[CDCells.cellClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchCell]]; CDProperties.PutProp[CDSymbolicObjects.pinClass, extractAMode.extractProcProp, $ExtractPin]; CDProperties.PutProp[CDSymbolicObjects.pinClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDSymbolicObjects.segmentClass, extractAMode.extractProcProp, $ExtractPin]; CDProperties.PutProp[CDSymbolicObjects.segmentClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDSymbolicObjects.markClass, extractAMode.extractProcProp, $ExtractPin]; CDProperties.PutProp[CDSymbolicObjects.markClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchPin]]; CDProperties.PutProp[CDRects.bareRectClass, extractAMode.extractProcProp, $CMosAExtractRect]; CDProperties.PutProp[CDRects.bareRectClass, Sinix.touchProcProp, NEW [Sinix.TouchProc _ Sinix.TouchRect]]; Atomic[className: $CSimpleCon]; Atomic[className: $CWellSimpleCon, touchProc: TouchAtomicWell]; Atomic[className: $CButtingCont]; Atomic[className: $CWellButtingCont, touchProc: TouchAtomicWell]; Atomic[className: $CVia]; Atomic[className: $CDifShortCon]; Atomic[className: $CWellDifShortCon, touchProc: TouchAtomicWell]; Atomic[className: $CMosPDifRect, extractProc: $CMosAExtractWellDiff, touchProc: TouchWellDiff]; CDProperties.PutProp[CD.FetchObjectClass[$CTrans, CMos.cmos], extractAMode.extractProcProp, $CMosAExtractTransistor]; CDProperties.PutProp[CD.FetchObjectClass[$CWellTrans, CMos.cmos], extractAMode.extractProcProp, $CMosAExtractTransistor]; CDProperties.PutProp[CD.FetchObjectClass[$CLTrans, CMos.cmos], extractAMode.extractProcProp, $CMosAExtractTransistorL]; CDProperties.PutProp[CD.FetchObjectClass[$CLWellTrans, CMos.cmos], extractAMode.extractProcProp, $CMosAExtractTransistorL]; CDProperties.PutProp[CDTexts.textClass, extractAMode.extractProcProp, $ExtractNull]; END. ZSinixCMosA.mesa Copyright c 1985 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet August 15, 1985 2:09:54 pm PDT Bertrand Serlet June 4, 1986 5:47:14 pm PDT Pradeep Sindhu December 2, 1985 6:42:40 pm PST Barth, January 13, 1986 1:41:27 pm PST Jean-Marc Frailong May 30, 1986 9:45:34 pm PDT Properties and extraction of common objects Contacts Copies the rectangles of rList which are not well in the returned wire To be removed in near future ExtractPseudoCellWell: Sinix.ExtractProc = { cellPtr: CD.CellPtr _ NARROW [obj.specificRef]; category _ $Wire; wire _ CoreOps.CreateWire[]; FOR contents: LIST OF CD.Instance _ NARROW [obj.specificRef, CD.CellPtr].contents, contents.rest WHILE contents#NIL DO IF ~IsWellLayer[contents.first.ob.layer] THEN AddRect[mode, wire, CDInstances.InstRectO[contents.first], contents.first.ob.layer]; ENDLOOP; }; Diffusion wires Transistors New layers for transistors source is the smallest diff Initialization Highlight for this technology Registering extract procs Cells, Pins Rectangles Contacts Diffusion wires Transistors Angle Transistors Texts ΚA˜codešœ™Kšœ Οmœ1™˜>Jšœžœ˜,Jšœ˜——™J™Fš œ˜(Jšœ˜š žœ#žœCžœžœž˜Jšžœžœžœ+˜eJšžœ˜—Jšœžœ˜,J˜—J˜JšΟc™šŸœ™,Jšœ žœ žœ™/J™Jšœ™šžœ žœžœžœ žœžœ"žœ žœž™vJšžœ'žœU™‚Jšžœ™—J™——™š œ˜&Jšœ˜Jšœžœ^˜rJšœžœ˜,J˜—J˜šŸ œ˜"šžœ˜J˜Jšœ ˜ šœ˜JšœQ˜QJšœ?˜?—Jšœ ˜ —J˜——™ ™Kšœ žœžœ,˜OKšœžœžœ+˜MKšœ žœžœ,˜OKšœžœžœ+˜M—J˜š œ˜(J˜Jšœžœ˜ Jšœžœ˜Jšœ žœ ˜Jšœžœ ˜Jš œžœ žœžœžœ žœ ˜]Jšœ&˜&šžœžœžœ˜6Jšœ˜Jšœ˜Jšœ˜—Jšœ)žœžœžœ˜LKšœ˜Kšœ ˜ Kšœ˜šœ˜JšœM˜MJšžœžœ žœ ˜,—šœ˜Jšœc˜cJšžœžœžœ ˜*—š žœ#žœCžœžœž˜Jšœžœ˜Jšœžœ˜"šžœž˜J˜J˜Jšœ9˜9Jšœ˜Jšžœ žœ˜—Jšžœ˜—J˜J˜—J˜š œ˜)J˜Jšœžœ˜ Jšœžœ˜,Jšœžœ˜Jšœ žœ ˜Jšœžœ ˜Jšœ&˜&Jš œžœ žœžœžœ žœ ˜]Jš œ)žœžœžœžœ˜jKšœ˜Kšœ ˜ Kšœ˜šžœžœžœ˜6Jšœ˜Jšœ˜J˜—Jšœ™šœ˜Jšœb˜bJšžœžœ žœ ˜,—šœ˜Jšœx˜xJšžœžœ žœ ˜,—šœ˜JšœP˜PJšžœžœžœ ˜*—šœ˜Jšœf˜fJšžœžœžœ ˜*—š žœ#žœCžœžœž˜Jšœžœ˜Jšœžœ˜"šžœž˜Jšœ9˜9J˜J˜Jšœ˜Jšžœ žœ˜—Jšžœ˜—J˜J˜——šœ™š œ*˜=Kšœ žœDžœ˜WK˜K˜—š œžœ žœžœO˜Kšœžœžœ(˜BKšœG˜GKšœ1žœ ˜TK˜K˜—™KšœI˜I—J˜™Kšœ8˜8Kšœ:˜:KšœF˜FKšœB˜BKšœF˜FKšœH˜HK˜—™ KšœT˜TKšœ=žœ&˜fKšœ\˜\KšœFžœ%˜nKšœ`˜`KšœJžœ%˜rKšœ]˜]KšœGžœ%˜o—™ Kšœ]˜]KšœAžœ&˜j—šœ™Kšœ ˜ Kšœ?˜?Kšœ"˜"KšœA˜AKšœ˜Kšœ"˜"KšœA˜A—™Kšœ_˜_—™ Kšœžœ^˜uKšœžœb˜y—™Kšœžœ`˜wKšœžœd˜{—™KšœT˜T—Kšžœ˜K˜——…—$(0Γ