<> <> <> <> 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.IncludeObjectI[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.IncludeObjectI[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.IncludeObjectI[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.RegisterKey[$NMosTransistorW, NMos.nmos]; CDValue.RegisterKey[$NMosTransistorL, NMos.nmos]; CDValue.RegisterKey[$NMosTransistorImplant, NMos.nmos]; CDValue.RegisterKey[$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.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]; END; ImplCommands[]; END.