CreateTransistorComm:
PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
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: CDValue.FetchInt[comm.design, $NMosTransistorImplant, technology]
];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreateATransistorComm:
PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
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: CDValue.FetchInt[comm.design, $NMosTransistorImplant, technology]
];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreatePullUpComm:
PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
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;
ImplCommands:
PROC [] =
BEGIN
--oldy--CDSequencer.ImplementCommand[$DrawXstr, CreateTransistorComm, NMos.nmos];
CDSequencer.ImplementCommand[$DrawNXstr, CreateTransistorComm, NMos.nmos];
CDValue.EnregisterKey[$NMosTransistorW, NMos.nmos];
CDValue.EnregisterKey[$NMosTransistorL, NMos.nmos];
CDValue.EnregisterKey[$NMosTransistorImplant, 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: 3, default: 0];
CDPanel.DefineNewLine[NMos.nmos];
--oldy--CDSequencer.ImplementCommand[$DrawAngleXstr, CreateATransistorComm, 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;