CMosBuriedContactsImpl.mesa (part of ChipNDale)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
Created by Christian Jacobi, June 24, 1983 5:03 pm
Last edited by: Christian Jacobi, October 31, 1986 2:57:29 pm PST
DIRECTORY
Atom,
CD,
CDBasics,
CDStretchyBackdoor,
CMos,
CDAtomicObjects,
Rope;
CMosBuriedContactsImpl: CEDAR PROGRAM
IMPORTS CDAtomicObjects, CDBasics, CDStretchyBackdoor, CMos =
BEGIN
lambda: CD.Number = CMos.lambda;
MatchContact: PROC [me: CD.Object, r: CD.Rect, layer: CD.Layer, prim: BOOL, horz: BOOL] RETURNS [BOOL] = {
RETURN [ layer=CMos.ndif OR layer=CMos.pol ]
};
FillBuried: PROC [ob: CD.Object] = {
CDAtomicObjects.Incorporate[ob: ob, r: ob.bbox, layer: CMos.bur];
ob.layer ← CMos.ndif;
};
FillConS: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] = {
sz: CD.Position ← CDBasics.SizeOfRect[ob.bbox];
ob.bbox ← [0, 0, MAX[4*lambda, sz.x], MAX[5*lambda, sz.y]];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.bbox.x2,
y1: 2*lambda,
y2: ob.bbox.y2-lambda],
layer: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.bbox.x2-lambda,
y1: 0,
y2: ob.bbox.y2],
layer: CMos.ndif
];
};
FillConPS: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] = {
sz: CD.Position ← CDBasics.SizeOfRect[ob.bbox];
ob.bbox ← [0, 0, MAX[5*lambda, sz.x], MAX[4*lambda, sz.y]];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.bbox.x2-2*lambda,
y1: 0,
y2: ob.bbox.y2],
layer: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.bbox.x2,
y1: lambda,
y2: ob.bbox.y2-lambda],
layer: CMos.ndif
];
};
FillConDL: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] = {
sz: CD.Position ← CDBasics.SizeOfRect[ob.bbox];
ob.bbox ← [0, 0, MAX[4*lambda, sz.x], MAX[5*lambda, sz.y]];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.bbox.x2-lambda,
y1: 2*lambda,
y2: ob.bbox.y2-lambda],
layer: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.bbox.x2,
y1: lambda,
y2: ob.bbox.y2],
layer: CMos.ndif
];
};
FillConDI: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] = {
sz: CD.Position ← CDBasics.SizeOfRect[ob.bbox];
ob.bbox ← [0, 0, MAX[5*lambda, sz.x], MAX[4*lambda, sz.y]];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.bbox.x2-2*lambda,
y1: lambda,
y2: ob.bbox.y2-lambda],
layer: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.bbox.x2-lambda,
y1: 0,
y2: ob.bbox.y2],
layer: CMos.ndif
];
};
Register: PROC [key: ATOM, creator: CDAtomicObjects.FillObjectProc, desc: Rope.ROPE] = {
class: CD.ObjectClass ← CDAtomicObjects.RegisterAtomicObClass[key, creator, desc, CMos.cmos];
IF class=NIL THEN ERROR;
CDStretchyBackdoor.InstallMatchProc[class, MatchContact];
};
Init: PROC [] = {
Register[$CBurContS, FillConS, "buried contact (simple)"];
Register[$CBurContPS, FillConPS, "buried contact (poly sur)"];
Register[$CBurContDI, FillConDI, "buried contact (dif I)"];
Register[$CBurContDL, FillConDL, "buried contact (dif L)"];
};
Init[];
END.