CMosBuriedContactsImpl.mesa (part of ChipNDale)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
Christian Jacobi, June 24, 1983 5:03 pm
last edited Christian Jacobi, March 25, 1986 4:31:09 pm PST
DIRECTORY
Atom,
CD,
CDStretchyExtras,
CMos,
CDAtomicObjects,
Rope;
CMosBuriedContactsImpl: CEDAR PROGRAM
IMPORTS CDAtomicObjects, CDStretchyExtras, CMos =
BEGIN
lambda: CD.Number = CMos.lambda;
MatchContact: PROC [me: CD.Object, r: CD.Rect,
layer: CD.Layer, prim: BOOL, horz: BOOL] RETURNS [BOOL] =
BEGIN
RETURN [ layer=CMos.ndif OR layer=CMos.pol ]
END;
FillBuried: PROC [ob: CD.Object] =
BEGIN
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.size.x,
y1: 0,
y2: ob.size.y],
lev: CMos.bur
];
ob.layer ← CMos.ndif;
END;
FillConS: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] =
BEGIN
ob.size.x ← MAX[4*lambda, ob.size.x];
ob.size.y ← MAX[5*lambda, ob.size.y];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.size.x,
y1: 2*lambda,
y2: ob.size.y-lambda],
lev: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.size.x-lambda,
y1: 0,
y2: ob.size.y],
lev: CMos.ndif
];
END;
FillConPS: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] =
BEGIN
ob.size.x ← MAX[5*lambda, ob.size.x];
ob.size.y ← MAX[4*lambda, ob.size.y];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.size.x-2*lambda,
y1: 0,
y2: ob.size.y],
lev: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.size.x,
y1: lambda,
y2: ob.size.y-lambda],
lev: CMos.ndif
];
END;
FillConDL: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] =
BEGIN
ob.size.x ← MAX[4*lambda, ob.size.x];
ob.size.y ← MAX[5*lambda, ob.size.y];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.size.x-lambda,
y1: 2*lambda,
y2: ob.size.y-lambda],
lev: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.size.x,
y1: lambda,
y2: ob.size.y],
lev: CMos.ndif
];
END;
FillConDI: PROC [ob: CD.Object] RETURNS [mustFail: BOOLFALSE] =
BEGIN
ob.size.x ← MAX[5*lambda, ob.size.x];
ob.size.y ← MAX[4*lambda, ob.size.y];
FillBuried[ob];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: 0,
x2: ob.size.x-2*lambda,
y1: lambda,
y2: ob.size.y-lambda],
lev: CMos.pol
];
CDAtomicObjects.Incorporate[ob: ob,
r: [x1: lambda,
x2: ob.size.x-lambda,
y1: 0,
y2: ob.size.y],
lev: CMos.ndif
];
END;
Register: PROC [key: ATOM, creator: CDAtomicObjects.FillObjectProc, desc: Rope.ROPE] =
BEGIN
class: CD.ObjectClass ← CDAtomicObjects.RegisterAtomicObClass[key, creator, desc, CMos.cmos];
IF class=NIL THEN ERROR;
CDStretchyExtras.InstallMatch[class, MatchContact];
END;
Init: PROC [] =
BEGIN
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)"];
END;
Init[];
END.