NMosTransistorCommands.mesa (part of ChipNDale)
Copyright © 1983, 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, June 24, 1983 5:03 pm
last edited Christian Jacobi, September 23, 1985 6:33:28 pm PDT
DIRECTORY
CD,
NMosTransistors,
CDOps,
CDSequencer,
CDPanel,
CDValue,
TerminalIO,
NMos;
NMosTransistorCommands: CEDAR PROGRAM
IMPORTS CDOps, CDSequencer, CDPanel, CDValue, TerminalIO, NMosTransistors, NMos =
BEGIN
lambda: CD.Number = NMos.lambda;
Implant: TYPE = NMosTransistors.Implant;
CreateTransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.WriteRope["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.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreateATransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.WriteRope["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.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreatePullUpComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.Object;
TerminalIO.WriteRope["Create Pullup\n"];
ob ← NMosTransistors.CreatePullUp[
w: CDValue.FetchInt[comm.design, $NMosPullUpW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $NMosPullUpH, technology]*lambda
];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
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.WriteRope[" Creates weak depletion transistor\n"];
implant ← NMosTransistors.weakDepletion
}
ELSE {
TerminalIO.WriteRope[" 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.EnregisterKey[$NMosTransistorW, NMos.nmos];
CDValue.EnregisterKey[$NMosTransistorL, NMos.nmos];
CDValue.EnregisterKey[$NMosTransistorImplant, NMos.nmos];
CDValue.EnregisterKey[$NMosImplantCrazy, 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.EnregisterKey[$NMosPullUpW, NMos.nmos];
CDValue.EnregisterKey[$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];
END;
ImplCommands[];
END.