NMosTransistorCommands.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 1:39:43 pm PST
DIRECTORY
CD,
NMosContacts,
NMosTransistors,
CDOps,
CDSequencer,
CDPanel,
CDValue,
TerminalIO,
NMos;
NMosTransistorCommands: CEDAR PROGRAM
IMPORTS CD, CDOps, CDSequencer, CDPanel, CDValue, TerminalIO, NMosContacts, NMosTransistors, NMos =
BEGIN
lambda: CD.Number = NMos.lambda;
Implant: TYPE = NMosTransistors.Implant;
CreateTransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.PutRope["create transistor\n"];
ob ← NMosTransistors.CreateTransistor[
w: CDValue.FetchInt[comm.design, $NMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $NMosTransistorL, technology]*lambda,
implant: GetImplant[comm.design]
];
CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos]
END;
CreateATransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.PutRope["Create angle transistor\n"];
ob ← NMosTransistors.CreateAngleTransistor[
w: CDValue.FetchInt[comm.design, $NMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $NMosTransistorL, technology]*lambda,
implant: GetImplant[comm.design]
];
CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos]
END;
CreatePullUpComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.PutRope["Create Pullup\n"];
ob ← NMosTransistors.CreatePullUp[
w: CDValue.FetchInt[comm.design, $NMosPullUpW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $NMosPullUpH, technology]*lambda
];
CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos]
END;
ChangeExtComm: PROC [comm: CDSequencer.Command] = {
inst: CD.Instance ← CDOps.TheInstance[comm.design, "change extension"];
IF inst#NIL THEN {
new: CD.Object ← NIL;
wex: INT ← CDValue.FetchInt[comm.design, $NMosWEx, technology];
lex: INT ← CDValue.FetchInt[comm.design, $NMosLEx, technology];
WITH inst.ob.specific SELECT FROM
tp: NMosTransistors.TransistorPtr => {
new ← NMosTransistors.CreateTransistor[
w: tp.width,
l: tp.length,
wExt: wex,
lExt: lex
];
};
cp: NMosContacts.ContactPtr => {
sz: CD.Position ← CD.InterestSize[inst.ob];
new ← NMosContacts.CreateBurCon[
w: sz.x+2*(wex-cp.wExt),
l: sz.y+2*(lex-cp.lExt),
wex: wex,
lex: lex
];
};
ENDCASE => NULL;
IF new=NIL THEN TerminalIO.PutRope["failed\n"]
ELSE {
CDOps.RedrawInstance[comm.design, inst, TRUE];
inst.ob ← new;
CDOps.RedrawInstance[comm.design, inst, FALSE];
};
};
};
GetImplant: PROC [design: CD.Design] RETURNS [implant: Implant]=
--is talky
BEGIN
impLayer: INT = CDValue.FetchInt[design, $NMosTransistorImplant, technology];
impCrazy: INT = CDValue.FetchInt[design, $NMosImplantCrazy, technology];
IF impCrazy=1 THEN {
IF impLayer=1 THEN {
TerminalIO.PutRope[" Creates weak depletion transistor\n"];
implant ← NMosTransistors.weakDepletion
}
ELSE {
TerminalIO.PutRope[" Creates zero treshold transistor\n"];
implant ← NMosTransistors.zeroTresh;
}
}
ELSE {
IF impLayer=1 THEN implant ← NMosTransistors.strongDepletion
ELSE implant ← NMosTransistors.enhancement
}
END;
ImplCommands: PROC [] =
BEGIN
CDSequencer.ImplementCommand[$DrawNXstr, CreateTransistorComm, NMos.nmos];
CDValue.RegisterKey[$NMosTransistorW, NMos.nmos, $nmos];
CDValue.RegisterKey[$NMosTransistorL, NMos.nmos, $nmos];
CDValue.RegisterKey[$NMosTransistorImplant, NMos.nmos, $nmos];
CDValue.RegisterKey[$NMosImplantCrazy, NMos.nmos, $nmos];
CDValue.RegisterKey[$NMosWEx, NMos.nmos, $nmos];
CDValue.RegisterKey[$NMosLEx, NMos.nmos, $nmos];
CDPanel.DefineIntEntry[cdValueKey: $NMosTransistorW, tech: NMos.nmos,
text: "Transistor width:", min: 1, default: 2];
CDPanel.DefineIntEntry[cdValueKey: $NMosTransistorL, tech: NMos.nmos,
text: "length:", min: 1, default: 2];
CDPanel.DefineIntEntry[cdValueKey: $NMosTransistorImplant, tech: NMos.nmos,
text: "implant:", min: 0, max: 1, default: 0];
CDPanel.DefineIntEntry[cdValueKey: $NMosImplantCrazy, tech: NMos.nmos,
text: "weak:", min: 0, max: 1, default: 0];
CDPanel.DefineNewLine[NMos.nmos];
CDSequencer.ImplementCommand[$DrawAngleNXstr, CreateATransistorComm, NMos.nmos];
CDSequencer.ImplementCommand[$DrawPullup, CreatePullUpComm, NMos.nmos];
CDValue.RegisterKey[$NMosPullUpW, NMos.nmos];
CDValue.RegisterKey[$NMosPullUpH, NMos.nmos];
CDPanel.DefineIntEntry[cdValueKey: $NMosPullUpW, tech: NMos.nmos,
text: "PullUp width:", min: 1, default: 2];
CDPanel.DefineIntEntry[cdValueKey: $NMosPullUpH, tech: NMos.nmos,
text: "height:", min: 1, default: 3];
CDPanel.DefineNewLine[NMos.nmos];
CDPanel.DefineIntEntry[cdValueKey: $NMosWEx, tech: NMos.nmos,
text: "extension comm: W:", min: 0, default: 2, lambda: NMos.lambda];
CDPanel.DefineIntEntry[cdValueKey: $NMosLEx, tech: NMos.nmos,
text: " L:", min: 0, default: 2, lambda: NMos.lambda];
CDPanel.DefineNewLine[NMos.nmos];
CDSequencer.ImplementCommand[$ChangeExt, ChangeExtComm, NMos.nmos];
END;
ImplCommands[];
END.