DIRECTORY CD, CDAtomicObjects, CDLayers, CDOps, CDCommandOps, CDPanelFonts, CDSequencer, CDViewer, Commander USING [CommandProc, Register], IO, Rope, TerminalIO, CMosB; CMosBCommands: CEDAR PROGRAM IMPORTS CDAtomicObjects, CDCommandOps, CDLayers, CDOps, CDPanelFonts, CDSequencer, CDViewer, Commander, IO, TerminalIO, CMosB = BEGIN lambda: CD.Number = CMosB.lambda; CreateXstr: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; layer: CD.Layer; size: CD.Position _ [8*lambda, 8*lambda]; TerminalIO.PutRope["create transistor "]; SELECT comm.key FROM $DrawNXstr => layer _ CMosB.ndif; $DrawWNXstr => layer _ CMosB.wndif; $DrawPXstr => layer _ CMosB.pdif; $DrawWPXstr => layer _ CMosB.wpdif; ENDCASE => layer _ CMosB.ndif; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2Trans, size, comm.design.technology, layer]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateLXstr: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; layer: CD.Layer; TerminalIO.PutRope["create L transistor "]; SELECT comm.key FROM $DrawAngleNXstr => layer _ CMosB.ndif; $DrawAngleWNXstr => layer _ CMosB.wndif; $DrawAnglePXstr => layer _ CMosB.pdif; $DrawAngleWPXstr => layer _ CMosB.wpdif; ENDCASE => layer _ CMosB.ndif; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2LTrans, [0, 0], comm.design.technology, layer]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateCont: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; layer: CD.Layer; TerminalIO.PutRope["create contact "]; SELECT comm.key FROM $DrawNDifCon => layer _ CMosB.ndif; $DrawWNDifCon => layer _ CMosB.wndif; $DrawPDifCon => layer _ CMosB.pdif; $DrawWPDifCon => layer _ CMosB.wpdif; $DrawPolCon => layer _ CMosB.pol; $DrawNWCntCon => layer _ CMosB.nwellCont; $DrawPWCntCon => layer _ CMosB.pwellCont; ENDCASE => layer _ CMosB.pol; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2SimpleCon, [0, 0], comm.design.technology, layer]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateLargeCont: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; layer: CD.Layer; TerminalIO.PutRope["create large contact "]; SELECT comm.key FROM $DrawLNDifCon => layer _ CMosB.ndif; $DrawLWNDifCon => layer _ CMosB.wndif; $DrawLPDifCon => layer _ CMosB.pdif; $DrawLWPDifCon => layer _ CMosB.wpdif; $DrawLPolCon => layer _ CMosB.pol; $DrawLNWCntCon => layer _ CMosB.nwellCont; $DrawLPWCntCon => layer _ CMosB.pwellCont; ENDCASE => layer _ CMosB.pol; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2LargeSimpleCon, [0, 0], comm.design.technology, layer]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateDiffShortCont: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; layer: CD.Layer; TerminalIO.PutRope["create diff short contact "]; SELECT comm.key FROM $DrawNDifShortCon => layer _ CMosB.ndif; $DrawWNDifShortCon => layer _ CMosB.wndif; $DrawPDifShortCon => layer _ CMosB.pdif; $DrawWPDifShortCon => layer _ CMosB.wpdif; ENDCASE => layer _ CMosB.ndif; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2DifShortCon, [0, 0], comm.design.technology, layer]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateVia: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; TerminalIO.PutRope["create via\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2Via, [0, 0], comm.design.technology]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; CreateLargeVia: PROC [comm: CDSequencer.Command] = BEGIN ob: CD.Object; TerminalIO.PutRope["create large via\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2LargeVia, [0, 0], comm.design.technology]; IF ob=NIL THEN TerminalIO.PutRope["not done\n"] ELSE CDOps.IncludeObjectI[design: comm.design, ob: ob, location: comm.pos] END; DiffToPWorld: PROC [comm: CDSequencer.Command] = BEGIN layer: CD.Layer = CDLayers.CurrentLayer[comm.design]; TerminalIO.PutRope["Switch diffusion to P type"]; SELECT layer FROM CMosB.ndif => CDLayers.SetCurrentLayer[comm.design, CMosB.wpdif]; CMosB.pwellCont => CDLayers.SetCurrentLayer[comm.design, CMosB.nwellCont]; ENDCASE => TerminalIO.PutRope[" not done"]; TerminalIO.PutRope["\n"]; END; DiffToNWorld: PROC [comm: CDSequencer.Command] = BEGIN layer: CD.Layer = CDLayers.CurrentLayer[comm.design]; TerminalIO.PutRope["Switch diffusion to N type"]; SELECT layer FROM CMosB.pdif => CDLayers.SetCurrentLayer[comm.design, CMosB.ndif]; CMosB.wpdif => CDLayers.SetCurrentLayer[comm.design, CMosB.ndif]; CMosB.nwellCont => CDLayers.SetCurrentLayer[comm.design, CMosB.pwellCont]; ENDCASE => TerminalIO.PutRope[" not done"]; TerminalIO.PutRope["\n"]; END; NewCWorld: Commander.CommandProc = { design: CD.Design _ CDOps.CreateDesign[CMosB.cmosB]; [] _ CDViewer.CreateViewer[design]; cmd.out.PutRope["cmosB design created\n"]; }; Load: Commander.CommandProc = { cmd.out.PutRope["cmosB loaded\n"]; }; Init: PROC [] = { MakeComm: PROC [key: ATOM, p: CDSequencer.CommandProc, qm: CDSequencer.QueueMethod_doQueue] = { CDSequencer.ImplementCommand[key, p, CMosB.cmosB, qm]; }; fontNames: LIST OF Rope.ROPE = LIST["4 Gates32", "4 TimesRoman8", "4 Helvetica8I", "4 Helvetica8", "2 TimesRoman8", "2 Helvetica8I", "2 Helvetica8"]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerComment, CD.commentLayer, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNWell, CMosB.nwell, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPWell, CMosB.pwell, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNDif, CMosB.ndif, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPol, CMosB.pol, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerMet2, CMosB.met2, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerMet, CMosB.met, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPDif, CMosB.wpdif, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerNWCnt, CMosB.nwellCont, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerPWCnt, CMosB.pwellCont, CMosB.cmosB]; MakeComm[$TestDifFlipToPWorld, DiffToPWorld]; MakeComm[$TestDifFlipToNWorld, DiffToNWorld]; MakeComm[$DiffToPWorld, DiffToPWorld]; MakeComm[$DiffToNWorld, DiffToNWorld]; MakeComm[$DrawNXstr, CreateXstr, doQueueAndMark]; MakeComm[$DrawPXstr, CreateXstr, doQueueAndMark]; MakeComm[$DrawWNXstr, CreateXstr, doQueueAndMark]; MakeComm[$DrawWPXstr, CreateXstr, doQueueAndMark]; MakeComm[$DrawAngleNXstr, CreateLXstr, doQueueAndMark]; MakeComm[$DrawAnglePXstr, CreateLXstr, doQueueAndMark]; MakeComm[$DrawAngleWNXstr, CreateLXstr, doQueueAndMark]; MakeComm[$DrawAngleWPXstr, CreateLXstr, doQueueAndMark]; MakeComm[$DrawNDifCon, CreateCont, doQueueAndMark]; MakeComm[$DrawWNDifCon, CreateCont, doQueueAndMark]; MakeComm[$DrawPDifCon, CreateCont, doQueueAndMark]; MakeComm[$DrawWPDifCon, CreateCont, doQueueAndMark]; MakeComm[$DrawPolCon, CreateCont, doQueueAndMark]; MakeComm[$DrawNWCntCon, CreateCont, doQueueAndMark]; MakeComm[$DrawPWCntCon, CreateCont, doQueueAndMark]; MakeComm[$DrawLNDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLWNDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLPDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLWPDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLPolCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLNWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawLPWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawNDifShortCon, CreateDiffShortCont, doQueueAndMark]; MakeComm[$DrawWNDifShortCon, CreateDiffShortCont, doQueueAndMark]; MakeComm[$DrawPDifShortCon, CreateDiffShortCont, doQueueAndMark]; MakeComm[$DrawWPDifShortCon, CreateDiffShortCont, doQueueAndMark]; MakeComm[$DrawMm2Con, CreateVia, doQueueAndMark]; MakeComm[$DrawLVia, CreateLargeVia, doQueueAndMark]; Commander.Register[ key: "///Commands/CDNewCMosB", proc: NewCWorld, doc: "Creates new CMosB design" ]; Commander.Register[ key: "///Commands/CDCMosB", proc: Load, doc: "loads CMosB ChipNDale" ]; CDPanelFonts.ImplementIt[tech: CMosB.cmosB, layerProc: CommentLayer, defaultFonts: fontNames]; Commander.Register[ key: "///Commands/CDCMos", proc: Load, doc: "loads CMosB ChipNDale" ]; Commander.Register[ key: "///Commands/CDNewCMos", proc: NewCWorld, doc: "Creates new CMosB design" ]; }; CommentLayer: PROC [CD.Layer] RETURNS [CD.Layer] = { RETURN [CD.commentLayer]; }; Init[]; END. όCMosBCommands.mesa (part of ChipNDale) Copyright c 1983, 1986 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, June 24, 1983 5:03 pm Last edited by: Christian Jacobi, October 21, 1986 3:01:52 pm PDT --for compatibility ΚA˜codešœ'™'Kšœ Οmœ7™BKšœ3™3K™A—K˜šΟk ˜ Kšžœ˜K˜Kšœ ˜ Kšœ˜Kšœ ˜ Kšœ ˜ Kšœ ˜ Kšœ ˜ Kšœ žœ˜(K˜K˜K˜ K˜—K˜šΟn œžœžœ˜Kšžœažœ˜€—Kšž˜K˜Kšœžœ˜!K˜šŸ œžœ˜.Kšž˜Kšœžœ˜Kšœžœ˜Kšœžœ!˜)Kšœ)˜)šžœ ž˜Kšœ!˜!Kšœ#˜#Kšœ!˜!Kšœ#˜#Kšžœ˜—Kšœ2˜2KšœS˜Sšžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸ œžœ˜/Kšž˜Kšœžœ˜Kšœžœ˜Kšœ+˜+šžœ ž˜Kšœ&˜&Kšœ(˜(Kšœ&˜&Kšœ(˜(Kšžœ˜—Kšœ2˜2KšœV˜Všžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸ œžœ˜.Kšž˜Kšœžœ˜Kšœžœ˜Kšœ&˜&šžœ ž˜Kšœ#˜#Kšœ%˜%Kšœ#˜#Kšœ%˜%Kšœ!˜!Kšœ)˜)Kšœ)˜)Kšžœ˜—Kšœ2˜2KšœY˜Yšžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸœžœ˜3Kšž˜Kšœžœ˜Kšœžœ˜Kšœ,˜,šžœ ž˜Kšœ$˜$Kšœ&˜&Kšœ$˜$Kšœ&˜&Kšœ"˜"Kšœ*˜*Kšœ*˜*Kšžœ˜—Kšœ2˜2Kšœ^˜^šžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸœžœ˜7Kšž˜Kšœžœ˜Kšœžœ˜Kšœ1˜1šžœ ž˜Kšœ(˜(Kšœ*˜*Kšœ(˜(Kšœ*˜*Kšžœ˜—Kšœ2˜2Kšœ[˜[šžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸ œžœ˜-Kšž˜Kšœžœ˜Kšœ#˜#KšœL˜Lšžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸœžœ˜2Kšž˜Kšœžœ˜Kšœ)˜)KšœQ˜Qšžœžœž˜Kšœ ˜ —šž˜KšœE˜E—Kšžœ˜K˜—šŸ œžœ˜0Kšž˜Kšœžœ,˜5Kšœ1˜1šžœž˜KšœA˜AKšœJ˜JKšžœ%˜,—Kšœ˜Kšžœ˜K˜—šŸ œžœ˜0Kšž˜Kšœžœ,˜5Kšœ1˜1šžœž˜Kšœ@˜@KšœA˜AKšœJ˜JKšžœ%˜,—Kšœ˜Kšžœ˜—K˜šŸ œ˜$Kšœžœ*˜4K˜#Kšœ*˜*Kšœ˜—K˜šŸœ˜Kšœ"˜"Kšœ˜—K˜šŸœžœ˜K˜šŸœžœžœF˜_Kšœ6˜6Kšœ˜—K˜Kš œ žœžœžœžœr˜•K˜Kšœ;žœ˜YKšœS˜SKšœS˜SKšœQ˜QKšœO˜OKšœQ˜QKšœO˜OKšœR˜RKšœW˜WKšœW˜WK˜Kšœ-˜-Kšœ-˜-Kšœ&˜&Kšœ&˜&Kšœ1˜1Kšœ1˜1Kšœ2˜2Kšœ2˜2K˜Kšœ7˜7Kšœ7˜7Kšœ8˜8Kšœ8˜8K˜Kšœ3˜3Kšœ4˜4Kšœ3˜3Kšœ4˜4Kšœ2˜2Kšœ4˜4Kšœ4˜4K˜Kšœ9˜9Kšœ:˜:Kšœ9˜9Kšœ:˜:Kšœ8˜8Kšœ:˜:Kšœ:˜:K˜KšœA˜AKšœB˜BKšœA˜AKšœB˜BK˜Kšœ1˜1Kšœ4˜4K˜šœ˜K˜K˜K˜Kšœ˜—šœ˜K˜K˜ K˜Kšœ˜—Kšœ^˜^šœ™šœ˜K˜K˜ K˜Kšœ˜—šœ˜K˜K˜K˜Kšœ˜——Kšœ˜—K˜š Ÿ œžœžœžœžœ ˜4Kšžœžœ˜Kšœ˜—K˜K˜Kšžœ˜K˜—…—"θ,%