SinixCMosB.mesa
Copyright © 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
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;
Properties and extraction of common objects
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];
};
Contacts
Copies the rectangles of rList which are not well in the returned wire
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;
};
Diffusion wires
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]];
};
Transistors
New layers for transistors
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;
};
source is the smallest diff
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;
};
Initialization
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]];
};
Highlight for this technology
SinixHighlight.RegisterDefaultLayoutMode[CMosB.cmosB, CMosBContextCreator];
Registering extract procs
Sinix.RegisterExtractProc[$CMosBExtractPin, ExtractPin];
Sinix.RegisterExtractProc[$CMosBExtractRect, ExtractRect];
Sinix.RegisterExtractProc[$CMosBExtractAtomicWell, ExtractAtomicWell];
Sinix.RegisterExtractProc[$CMosBExtractWellDiff, ExtractWellDiff];
Sinix.RegisterExtractProc[$CMosBExtractTransistor, ExtractTransistor];
Sinix.RegisterExtractProc[$CMosBExtractTransistorL, ExtractTransistorL];
Cells, Abuts
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];
Pins
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]];
Rectangles
CDProperties.PutProp[CDRects.bareRectClass, extractBMode.extractProcProp, $CMosBExtractRect];
CDProperties.PutProp[CDRects.bareRectClass, Sinix.touchProcProp, NEW [Sinix.TouchProc ← Sinix.TouchRect]];
Contacts
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];
Diffusion wires
Atomic[className: $C2PDifRect, extractProc: $CMosBExtractWellDiff, touchProc: TouchWellDiff];
Atomic[className: $C2NDifRect, extractProc: $CMosBExtractWellDiff, touchProc: TouchWellDiff];
Transistors
CDProperties.PutProp[CD.FetchObjectClass[$C2Trans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistor];
CDProperties.PutProp[CD.FetchObjectClass[$C2WellTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistor];
Angle Transistors
CDProperties.PutProp[CD.FetchObjectClass[$C2LTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistorL];
In the future, replace CLWellTrans by C2LWellTrans
CDProperties.PutProp[CD.FetchObjectClass[$C2LWellTrans, CMosB.cmosB], extractBMode.extractProcProp, $CMosBExtractTransistorL];
Texts
CDProperties.PutProp[CDTexts.textClass, extractBMode.extractProcProp, $ExtractNull];
END.