DIRECTORY CD, CDColors, CDEvents, CDIO, CDLayers, CDOps, CDPanel, CDSequencer, CDTipEtc, CDViewer, ColorMaps, Commander USING [CommandProc, Register], FileNames, IO, NMos, Rope, TerminalIO, TokenIO; NMosImpl: CEDAR PROGRAM IMPORTS CD, CDColors, CDEvents, CDIO, CDLayers, CDOps, CDPanel, CDSequencer, CDTipEtc, CDViewer, ColorMaps, Commander, FileNames, IO, TerminalIO, TokenIO EXPORTS NMos = BEGIN nmos: PUBLIC CD.Technology; pol: PUBLIC CD.Layer; dif: PUBLIC CD.Layer; met: PUBLIC CD.Layer; met2: PUBLIC CD.Layer; imp: PUBLIC CD.Layer; imp0: PUBLIC CD.Layer; impWeak: PUBLIC CD.Layer; ovg: PUBLIC CD.Layer; bur: PUBLIC CD.Layer; cut: PUBLIC CD.Layer; cut2: PUBLIC CD.Layer; RegisterObjectClass: PUBLIC PROC [a: ATOM] RETURNS [REF CD.ObjectClass] = BEGIN RETURN [ CD.RegisterObjectClass[a, nmos] ]; END; Load: Commander.CommandProc = BEGIN cmd.out.PutRope["nmos loaded\n"]; END; NewNWorld: Commander.CommandProc = BEGIN design: CD.Design _ CDOps.CreateDesign[nmos]; [] _ CDViewer.CreateViewer[design]; END; SetLayerDif: PROC [comm: CDSequencer.Command] = BEGIN TerminalIO.WriteRope["diffusion for default\n"]; CDLayers.SetCurrentLayer[comm.design, dif] END; SetLayerPol: PROC [comm: CDSequencer.Command] = BEGIN TerminalIO.WriteRope["poly for default\n"]; CDLayers.SetCurrentLayer[comm.design, pol] END; SetLayerMet: PROC [comm: CDSequencer.Command] = BEGIN TerminalIO.WriteRope["metal for default\n"]; CDLayers.SetCurrentLayer[comm.design, met] END; SetLayerMet2: PROC [comm: CDSequencer.Command] = BEGIN TerminalIO.WriteRope["metal-2 for default\n"]; CDLayers.SetCurrentLayer[comm.design, met2] END; WriteTechnologyKey: CDEvents.EventProc = BEGIN TokenIO.WriteAtom[$Version]; TokenIO.WriteInt[0]; END; ReadTechnologyKey: CDEvents.EventProc = BEGIN dont_TRUE; IF TokenIO.ReadAtom[]=$Version THEN IF TokenIO.ReadInt[]=0 THEN dont_FALSE; IF dont THEN TerminalIO.WriteRope["NMos version miss-match\n"]; END; InitBricks: PROC [] = BEGIN Init8Patterns: PROC [] = BEGIN green1: CARDINAL = 1; yellow: CARDINAL = 2; blue: CARDINAL = 4; pinktr: CARDINAL = 8; red: CARDINAL = 16; black: CARDINAL = 127; Checker8: PROC[col1, col2: CARDINAL] RETURNS[REF CDColors.Brick] = BEGIN RETURN[NEW[CDColors.Brick _ [col1*256+col2, col2*256+col1, col1*256+col2, col2*256+col1]]] END; DefineDimmer8: PROC[lev: CD.Layer, color: CARDINAL] = BEGIN CDColors.DefineColor[lev, Checker8[color, 0], bit8, pushedOut]; END; Full8: PROC[color: CARDINAL] RETURNS [b: REF CDColors.Brick] = BEGIN RETURN[Checker8[color, color]] END; CDColors.DefineColor[dif, Full8[green1], bit8]; CDColors.DefineColor[met, Full8[blue], bit8]; CDColors.DefineColor[met2, Full8[pinktr], bit8]; CDColors.DefineColor[pol, Full8[red], bit8]; CDColors.DefineColor[cut, Full8[black], bit8]; CDColors.DefineColor[imp, Full8[yellow], bit8]; CDColors.DefineColor[imp0, Checker8[yellow, 0], bit8]; CDColors.DefineColor[impWeak, Checker8[yellow, 0], bit8]; CDColors.DefineColor[cut2, Checker8[black, blue], bit8]; CDColors.DefineColor[bur, Checker8[black, 0], bit8]; CDColors.DefineColor[ovg, Checker8[blue, pinktr], bit8]; CDColors.DefineColor[CD.backGround, NEW[CDColors.Brick _ [8, 0, 256*8, 0]], bit8]; CDColors.DefineColor[CD.highLightError, NEW[CDColors.Brick _ [255, 0, 0, 0]], bit8]; CDColors.DefineColor[CD.highLightShade, NEW[CDColors.Brick_[0, 255,0 , 255]], bit8]; DefineDimmer8[dif, green1]; DefineDimmer8[met, blue]; DefineDimmer8[met2, pinktr]; DefineDimmer8[pol, red]; DefineDimmer8[imp, yellow]; DefineDimmer8[cut, black]; DefineDimmer8[cut2, black]; END; s1: CARDINAL = 1; s2: CARDINAL = 16; s3: CARDINAL = 16*16; s4: CARDINAL = 16*16*16; ss: CARDINAL = s1+s2+s3+s4; sf: CARDINAL = s1+s3; green: CARDINAL = 1; blue: CARDINAL = 2; red: CARDINAL = 4; yellow: CARDINAL = 14; CDColors.DefineColor[cut, NEW[CDColors.Brick_[7*ss, 11*ss, 7*ss, 11*ss]], bit4]; CDColors.DefineColor[cut, NEW[CDColors.Brick_[7*ss, 11*ss, 7*ss, 11*ss]], bw]; CDColors.DefineColor[dif, NEW[CDColors.Brick_[green*ss, green*ss, green*ss, green*ss]], bit4]; CDColors.DefineColor[dif, NEW[CDColors.Brick_[4*ss, ss, 4*ss, ss]], bw]; CDColors.DefineColor[pol, NEW[CDColors.Brick_[8*ss, 4*ss, 2*ss, 1*ss]], bw]; CDColors.DefineColor[pol, NEW[CDColors.Brick_[red*ss, red*ss, red*ss, red*ss]], bit4]; CDColors.DefineColor[met, NEW[CDColors.Brick_[8*ss, 2*ss, 0, 0]], bw]; CDColors.DefineColor[met, NEW[CDColors.Brick_[blue*ss, blue*ss, blue*ss, blue*ss]], bit4]; CDColors.DefineColor[imp, NEW[CDColors.Brick_[yellow*ss, yellow*ss, yellow*ss, yellow*ss]], bit4]; CDColors.DefineColor[imp, NEW[CDColors.Brick_[2*ss, 0, 2*ss, 0]], bw]; CDColors.DefineColor[imp0, NEW[CDColors.Brick_[14, 14, 0, 1]], bit4]; CDColors.DefineColor[imp0, NEW[CDColors.Brick_[2*ss, 0, 2*ss, 1]], bw]; CDColors.DefineColor[impWeak, NEW[CDColors.Brick_[14, 14, 0, 2]], bit4]; CDColors.DefineColor[impWeak, NEW[CDColors.Brick_[2*ss, 0, 2*ss, 2]], bw]; CDColors.DefineColor[met2, NEW[CDColors.Brick_[2*(s1+s2+s3), 2*ss, 2*(s1+s2+s3)+15*s4, 2*ss]], bit4]; CDColors.DefineColor[met2, NEW[CDColors.Brick_[8*ss, 8*ss, 2*ss, 2*ss]], bw]; CDColors.DefineColor[bur, NEW[CDColors.Brick_[11*ss, 11*ss, 11*ss, 11*ss]], bit4]; CDColors.DefineColor[bur, NEW[CDColors.Brick_[4*ss, 14*ss, 4*ss, 0*ss]], bw]; CDColors.DefineColor[ovg, NEW[CDColors.Brick_[4*ss, 14*ss, 4*ss, 0*ss]], bw]; CDColors.DefineColor[ovg, NEW[CDColors.Brick_[8*ss, 8*ss, 8*ss, 8*ss]], bit4]; CDColors.DefineColor[cut2, NEW[CDColors.Brick_[3*ss, 14*ss, 3*ss, 14*ss]], bw]; CDColors.DefineColor[cut2, NEW[CDColors.Brick_[3*ss, 14*ss, 3*ss, 14*ss]], bit4]; Init8Patterns[] END; Init: PROC [] = BEGIN nmos _ CD.RegisterTechnology[$nmos, "nmos", 2]; IF nmos=NIL THEN ERROR; cut _ CD.NewLayer[nmos, $cut]; pol _ CD.NewLayer[nmos, $pol]; dif _ CD.NewLayer[nmos, $dif]; met _ CD.NewLayer[nmos, $met]; imp _ CD.NewLayer[nmos, $imp]; imp0 _ CD.NewLayer[nmos, $imp0]; impWeak _ CD.NewLayer[nmos, $impWeak]; ovg _ CD.NewLayer[nmos, $ovg]; bur _ CD.NewLayer[nmos, $bur]; met2 _ CD.NewLayer[nmos, $met2]; cut2 _ CD.NewLayer[nmos, $cut2]; CDTipEtc.SetTipTable[nmos, "Standard"]; ColorMaps.RegisterMenu["NMos", CDIO.MakeName["NMos", "ColorMap", FileNames.CurrentWorkingDirectory[]]]; CDPanel.DefineLayerEntry[nmos, dif, "dif", 0, 2*NMos.lambda]; CDPanel.DefineLayerEntry[nmos, pol, "pol", 0, 2*NMos.lambda]; CDPanel.DefineLayerEntry[nmos, met, "met", 0, 3*NMos.lambda]; CDPanel.DefineLayerEntry[nmos, met2, "met2", 0, 4*NMos.lambda]; CDPanel.DefineLayerEntry[nmos, cut, "cut", 0, 0]; CDPanel.DefineLayerEntry[nmos, cut2, "cut2", 0, 0]; CDPanel.DefineLayerEntry[nmos, ovg, "ovg", 0, 0]; CDPanel.DefineLayerEntry[nmos, imp, "imp", 0, 0]; CDPanel.DefineIntEntry[cdValueKey: $CDxSelectNewMode, tech: nmos, text: "select new:", min: 0, max: 1, default: 1]; CDPanel.DefineNewLine[nmos]; CDPanel.DefineIntEntry[cdValueKey: $CDxStepValue, tech: nmos, text: "step moves size:", min: 1, default: 1]; CDPanel.DefineNewLine[nmos]; CDEvents.RegisterEventProc[$WriteTechnologyPrivate, WriteTechnologyKey, nmos]; CDEvents.RegisterEventProc[$ReadTechnologyPrivate, ReadTechnologyKey, nmos]; CDSequencer.ImplementCommand[$SetLayerNDif, SetLayerDif, nmos]; CDSequencer.ImplementCommand[$SetLayerPol, SetLayerPol, nmos]; CDSequencer.ImplementCommand[$SetLayerMet, SetLayerMet, nmos]; CDSequencer.ImplementCommand[$SetLayerMet2, SetLayerMet2, nmos]; CDTipEtc.SetIcon[nmos, "Chipndale.icons", 5]; CDTipEtc.SetPanelIcon[nmos, "Chipndale.icons", 4]; InitBricks[]; Commander.Register[ key: "CDNmos", proc: Load, doc: "loads nmos ChipNDale" ]; Commander.Register[ key: "CDNewNmos", proc: NewNWorld, doc: "Creates new nmos design" ]; TerminalIO.WriteRope["nmos impl\n"]; END; Init[]; END. ΪNMosImpl.mesa Copyright c 1983, 1985 by Xerox Corporation. All rights reserved. by Ch. Jacobi, August 11, 1983 3:56 pm last edited Christian Jacobi, December 24, 1985 3:54:37 pm PST --all parameter are discarded -- no change for bur and ovgc for this background -- no change for bur, nwelCont, pwelCont, and ovgc for this background --4bit colors-- CDPanel.DefineLayerEntry[nmos, imp0, "imp0", 0, 0]; CDPanel.DefineLayerEntry[nmos, impWeak, "impWeak", 0, 0]; Κœ˜šœ ™ Jšœ Οmœ7™BJšœ(™(Jšœ@™@J˜—šΟk ˜ Jšžœ˜J˜ J˜ Icodešœ˜Jšœ ˜ Jšœ˜J˜J˜ J˜ J˜ Kšœ ˜ Jšœ žœ˜(Kšœ ˜ J˜J˜J˜J˜ Jšœ˜—J˜šΠblœžœž˜Jšžœžœ˜šJšžœ˜—Jšž˜˜Jšœžœžœ ˜J˜Jšœžœžœ˜Jšœžœžœ˜Jšœžœžœ˜Jšœžœžœ˜J˜Jšœžœžœ˜Jšœžœžœ˜Jšœ žœžœ˜J˜Jšœžœžœ˜Jšœžœžœ˜Jšœžœžœ˜Jšœžœžœ˜J˜J˜—š Οnœžœžœžœžœžœ˜IJšž˜Jšžœžœ ˜+Jšžœ˜J˜—š œ˜Jšž˜Jšœ!˜!Jšžœ˜J˜—š  œ˜#Jšž˜Jšœžœ#˜-J˜#Jšžœ˜J˜—š  œžœ˜/Jšž˜J˜0Jšœ*˜*Jšžœ˜J˜—š  œžœ˜/Jšž˜J˜+Jšœ*˜*Jšžœ˜J˜—š  œžœ˜/Jšž˜J˜,Jšœ*˜*Jšžœ˜J˜—š  œžœ˜0Jšž˜J˜.Jšœ+˜+Jšžœ˜J˜—šΟbœ˜(Jšž˜Jšœ˜Jšœ˜Jšžœ˜—J˜š‘œ˜'Jšž˜Jšœžœ˜ šžœžœ˜$Jšžœžœžœ˜(—Jšžœžœ3˜?Jšžœ˜—J˜J˜š  œžœ˜Jšž˜J˜š  œžœ˜Jšœ™Jšž˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜J˜š  œžœ žœžœžœ˜CJšžœ˜JšžœžœP˜ZJšžœ˜—J˜š  œžœžœžœ˜6Jšžœ˜Jšœ?˜?Jšžœ˜—J˜š  œžœžœžœžœ˜?Jšž˜Jšžœ˜Jšžœ˜—J˜Jšœ/˜/Jšœ-˜-Jšœ1˜1Jšœ,˜,Jšœ.˜.Jšœ/˜/Jšœ6˜6Jšœ9˜9J˜Jšœ8˜8Jšœ4˜4Jšœ8˜8J˜Jšœžœ žœ+˜RJšœžœžœ)˜TJšœžœžœ)˜TJ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ˜Jšœ1™1JšœF™FJšžœ˜—J˜Jšœžœ˜Jšœžœ˜Jšœžœ ˜Jšœžœ ˜Jšœžœ˜Jšœžœ ˜J˜Jšœ™Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜J˜Jšœžœ3˜PJšœžœ1˜NJ˜JšœžœA˜^Jšœžœ+˜HJ˜Jšœžœ/˜LJšœžœ9˜VJ˜Jšœžœ)˜FJšœžœ=˜ZJ˜JšœžœE˜bJšœžœ)˜FJ˜Jšœžœ'˜EJšœžœ)˜GJ˜Jšœžœ'˜HJšœžœ)˜JJ˜JšœžœG˜eJšœžœ/˜MJ˜Jšœžœ5˜RJšœžœ0˜MJ˜J˜Jšœžœ0˜MJšœžœ1˜NJ˜Jšœžœ1˜OJšœžœ3˜QJ˜J˜Jšžœ˜—J˜J˜š œžœ˜Jšž˜Jšœžœ&˜/Jšžœžœžœžœ˜J˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜Jšœžœ˜ Jšœ žœ˜&Jšœžœ˜Jšœžœ˜Jšœžœ˜ Jšœžœ˜ J˜Jšœ'˜'J˜KšœžœD˜gJ˜Jšœ0ž œ˜=Jšœ0ž œ˜=Jšœ0ž œ˜=Jšœ2ž œ˜?J˜1J˜3J˜1J™J˜1J™3Jšœ9™9J™šœA˜AJ˜1—J˜Jšœn˜nJ˜J˜JšœN˜NJšœL˜LJ˜J˜?J˜>J˜>J˜@J˜Jšœ-˜-Jšœ2˜2Jšœ ˜ J˜šœ˜J˜J˜ J˜Jšœ˜—˜J˜J˜J˜J˜—Jšœ$˜$Jšžœ˜J˜—J˜Jšžœ˜—…—ό(r