NMosSimpleRulesImpl.mesa
Copyright © 1985 by Xerox Corporation. All rights reserved.
by Ch. Jacobi, July 5, 1985 4:58:37 pm PDT
last edited Christian Jacobi, September 23, 1985 6:39:16 pm PDT
DIRECTORY
CD, CDSimpleRulesBackdoor, NMos, NMosContacts;
NMosSimpleRulesImpl:
CEDAR
PROGRAM
IMPORTS CDSimpleRulesBackdoor, NMos, NMosContacts =
BEGIN
lambda: CD.Number = NMos.lambda;
IRules: TYPE = CDSimpleRulesBackdoor.IRules;
MinWidth:
PROC [layer:
CD.Layer, rules: IRules]
RETURNS [
CD.Number] =
BEGIN
RETURN [
SELECT layer
FROM
NMos.met => 3*lambda,
NMos.met2 => 4*lambda,
NMos.pol => 2*lambda,
NMos.dif => 2*lambda,
ENDCASE => 0
]
END;
MinDist:
PROC [l1, l2:
CD.Layer, rules: IRules]
RETURNS [
CD.Number] =
BEGIN
IF l1=l2
THEN
RETURN [
SELECT l1
FROM
NMos.met => 3*lambda,
NMos.met2 => 4*lambda,
NMos.pol => 2*lambda,
NMos.dif => 3*lambda,
ENDCASE => 0
];
IF l2=NMos.met THEN {l2 ← l1; l1 ← NMos.met};
IF l1=NMos.met
THEN
RETURN [
SELECT l1
FROM
NMos.cut => 2*lambda,
ENDCASE => 0
];
IF l2=NMos.met2 THEN {l2 ← l1; l1 ← NMos.met2};
IF l1=NMos.met2
THEN
RETURN [
SELECT l1
FROM
NMos.cut2 => 2*lambda,
ENDCASE => 0
];
IF l2=NMos.pol THEN {l2 ← l1; l1 ← NMos.pol};
IF l1=NMos.pol
THEN {
IF l2=NMos.dif THEN RETURN[lambda];
IF l2=NMos.imp OR l2=NMos.imp0 OR l2=NMos.impWeak THEN RETURN[2*lambda];
IF l2=NMos.cut OR l2=NMos.bur THEN RETURN[2*lambda];
RETURN[0];
};
IF l2=NMos.dif THEN {l2 ← l1; l1 ← NMos.dif};
IF l1=NMos.dif
THEN {
RETURN [
SELECT l1
FROM
NMos.imp, NMos.imp0, NMos.impWeak => 2*lambda,
NMos.cut, NMos.bur => 2*lambda,
ENDCASE => 0
];
};
RETURN [0]
END;
Contact:
PROC [l1, l2:
CD.Layer, rules: IRules]
RETURNS [ob:
CD.Object ←
NIL] =
BEGIN
IF l1#NMos.met AND l2=NMos.met THEN RETURN [Contact[l2, l1, rules]];
IF l1=NMos.met
THEN {
IF l2=NMos.pol THEN RETURN [NMosContacts.CreatePolyCon[0]];
IF l2=NMos.met2 THEN RETURN [NMosContacts.CreateMmCon[0]];
IF l2=NMos.dif THEN RETURN [NMosContacts.CreateDifCon[0]];
};
END;
Init:
PROC [] = {
CDSimpleRulesBackdoor.RegisterLayerName["n-diff", NMos.dif];
CDSimpleRulesBackdoor.RegisterLayerName["diff", NMos.dif];
CDSimpleRulesBackdoor.RegisterLayerName["poly", NMos.pol];
CDSimpleRulesBackdoor.RegisterLayerName["metal", NMos.met];
CDSimpleRulesBackdoor.RegisterLayerName["metal2", NMos.met2];
CDSimpleRulesBackdoor.RegisterRules[[
key: NIL,
technology: NMos.nmos,
minWidth: MinWidth,
minDist: MinDist,
contact: Contact
]];
};
Init[];
END.