CMosTransistorCommands.mesa (part of Chipndale)
by Christian Jacobi June 24, 1983 5:03 pm
last edited Christian Jacobi February 8, 1984 10:57 am
DIRECTORY
CD,
CMosTransistors,
CDOps,
CDSequencer,
CDPanel,
CDValue,
TerminalIO,
CMos;
CMosTransistorCommands: CEDAR PROGRAM
IMPORTS CDOps, CDSequencer, CDPanel, CDValue, TerminalIO, CMosTransistors, CMos =
BEGIN
lambda: CD.DesignNumber = CD.lambda;
CreateAnyDifTransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
l: CD.Level = CMos.CurrentDiffusion[comm.design];
TerminalIO.WriteRope["Create transistor (current dif)\n"];
ob ← CMosTransistors.CreateTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: l];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreateTransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
TerminalIO.WriteRope["Create transistor\n"];
ob ← CMosTransistors.CreateTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: CMos.ndif];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreateAnyDifATransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
l: CD.Level = CMos.CurrentDiffusion[comm.design];
TerminalIO.WriteRope["Create angle transistor (current dif)\n"];
ob ← CMosTransistors.CreateAngleTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: l];
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 ← CMosTransistors.CreateAngleTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: CMos.ndif];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreatePTypeTransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
TerminalIO.WriteRope["Create transistor\n"];
ob ← CMosTransistors.CreateTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: CMos.pdif];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
CreatePTypeATransistorComm: PROC [comm: CDSequencer.Command] =
BEGIN
ob: CD.ObPtr;
TerminalIO.WriteRope["Create angle transistor\n"];
ob ← CMosTransistors.CreateAngleTransistor[
w: CDValue.FetchInt[comm.design, $CMosTransistorW, technology]*lambda,
l: CDValue.FetchInt[comm.design, $CMosTransistorL, technology]*lambda,
difLev: CMos.pdif];
CDOps.AddAnObject[design: comm.design, ob: ob, location: comm.pos, orientation: 0]
END;
ImplCommands: PROC [] =
BEGIN
CDSequencer.ImplementCommand[$DrawNXstr, CreateTransistorComm, CMos.cmos];
CDSequencer.ImplementCommand[$DrawPXstr, CreatePTypeTransistorComm, CMos.cmos];
CDSequencer.ImplementCommand[$DrawXstr, CreateAnyDifTransistorComm, CMos.cmos];
CDValue.EnregisterKey[$CMosTransistorW, CMos.cmos];
CDValue.EnregisterKey[$CMosTransistorL, CMos.cmos];
CDPanel.DefineIntEntry[cdValueKey: $CMosTransistorW, tech: CMos.cmos,
text: "Transistor width:", min: 1, default: 2];
CDPanel.DefineIntEntry[cdValueKey: $CMosTransistorL, tech: CMos.cmos,
text: "length:", min: 1, default: 2];
CDPanel.DefineNewLine[CMos.cmos];
CDSequencer.ImplementCommand[$DrawAngleNXstr, CreateATransistorComm, CMos.cmos];
CDSequencer.ImplementCommand[$DrawAngleXstr, CreateAnyDifATransistorComm, CMos.cmos];
CDSequencer.ImplementCommand[$DrawAnglePXstr, CreatePTypeATransistorComm, CMos.cmos];
END;
ImplCommands[];
END.