DIRECTORY CD, CDColors, CDLayers, CDEnvironment, CDEvents, CDPanel, CDPrivate, CDProperties, CDRects, CMosB, Imager, ImagerColor, Rope, TerminalIO, TokenIO; CMosBImpl: CEDAR PROGRAM IMPORTS CD, CDColors, CDEnvironment, CDEvents, CDLayers, CDPanel, CDPrivate, CDProperties, CDRects, CMosB, Imager, ImagerColor, TerminalIO, TokenIO EXPORTS CMosB SHARES CDLayers, CDRects = BEGIN cmosB: PUBLIC CD.Technology _ CD.RegisterTechnology[$cmosB, "CMosB", lambda]; lambda: CD.Number = CMosB.lambda; wellSurround: CD.Number = CMosB.wellSurround; wellCntSurround: CD.Number = CMosB.wellCntSurround; ndif: PUBLIC CD.Layer; pdif: PUBLIC CD.Layer; pwellCont: PUBLIC CD.Layer; nwellCont: PUBLIC CD.Layer; wndif: PUBLIC CD.Layer; wpdif: PUBLIC CD.Layer; wpwellCont: PUBLIC CD.Layer; wnwellCont: PUBLIC CD.Layer; pwell: PUBLIC CD.Layer; nwell: PUBLIC CD.Layer; pol: PUBLIC CD.Layer; met: PUBLIC CD.Layer; met2: PUBLIC CD.Layer; ovg: PUBLIC CD.Layer; cut: PUBLIC CD.Layer; cut2: PUBLIC CD.Layer; bur: PUBLIC CD.Layer; imp: PUBLIC CD.Layer; wpdifClass: CD.ObjectClass = CD.RegisterObjectClass[$C2PDifRect, [ internalRead: CDRects.wellRectClass.internalRead, technology: CMosB.cmosB ]]; wndifClass: CD.ObjectClass = CD.RegisterObjectClass[$C2NDifRect, [ internalRead: CDRects.wellRectClass.internalRead, technology: CMosB.cmosB ]]; WriteTechnologyKey: CDEvents.EventProc = { h: TokenIO.Handle _ NARROW[x]; TokenIO.WriteAtom[h, $CMosB]; TokenIO.WriteInt[h, 1]; }; ReadTechnologyKey: CDEvents.EventProc = { h: TokenIO.Handle _ NARROW[x]; dont _ TRUE; IF TokenIO.ReadAtom[h]=$CMosB THEN { version: INT = TokenIO.ReadInt[h]; IF version=1 THEN dont _ FALSE ELSE IF version=0 THEN { TerminalIO.PutRope["WARNING: Old version: p-diffusion may be displaced\n"]; dont _ FALSE }; }; IF dont THEN TerminalIO.PutRope["CMosB version miss-match\n"]; }; InitKernel: PROC [] = { ndif _ CD.NewLayer[cmosB, $ndif]; pdif _ CD.NewLayer[cmosB, $pdif]; wndif _ CD.NewLayer[cmosB, $wndif]; wpdif _ CD.NewLayer[cmosB, $wpdif]; pwell _ CD.NewLayer[cmosB, $pwel]; nwell _ CD.NewLayer[cmosB, $nwel]; pwellCont _ CD.NewLayer[cmosB, $pwelCont]; nwellCont _ CD.NewLayer[cmosB, $nwelCont]; wpwellCont _ CD.NewLayer[cmosB, $wPWellCont]; wnwellCont _ CD.NewLayer[cmosB, $wNWellCont]; pol _ CD.NewLayer[cmosB, $pol]; met _ CD.NewLayer[cmosB, $met]; met2 _ CD.NewLayer[cmosB, $met2]; ovg _ CD.NewLayer[cmosB, $ovg]; cut _ CD.NewLayer[cmosB, $cut]; cut2 _ CD.NewLayer[cmosB, $cut2]; imp _ CD.NewLayer[cmosB, $imp]; bur _ CD.NewLayer[cmosB, $bur]; CDPrivate.ConvertLayer[cmosB, $comment, CD.commentLayer]; CDLayers.MakeSuppressIR[nwell]; CDLayers.MakeSuppressIR[pwell]; CDLayers.MakeAbstract[abstract: wpdif, paint: pdif, well: nwell, wSurr: wellSurround]; CDLayers.MakeAbstract[abstract: wndif, paint: ndif, well: pwell, wSurr: wellSurround]; CDLayers.MakeAbstract[abstract: wnwellCont, paint: nwellCont, well: nwell, wSurr: wellCntSurround]; CDLayers.MakeAbstract[abstract: wpwellCont, paint: pwellCont, well: pwell, wSurr: wellCntSurround]; CDEvents.RegisterEventProc[$WriteTechnologyPrivate, WriteTechnologyKey, cmosB]; CDEvents.RegisterEventProc[$ReadTechnologyPrivate, ReadTechnologyKey, cmosB]; }; InitBricks: PROC [] = { bw: CDColors.DisplayType = CDColors.DisplayType[bw]; nDiffColor: CARDINAL = 1; pDiffColor: CARDINAL = 2; met1Color: CARDINAL = 4; met2Color: CARDINAL = 8; polyColor: CARDINAL = 16; nWellColor: CARDINAL = 32; pWellColor: CARDINAL = 64; black: CARDINAL = 127; Checker8: PROC [col1, col2: CARDINAL] RETURNS[REF CDColors.Brick] = { RETURN[NEW[CDColors.Brick _ [col1*256+col2, col2*256+col1, col1*256+col2, col2*256+col1]]] }; DefineDimmer8: PROC [lev: CD.Layer, color: CARDINAL] = { CDColors.DefineColor[lev, Checker8[color, 0], bit8, pushedOut]; }; CDColors.DefineColor[ndif, Checker8[nDiffColor, nDiffColor], bit8]; CDColors.DefineColor[pdif, Checker8[pDiffColor, pDiffColor], bit8]; CDColors.DefineColor[met, Checker8[met1Color, met1Color], bit8]; CDColors.DefineColor[met2, Checker8[met2Color, met2Color], bit8]; CDColors.DefineColor[pol, Checker8[polyColor, polyColor], bit8]; CDColors.DefineColor[nwell, Checker8[nWellColor, nWellColor], bit8]; CDColors.DefineColor[pwell, Checker8[pWellColor, pWellColor], bit8]; CDColors.DefineColor[cut, Checker8[black, black], bit8]; CDColors.DefineColor[cut2, Checker8[black, met1Color], bit8]; CDColors.DefineColor[nwellCont, Checker8[pDiffColor, met1Color], bit8]; CDColors.DefineColor[pwellCont, Checker8[nDiffColor, met1Color], bit8]; CDColors.DefineColor[ovg, Checker8[met1Color, met2Color], bit8]; CDColors.DefineColor[bur, Checker8[black, 0], bit8]; CDColors.DefineColor[imp, NEW[CDColors.Brick_[14, 14, 0, 0]], bit8]; DefineDimmer8[ndif, nDiffColor]; DefineDimmer8[pdif, pDiffColor]; DefineDimmer8[met, met1Color]; DefineDimmer8[met2, met2Color]; DefineDimmer8[pol, polyColor]; DefineDimmer8[nwell, nWellColor]; DefineDimmer8[cut, black]; DefineDimmer8[cut2, black]; CDColors.DefineColor[cut, NEW[CDColors.Brick_[7777H, 0BBBBH, 7777H, 0BBBBH]], bw]; CDColors.DefineColor[ndif, NEW[CDColors.Brick_[4444H, 1111H, 4444H, 1111H]], bw]; CDColors.DefineColor[pdif, NEW[CDColors.Brick_[5555H, 1111H, 4444H, 1111H]], bw]; CDColors.DefineColor[pwellCont, NEW[CDColors.Brick_[0, 1111H, 4444H, 1111H]], bw]; CDColors.DefineColor[nwellCont, NEW[CDColors.Brick_[2222H, 1111H, 4444H, 1111H]], bw]; CDColors.DefineColor[pol, NEW[CDColors.Brick_[8888H, 4444H, 2222H, 1111H]], bw]; CDColors.DefineColor[met, NEW[CDColors.Brick_[8888H, 2222H, 0, 0]], bw]; CDColors.DefineColor[met2, NEW[CDColors.Brick_[8888H, 8888H, 2222H, 2222H]], bw]; CDColors.DefineColor[nwell, NEW[CDColors.Brick_[4444H, 0, 0, 0]], bw]; CDColors.DefineColor[pwell, NEW[CDColors.Brick_[2222H, 0, 0, 0]], bw]; CDColors.DefineColor[ovg, NEW[CDColors.Brick_[4444H, 0EEEEH, 4444H, 0]], bw]; CDColors.DefineColor[cut2, NEW[CDColors.Brick_[3333H, 0EEEEH, 3333H, 0EEEEH]], bw]; CDColors.DefineColor[bur, NEW[CDColors.Brick_[4444H, 0EEEEH, 4444H, 0]], bw]; CDColors.DefineColor[imp, NEW[CDColors.Brick_[2222H, 0, 2222H, 0]], bw]; CDColors.DefineColor[wpdif, NEW[CDColors.Brick_[3333H, 0EEEEH, 3333H, 0EEEEH]], bw]; CDColors.DefineIColor[ndif, ImagerColor.ColorFromRGB[[0, 1, 0]], bit8]; CDColors.DefineIColor[pdif, ImagerColor.ColorFromRGB[[0, 1, 0]], bit8]; CDColors.DefineIColor[nwell, ImagerColor.ColorFromRGB[[0.8, 0.8, 0.5]], bit8]; CDColors.DefineIColor[pwellCont, ImagerColor.ColorFromRGB[[0, 1, 0]], bit8]; CDColors.DefineIColor[nwellCont, ImagerColor.ColorFromRGB[[0, 1, 0]], bit8]; CDColors.DefineIColor[pol, ImagerColor.ColorFromRGB[[1, 0, 0]], bit8]; CDColors.DefineIColor[met, ImagerColor.ColorFromRGB[[0, 0, 1]], bit8]; CDColors.DefineIColor[met2, ImagerColor.ColorFromRGB[[0.7, 0.4, 0.7]], bit8]; CDColors.DefineIColor[ovg, ImagerColor.ColorFromRGB[[0.5, 0.5, 0.5]], bit8]; CDColors.DefineIColor[cut, ImagerColor.ColorFromRGB[[0, 0, 0.1]], bit8]; CDColors.DefineIColor[cut2, ImagerColor.ColorFromRGB[[0, 0.1, 0]], bit8]; CDColors.DefineIColor[bur, ImagerColor.ColorFromRGB[[0.1, 0.1, 0]], bit8]; CDColors.DefineIColor[imp, ImagerColor.ColorFromRGB[[1, 1, 0]], bit8]; CDProperties.PutLayerProp[cut, $CDxInterpressPlotColor, Imager.black]; CDProperties.PutLayerProp[cut2, $CDxInterpressPlotColor, Imager.black]; }; InitUserInterface: PROC [] = { CDPanel.Layer[ndif, "ndif", 0, 2*lambda, 1, cmosB]; CDPanel.Layer[wpdif, "w-pdif", 0, 2*lambda, 1, cmosB]; CDPanel.Layer[pol, "pol", 0, 2*lambda, 1, cmosB]; CDPanel.Layer[met, "met", 0, 3*lambda, 1, cmosB]; CDPanel.Layer[pwellCont, "pWCt", 0, 2*lambda, 1, cmosB]; CDPanel.Layer[wnwellCont, "w-nWCt", 0, 2*lambda, 1, cmosB]; CDPanel.Layer[nwell, "nwell", 0, 0, 1, cmosB]; CDPanel.Layer[met2, "met2", 0, 4*lambda, 1, cmosB]; CDPanel.Layer[CD.commentLayer, " black ", 0, lambda/2, 0, cmosB]; CDPanel.Layer[CD.FetchLayer[NIL, $red], " red ", 0, lambda/2, 0, cmosB]; CDPanel.Layer[CD.FetchLayer[NIL, $green], " green ", 0, lambda/2, 0, cmosB]; CDPanel.Layer[CD.FetchLayer[NIL, $blue], " blue ", 0, lambda/2, 0, cmosB]; CDPanel.Layer[CD.FetchLayer[NIL, $yellow], " dirty-yellow", 0, lambda/2, 0, cmosB]; CDPanel.Layer[ovg, "ovg", 0, 0, 2, cmosB]; CDPanel.Layer[cut, "cut", 0, 0, 2, cmosB]; CDPanel.Layer[cut2, "cut2", 0, 0, 2, cmosB]; CDPanel.Layer[bur, "bur", 0, 0, 2, cmosB]; CDPanel.Layer[imp, "imp", 0, 0, 2, cmosB]; CDPanel.Layer[pdif, "[pdif]", 0, 2*lambda, 2, cmosB]; CDPanel.Layer[nwellCont, "[nWCt]", 0, 2*lambda, 2, cmosB]; CDPanel.Layer[pwell, "[pwell]", 0, 0, 2, cmosB]; CDPanel.Layer[wndif, "[w-ndif]", 0, 2*lambda, 2, cmosB]; CDPanel.Layer[wpwellCont, "[w-pWCt]", 0, 2*lambda, 2, cmosB]; CDPanel.Number[number: [cdValueKey: $CDxStepValue, redisplay: TRUE], tech: cmosB, button: [text: "step move dist:"], min: 0, default: 0, lambda: lambda]; CDPanel.Number[number: [cdValueKey: $CDxSelectNewMode], tech: cmosB, button: [text: "select new mode:", xpos: 180], min: 0, max: 1, default: 1, lambda: 1]; CDPanel.Line[cmosB]; CDEnvironment.SetIcon[cmosB, "Chipndale.icons", 3]; CDEnvironment.SetPanelIcon[cmosB, "Chipndale.icons", 4]; CDEnvironment.SetTipTable[cmosB, "Standard"]; CDProperties.PutTechnologyProp[cmosB, $CDxDefaultPrintScaleNum, NEW[INT_2]]; TerminalIO.PutRope["cmos-B impl\n"]; }; InitKernel[]; InitBricks[]; InitUserInterface[]; END. *CMosBImpl.mesa Copyright c 1983, 1987 by Xerox Corporation. All rights reserved. Created by Christian Jacobi, August 11, 1983 3:56 pm Last edited by: Christian Jacobi, March 30, 1987 3:02:14 pm PST ImagerDitherContext, --layers --events --8 bit colors-- --8 bit colors -- no dimmers for nwelCont, pwelCont, and ovg --wpdif must never be drawn CDColors.DefineIColor[met, ImagerDitherContext.MakeSpecialColor[ ordinaryColor: ImagerColor.ColorFromRGB[[1, 0, 0]], specialPixel: [met1Color, or], name: "Xerox/Research/ChipNDale/CMosB/met" ], bit8]; Κ΄˜codešœ™Kšœ Οmœ7™BKšœ4™4K™?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šœžœžœžœ-˜MK˜Kšœžœ˜!Kšœžœ˜-Kšœžœ ˜3K˜Kšœžœžœ˜Kšœžœžœ˜Kšœ žœžœ˜Kšœ žœžœ˜K˜Kšœžœžœ˜Kšœžœžœ˜Kšœ žœžœ˜Kšœ žœžœ˜K˜Kšœžœžœ˜Kšœžœžœ˜K˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜K˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜Kšœžœžœ˜K˜šœ žœžœ#˜BKšœ1˜1Kšœ˜Kšœ˜—šœ žœžœ#˜BKšœ1˜1Kšœ˜Kšœ˜—K˜šΠbnœ˜*Kšœžœ˜Kšœ˜Kšœ˜šœ˜K˜——šΟbœ˜)Kšœžœ˜Kšœžœ˜ šžœžœ˜%Kšœ žœ˜"Kšžœ žœž˜šžœžœ žœ˜KšœK˜KKšœž˜ Kšœ˜—K˜—Kšžœžœ2˜>Kšœ˜K˜—šŸ œžœ˜K™K™Kšœžœ˜!Kšœžœ˜!K˜Kšœžœ˜#Kšœžœ˜#K˜Kšœžœ˜"Kšœžœ˜"Kšœ žœ˜*Kšœ žœ˜*Kšœ žœ˜-Kšœ žœ˜-Kšœžœ˜Kšœžœ˜Kšœžœ˜!Kšœžœ˜Kšœžœ˜Kšœžœ˜!Kšœžœ˜Kšœžœ˜Kšœ9˜9K˜Kšœ˜Kšœ˜K˜KšœV˜VKšœV˜VKšœc˜cKšœc˜cK˜K™KšœO˜OKšœM˜MKšœ˜K˜—K˜šŸ œžœ˜Kšœ4˜4Kšœ™Jšœ žœ˜Jšœ žœ˜Jšœ žœ˜Jšœ žœ˜Jšœ žœ˜Jšœ žœ˜Jšœ žœ˜Jšœžœ˜K˜š Ÿœžœ žœžœžœ˜EJšžœžœP˜ZJšœ˜—J˜šŸ œžœžœžœ˜8Jšœ?˜?Jšœ˜—J˜J™Jšœ™JšœC˜CJšœC˜CJšœ@˜@JšœB˜BJšœ@˜@JšœD˜DJšœD˜DJšœ8˜8Jšœ=˜=JšœG˜GJšœG˜GJšœ@˜@Jšœ4˜4Jšœžœ'˜DJ˜Jšœ ˜ Jšœ ˜ Jšœ˜Jšœ˜Jšœ˜Jšœ!˜!Jšœ˜Jšœ˜Jšœ-™-K˜Kšœžœ5˜RKšœžœ3˜QKšœžœ3˜QKšœ žœ/˜RKšœ žœ3˜VKšœžœ3˜PKšœžœ+˜HKšœžœ3˜QKšœžœ'˜FKšœžœ'˜FKšœžœ0˜MKšœžœ5˜SKšœžœ0˜MKšœžœ+˜Hšœžœ5˜TKšœ™K˜—KšœG˜GKšœG˜GKšœN˜NKšœL˜LKšœL˜LKšœF˜FK˜KšœF˜Fšœ™šœ%™%Kšœ3™3Kšœ™Kšœ*™*K™—Kšœ™—K˜KšœM˜MKšœL˜LKšœH˜HKšœI˜IKšœJ˜JKšœF˜FK˜KšœF˜FKšœG˜GKšœ˜K˜—šŸœžœ˜Kšœ3˜3Kšœ6˜6Kšœ1˜1Kšœ1˜1Kšœ8˜8Kšœ;˜;Kšœ.˜.Kšœ3˜3K˜Kšœžœ3˜CKšœžœ žœ+˜JKšœžœ žœ/˜NKšœžœ žœ-˜LKšœžœ žœ4˜SK˜Kšœ*˜*Kšœ*˜*Kšœ,˜,Kšœ*˜*Kšœ*˜*K˜Kšœ5˜5Kšœ:˜:Kšœ0˜0Kšœ8˜8Kšœ=˜=K˜Kšœ>žœW˜™Kšœ›˜›K˜K˜Kšœ3˜3Kšœ8˜8Kšœ-˜-K˜Kšœ@žœžœ˜LKšœ$˜$Kšœ˜—K˜K˜ Kšœ ˜ Kšœ˜Kšžœ˜K˜—…—$.π