<> <> <> <> 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.Layer = 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.Layer = 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: 4]; 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.