DIRECTORY CD, CDCells, CDPinObjects, MC, MCMInterface, PW, PWPins, Rope; MCMInterfaceImpl: CEDAR PROGRAM IMPORTS CD, CDCells, CDPinObjects, MC, PW, PWPins, Rope EXPORTS MCMInterface = BEGIN OPEN PW; AllButVddAndGnd: MC.SelectPinProc -- [pin: CD.ApplicationPtr] RETURNS [sel: BOOL] -- = { name: Rope.ROPE _ CDPinObjects.GetName[pin]; sel _ NOT (Rope.Match["Vdd", name, FALSE] OR Rope.Match["Gnd", name, FALSE]) }; InputSection: PROC [design: CD.Design] RETURNS [result: ObPtr] = { phBSlice: PW.ObPtr _ PW.Get[design, "phBLatchandDriveSlice"]; drCtlSlice: PW.ObPtr _ PW.Get[design, "DrCtlSlice"]; fillerSlice: PW.ObPtr _ PW.Get[design, "FillerSlice"]; slice: PW.ObPtr; sliceIR: CD.Rect _ CD.InterestRect[phBSlice]; inputName, outputName, drName: Rope.ROPE; index, inputBase, outputBase: INT; NewName: PWPins.RenameProc = { SELECT TRUE FROM Rope.Equal[oldRope, "in"] => newRope_ Rope.Cat[MC.IndexedName[inputName, index-inputBase], ".dataIn"]; Rope.Equal[oldRope, "out"] => newRope _ MC.IndexedName[outputName, index-outputBase]; Rope.Equal[oldRope, "Dr"] => newRope _ drName; ENDCASE => newRope _ oldRope; }; result _ PW.CreateEmptyCell[]; index _ 0; outputName _ "PBus"; drName _ "PSelMBusHi25xAB"; inputBase _ outputBase _ index; inputName _ "MCmd"; THROUGH [0..3] DO slice _ PWPins.RenamePins[design, phBSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; slice _ PWPins.RenamePins[design, drCtlSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; inputBase _ outputBase _ index; inputName _ "MExt"; THROUGH [0..3] DO slice _ PWPins.RenamePins[design, fillerSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; inputBase _ index; outputBase _ index-4; inputName _ "MData"; THROUGH [0..20] DO slice _ PWPins.RenamePins[design, phBSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; slice _ PWPins.RenamePins[design, drCtlSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; outputName _ "PBus"; drName _ "PSelMBusLo25xAB"; inputBase _ index-3; outputBase _ index; THROUGH [0..24] DO slice _ PWPins.RenamePins[design, phBSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; slice _ PWPins.RenamePins[design, drCtlSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; CDCells.SetInterestRect[result, [0, 0, index*(sliceIR.x2-sliceIR.x1), sliceIR.y2-sliceIR.y1]]; PW.IncludeInDirectory[design, result, "MInterfaceInputSection"]; }; OutputSection: PROC [design: CD.Design] RETURNS [result: ObPtr] = { phASlice: PW.ObPtr _ PW.FlipY[design, PW.Get[design, "phALatchandDriveSlice"]]; drCtlSlice: PW.ObPtr _ PW.FlipY[design, PW.Get[design, "DrCtlSlice"]]; fillerSlice: PW.ObPtr _ PW.FlipY[design, PW.Get[design, "FillerSlice"]]; slice: PW.ObPtr; sliceIR: CD.Rect _ CD.InterestRect[phASlice]; inputName, outputName: Rope.ROPE; index, inputBase, outputBase: INT; NewName: PWPins.RenameProc = { SELECT TRUE FROM Rope.Equal[oldRope, "in"] => newRope _ MC.IndexedName[inputName, index-inputBase]; Rope.Equal[oldRope, "out"] => newRope_ Rope.Cat[MC.IndexedName[outputName, index-outputBase], ".dataOut"]; ENDCASE => newRope _ oldRope; }; result _ PW.CreateEmptyCell[]; index _ 0; inputName _ "PBus"; -- for debugging version outputName _ "MCmd"; inputBase _ outputBase _ index; THROUGH [0..3] DO slice _ PWPins.RenamePins[design, phASlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; slice _ PWPins.RenamePins[design, drCtlSlice, NewName]; outputName _ "MExt"; inputBase _ outputBase _ index; THROUGH [0..3] DO slice _ PWPins.RenamePins[design, phASlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; outputName _ "MData"; inputBase _ index-4; outputBase _ index; THROUGH [0..20] DO slice _ PWPins.RenamePins[design, phASlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; CDCells.SetInterestRect[result, [0, 0, index*(sliceIR.x2-sliceIR.x1), sliceIR.y2-sliceIR.y1]]; PW.IncludeInDirectory[design, result, "MInterfaceOutputSection"]; }; MBusInterface: PUBLIC PROC [design: CD.Design, ySize: INT] RETURNS [result: ObPtr] = { inSect: PW.ObPtr _ InputSection[design]; ioGlue: PW.ObPtr _ FlipX[design, PW.Get[design, "FeedBackLatchToOutputLatchGlue"]]; outSect: PW.ObPtr _ OutputSection[design]; inSectSize: CD.Position _ PW.Size[inSect]; ioGlueSize: CD.Position _ PW.Size[ioGlue]; outSectSize: CD.Position _ PW.Size[outSect]; result _ PW.CreateEmptyCell[]; CDCells.SetInterestRect[result, [0, 0, inSectSize.x+ioGlueSize.x+outSectSize.x, ySize]]; inSect _ AbutY[design, inSect, MC.TopFillerCell[design, inSect, ySize-inSectSize.y, AllButVddAndGnd]]; outSect _ AbutY[design, outSect, MC.TopFillerCell[design, outSect, ySize-outSectSize.y, AllButVddAndGnd]]; PW.IncludeInCell[design, result, inSect, [0, 0]]; PW.IncludeInCell[design, result, ioGlue, [inSectSize.x, 0]]; PW.IncludeInCell[design, result, outSect, [inSectSize.x+ioGlueSize.x, 0]]; PW.IncludeInDirectory[design, result, "MInterface"]; }; AlpsToMBusInterfaceGlue: PUBLIC PROC [design: CD.Design, mcCtl: PW.ObPtr] RETURNS[result: PW.ObPtr] = { kludgeSlicephB: PW.ObPtr _ PW.Get[design, "MInterfaceKludgeSlicephB"]; kludgeSliceCycleABZero: PW.ObPtr _ PW.Get[design, "MInterfaceCycleABZero"]; biasSlice: PW.ObPtr _ PW.Get[design, "BiasGenerator"]; fillerSlice: PW.ObPtr _ PW.Get[design, "FillerSlice"]; drCtlSlice: PW.ObPtr _ PW.Get[design, "DrCtlSlice"]; bottom, topFiller, topAlpsConnection: PW.ObPtr; bottomSize: CD.Position; mcCtlSize: CD.Position _ PW.Size[mcCtl]; name, drName: Rope.ROPE; index: INT; NewName: PWPins.RenameProc = { SELECT TRUE FROM Rope.Equal[oldRope, "in"] => newRope _ Rope.Cat[name, ".dataIn"]; Rope.Equal[oldRope, "outxBA"] => newRope _ Rope.Cat[name, "xBA"]; Rope.Equal[oldRope, "NotoutxBA"] => newRope _ Rope.Cat["Not", name, "xBA"]; Rope.Equal[oldRope, "Dr"] => newRope _ drName; ENDCASE => newRope _ oldRope; }; IndexedNewName: PWPins.RenameProc = { SELECT TRUE FROM Rope.Equal[oldRope, "in"] => newRope _ Rope.Cat[MC.IndexedName[name, index], ".dataIn"]; Rope.Equal[oldRope, "outxBA"] => newRope _ MC.IndexedName[Rope.Cat[name, "xBA"], index]; Rope.Equal[oldRope, "NotoutxBA"] => newRope _ MC.IndexedName[Rope.Cat["Not", name, "xBA"], index]; ENDCASE => newRope _ oldRope; }; name _ ""; drName _ "NotDebug"; bottom _ PWPins.RenamePins[design, drCtlSlice, NewName]; bottom _ AbutX[design, fillerSlice, bottom, biasSlice]; name _ "nMAdCycle"; bottom _ AbutX[design, bottom, PWPins.RenamePins[design, kludgeSliceCycleABZero, NewName]]; name _ "MCmd"; index _ 0; THROUGH [0..3] DO bottom _ AbutX[design, bottom, PWPins.RenamePins[design, kludgeSliceCycleABZero, IndexedNewName]]; index _ index+1; ENDLOOP; name _ "MCSelected"; bottom _ AbutX[design, bottom, PWPins.RenamePins[design, kludgeSliceCycleABZero, NewName]]; name _ "MData"; index _ 2; THROUGH [2..5] DO bottom _ AbutX[design, bottom, PWPins.RenamePins[design, kludgeSliceCycleABZero, IndexedNewName]]; index _ index+1; ENDLOOP; name _ "Reset"; bottom _ AbutX[design, bottom, PWPins.RenamePins[design, kludgeSlicephB, NewName]]; bottomSize _ PW.Size[bottom]; result _ PW.CreateEmptyCell[]; CDCells.SetInterestRect[result, [0, 0, bottomSize.x, mcCtlSize.y]]; topFiller _ MC.TopFillerCell[design, bottom, mcCtlSize.y-bottomSize.y, AllButVddAndGnd]; topAlpsConnection _ MC.ConnectRightToBus[design, mcCtl, topFiller]; PW.IncludeInCell[design, result, bottom, [0, 0]]; PW.IncludeInCell[design, result, topFiller, [0, bottomSize.y]]; PW.IncludeInCell[design, result, topAlpsConnection, [0, 0]]; PW.IncludeInDirectory[design, result, "MInterface"]; }; END. .MCMInterfaceImpl.mesa Copyright c 1984 by Xerox Corporation. All rights reserved. Written by: Sindhu, July 5, 1985 10:48:56 pm PDT Last Edited by: Sindhu, July 9, 1985 11:43:15 pm PDT Last Edited by: Serlet, July 6, 1985 4:22:08 pm PDT First put MBusHi25 slices MCmd slices MExt slices MData slices Now put MBusLo25 slices And finally the MBusLo10 slices  omit for debugging version outputName _ "QBus"; drName _ "QSelMBusLo10xAB"; inputBase _ index-18; outputBase _ index; THROUGH [0..9] DO slice _ PWPins.RenamePins[design, phBSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; ENDLOOP; slice _ PWPins.RenamePins[design, drCtlSlice, NewName]; PW.IncludeInCell[design, result, slice, [index*(sliceIR.x2-sliceIR.x1), 0]]; index _ index+1; MCmd slices MExt slices MData slices of course the bottom 3 bits will not be driven Fill the input and output sections up so their y dimention equals ySize Now put them together First make the bottom part Drive ctl slice for alps Now put result together Κ(˜™Icodešœ Οmœ1™—J˜J˜šΟbœžœž˜Jšžœžœžœžœ˜7Jšžœ˜Jšžœžœžœ˜J˜•StartOfExpansion4 -- [pin: CD.ApplicationPtr] RETURNS [sel: BOOL] -- šŸœΠck4œ˜YJšœ žœ˜,Jš œžœžœžœžœ˜LJ˜—J˜J˜šΟn œžœ žœ žœ˜BJšœ žœ žœ&˜=Jšœ žœ žœ˜4Jšœ žœ žœ˜6Jšœžœ˜Jšœ žœžœ˜-Jšœ$žœ˜)Jšœžœ˜"J˜šŸœ˜šžœžœž˜Jšœ/žœ5˜fJšœ(žœ+˜UJšœ.˜.Jšžœ˜—J˜—J˜Jšœ žœ˜J˜ J™J™Jšœ0˜0J™J™ J˜Jšœ˜šžœž˜Jšœ5˜5JšžœJ˜LJ˜Jšžœ˜—Jšœ7˜7JšžœJ˜LJ˜J˜J™ J˜Jšœ˜šžœž˜Jšœ8˜8JšžœJ˜LJ˜Jšžœ˜—J™J™ J˜(Jšœ˜šžœ ž˜Jšœ5˜5JšžœJ˜LJ˜Jšžœ˜—Jšœ7˜7JšžœJ˜LJ˜J˜J™Jšœ0˜0J˜(šžœ ž˜Jšœ5˜5JšžœJ˜LJ˜Jšžœ˜—Jšœ7˜7JšžœJ˜LJ˜J˜J™˜@J˜J˜—š‘ œžœ žœ žœ˜CJšœ žœ žœžœ'˜OJšœ žœ žœžœ˜FJšœ žœ žœžœ˜HJšœžœ˜Jšœ žœžœ˜-Jšœžœ˜!Jšœžœ˜"J˜šŸœ˜šžœžœž˜Jšœ'žœ)˜RJšœ0žœ8˜jJšžœ˜—J˜—J˜Jšœ žœ˜J˜ JšœΟc˜,J™J™ Jšœ˜J˜šžœž˜Jšœ5˜5JšžœJ˜LJ˜Jšžœ˜—Jšœ7˜7J˜J™ Jšœ˜J˜šžœž˜Jšœ5˜5JšžœJ˜LJ˜Jšžœ˜—J™J™