DIRECTORY CD, CDAtomicObjects, CDLayers, CDOps, CDCommandOps, CDPanel, CDPanelFonts, CDSequencer, CDTexts, CDValue, CDViewer, IO, Rope, TerminalIO, CMosB, ViewerClasses, ViewerOps; CMosBPolyCommands: CEDAR PROGRAM IMPORTS CD, CDAtomicObjects, CDCommandOps, CDLayers, CDOps, CDPanel, CDPanelFonts, CDSequencer, CDTexts, CDValue, CDViewer, TerminalIO, CMosB, ViewerOps = BEGIN lambda: CD.Number = CMosB.lambda; CreateXstr: PROC [comm: CDSequencer.Command] = { ob: CD.Object; layer: CD.Layer; size: CD.Position _ [50*lambda, 30*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[$C2PolyTrans, size, comm.design.technology, layer]; CDCommandOps.IncludeOb[comm, ob] }; CreateLXstr: PROC [comm: CDSequencer.Command] = { ob: CD.Object; layer: CD.Layer; size: CD.Position _ [50*lambda, 50*lambda]; 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[$C2PolyLTrans, size, comm.design.technology, layer]; CDCommandOps.IncludeOb[comm, ob] }; CreateLargeCont: PROC [comm: CDSequencer.Command] = { ob: CD.Object; layer: CD.Layer; TerminalIO.PutRope["create large 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; $DrawWNWCntCon => layer _ CMosB.wnwellCont; $DrawWPWCntCon => layer _ CMosB.wpwellCont; ENDCASE => layer _ CMosB.pol; TerminalIO.PutRopes[CDOps.LayerRope[layer], "\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2PolyLargeSimpleCon, [0, 0], comm.design.technology, layer]; CDCommandOps.IncludeOb[comm, ob] }; CreateLargeVia: PROC [comm: CDSequencer.Command] = { ob: CD.Object; TerminalIO.PutRope["create large via\n"]; ob _ CDAtomicObjects.CreateAtomicOb[$C2PolyLargeVia, [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] }; DiffToPWorld: PROC [comm: CDSequencer.Command] = { layer: CD.Layer = CDLayers.CurrentLayer[comm.design]; TerminalIO.PutRope["Switch diffusion to P type"]; SELECT layer FROM CMosB.ndif, CMosB.wndif => CDLayers.SetCurrentLayer[comm.design, CMosB.wpdif]; CMosB.pwellCont, CMosB.wpwellCont => CDLayers.SetCurrentLayer[comm.design, CMosB.wnwellCont]; ENDCASE => TerminalIO.PutRope[" not done"]; TerminalIO.PutRope["\n"]; }; DiffToNWorld: PROC [comm: CDSequencer.Command] = { layer: CD.Layer = CDLayers.CurrentLayer[comm.design]; TerminalIO.PutRope["Switch diffusion to N type"]; SELECT layer FROM CMosB.pdif, CMosB.wpdif => CDLayers.SetCurrentLayer[comm.design, CMosB.ndif]; CMosB.wnwellCont, CMosB.nwellCont => CDLayers.SetCurrentLayer[comm.design, CMosB.pwellCont]; ENDCASE => TerminalIO.PutRope[" not done"]; TerminalIO.PutRope["\n"]; }; SchematicModeComm: PROC [comm: CDSequencer.Command] = { GetGrid: PROC [viewer: ViewerClasses.Viewer] RETURNS [i: INT _ -1] = { WITH ViewerOps.GetViewer[viewer, $Grid] SELECT FROM ri: REF INT => i _ ri^; ENDCASE => NULL; }; font: CDTexts.CDFont _ CDPanelFonts.CurrentFont[comm.design]; viewer: ViewerClasses.Viewer _ CDViewer.GetViewer[comm]; IF viewer#NIL THEN { is: INT _ GetGrid[viewer]; goal: INT _ MAX[2*CMosB.lambda, is]; IF goal#is THEN ViewerOps.SetViewer[viewer: viewer, data: NEW[INT_goal], op: $Grid]; }; CDValue.StoreInt[comm.design, $PanelLayerMode, 0]; CDValue.StoreInt[comm.design, $CDxStepValue, 0]; [] _ CDPanel.PutUp[comm.design, $CDxStepValue]; CDLayers.SetCurrentLayer[comm.design, CD.commentLayer]; CDLayers.SetLayerWidth[comm.design, CD.commentLayer, CMosB.lambda/2]; [] _ CDPanel.PutUp[comm.design, $PanelLayerMode]; [] _ CDPanelFonts.SetCurrentFont[comm.design, CDTexts.MakeFont[font.supposedName, CMosB.lambda/2]]; TerminalIO.PutRope["schematics mode\n"]; }; LayoutModeComm: PROC [comm: CDSequencer.Command] = { font: CDTexts.CDFont _ CDPanelFonts.CurrentFont[comm.design]; viewer: ViewerClasses.Viewer _ CDViewer.GetViewer[comm]; IF viewer#NIL THEN ViewerOps.SetViewer[viewer: viewer, data: NEW[INT_5*CMosB.lambda], op: $Grid]; CDValue.StoreInt[comm.design, $PanelLayerMode, 1]; CDValue.StoreInt[comm.design, $CDxStepValue, 0]; [] _ CDPanel.PutUp[comm.design, $CDxStepValue]; IF CD.LayerTechnology[CDLayers.CurrentLayer[comm.design]]=NIL THEN CDLayers.SetCurrentLayer[comm.design, CD.commentLayer]; [] _ CDPanel.PutUp[comm.design, $PanelLayerMode]; [] _ CDPanelFonts.SetCurrentFont[comm.design, CDTexts.MakeFont[font.supposedName, CMosB.lambda/4]]; CDLayers.SetLayerWidth[comm.design, CMosB.ndif, 10*CMosB.lambda]; CDLayers.SetLayerWidth[comm.design, CMosB.wpdif, 10*CMosB.lambda]; CDLayers.SetLayerWidth[comm.design, CMosB.pol, 10*CMosB.lambda]; CDLayers.SetLayerWidth[comm.design, CMosB.met, 15*CMosB.lambda]; CDLayers.SetLayerWidth[comm.design, CMosB.met2, 15*CMosB.lambda]; TerminalIO.PutRope["layout mode\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 Helvetica8", "4 Helvetica8B", "4 Helvetica12", "4 Helvetica6", "4 Helvetica6B", "4 TimesRoman8", "2 Helvetica8", "1 Helvetica8", "8 Helvetica8", "4 Gates32"]; 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]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerWNWCnt, CMosB.wnwellCont, CMosB.cmosB]; CDCommandOps.RegisterCurrentLayerCommand[$SetLayerWPWCnt, CMosB.wpwellCont, 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, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawWNDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawPDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawWPDifCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawPolCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawNWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawPWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawWNWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawWPWCntCon, CreateLargeCont, doQueueAndMark]; MakeComm[$DrawMm2Con, CreateLargeVia, doQueueAndMark]; MakeComm[$SetLayoutMode, LayoutModeComm]; MakeComm[$SetSchematicMode, SchematicModeComm]; CDPanelFonts.ImplementIt[tech: CMosB.cmosB, layerProc: CommentLayer, defaultFonts: fontNames]; CDCommandOps.RegisterCommanderNewDesign[CMosB.cmosB]; }; CommentLayer: PROC [CD.Layer] RETURNS [CD.Layer] = { RETURN [CD.commentLayer]; }; Init[]; END. öCMosBPolyCommands.mesa (part of ChipNDale) Copyright Ó 1983, 1986, 1988 by Xerox Corporation. All rights reserved. Created by Louis Monier, November 7, 1988 11:33:59 am PST Last edited by: Louis Monier, November 7, 1988 5:06:39 pm PST Êò˜codešœ+™+KšœH™HKšœ:™:K™=—K˜šÏk ˜ Kšœ˜K˜Kšœ ˜ Kšœ˜Kšœ ˜ Kšœ˜Kšœ ˜ Kšœ ˜ Kšœ˜Kšœ˜Kšœ ˜ Kšœ˜K˜K˜ K˜Kšœ˜Kšœ ˜ —K˜šÏnœœœ˜!Kšœ”˜›—Kš˜K˜Kšœœ˜!K˜šž œœ ˜0Kšœœ˜Kšœœ˜Kšœœ#˜+Kšœ)˜)šœ ˜Kšœ!˜!Kšœ#˜#Kšœ!˜!Kšœ#˜#Kšœ˜—Kšœ2˜2KšœW˜WKšœ ˜ Kšœ˜K˜—šž œœ ˜1Kšœœ˜Kšœœ˜Kšœœ#˜+Kšœ+˜+šœ ˜Kšœ&˜&Kšœ(˜(Kšœ&˜&Kšœ(˜(Kšœ˜—Kšœ2˜2KšœX˜XKšœ ˜ Kšœ˜K˜—šžœœ ˜5Kšœœ˜Kšœœ˜Kšœ,˜,šœ ˜Kšœ#˜#Kšœ%˜%Kšœ#˜#Kšœ%˜%Kšœ!˜!Kšœ)˜)Kšœ)˜)Kšœ+˜+Kšœ+˜+Kšœ˜—Kšœ2˜2Kšœb˜bKšœ ˜ Kšœ˜K˜—šžœœ ˜4Kšœœ˜Kšœ)˜)KšœU˜Ušœœ˜Kšœ ˜ —š˜KšœJ˜J—Kšœ˜K˜—šž œœ ˜2Kšœœ,˜5Kšœ1˜1šœ˜KšœN˜NKšœ]˜]Kšœ%˜,—Kšœ˜Kšœ˜K˜—šž œœ ˜2Kšœœ,˜5Kšœ1˜1šœ˜KšœM˜MKšœ\˜\Kšœ%˜,—Kšœ˜Kšœ˜—K˜šžœœ ˜7šžœœ œœ ˜Fšœ$œ˜3Kšœœœ ˜Kšœœ˜—K˜—Kšœ=˜=Kšœ8˜8šœœœ˜Jšœœ˜Jšœœœ˜$Jšœ œ+œœ˜TJ˜—Jšœ2˜2Jšœ0˜0Jšœ/˜/Jšœ&œ˜7Jšœ$œ˜EJšœ1˜1Jšœc˜cKšœ(˜(J˜—J˜šžœœ ˜4Kšœ=˜=Kšœ8˜8šœœœ˜Jšœ*œœ˜N—Jšœ2˜2Jšœ0˜0Jšœ/˜/šœœ5œ˜BJšœ&œ˜7—Jšœ1˜1Jšœc˜cJšœA˜AJšœB˜BJšœ@˜@Jšœ@˜@JšœA˜AKšœ$˜$J˜—K˜šžœœ˜K˜šžœœœF˜_Kšœ6˜6Kšœ˜—K˜š œ œœœœ˜$KšœR˜RKšœN˜N—K˜Kšœ;œ˜YKšœS˜SKšœS˜SKšœQ˜QKšœO˜OKšœQ˜QKšœO˜OKšœR˜RKšœW˜WKšœW˜WKšœY˜YKšœY˜YK˜Kšœ-˜-Kšœ-˜-Kšœ&˜&Kšœ&˜&Kšœ1˜1Kšœ1˜1Kšœ2˜2Kšœ2˜2K˜Kšœ7˜7Kšœ7˜7Kšœ8˜8Kšœ8˜8K˜Kšœ8˜8Kšœ9˜9Kšœ8˜8Kšœ9˜9Kšœ7˜7Kšœ9˜9Kšœ9˜9Kšœ:˜:Kšœ:˜:K˜Kšœ6˜6K˜Kšœ)˜)Kšœ/˜/K˜Kšœ^˜^K™Kšœ5˜5Kšœ˜—K˜š ž œœœœœ ˜4Kšœœ˜Kšœ˜—K˜K˜Kšœ˜K˜—…— ®(–