DIRECTORY CD, CMosB, CDBasics, CDCells, Core, CoreOps, CoreGeometry, HashTable, IO, OnionCore, PW, PWCore, Rope, Sinix, TerminalIO; OnionCoreTest: CEDAR PROGRAM IMPORTS CD, CDBasics, CDCells, CMosB, CoreOps, CoreGeometry, HashTable, IO, OnionCore, PW, PWCore, Rope, Sinix, TerminalIO = BEGIN OPEN Core, OnionCore; OnionTest: PW.UserProc = { innerCT: CellType _ PWCore.FromLayoutWithoutPublic[PW.Get[design, "inner.mask"]]; outerCT: CellType _ PWCore.FromLayoutWithoutPublic[PW.Get[design, "outer.mask"]]; inner: CD.Object _ PWCore.Layout[innerCT]; outer: CD.Object _ PWCore.Layout[outerCT]; nets: HashTable.Table _ HashTable.Create[5, HashTable.RopeEqual, HashTable.HashRope]; innerPos: CD.Position _ [74*CMosB.lambda, 69*CMosB.lambda]; innerPinsEnumeration: BOOL; AddPinsToNets: CoreOps.EachWireProc = { EachPin: CoreGeometry.EachPinProc = { seg: Seg; IF layer#CMosB.met THEN { TerminalIO.PutF["*** %g pin %g not made of met but of %g discarded\n", IO.rope[IF innerPinsEnumeration THEN "Inner" ELSE "Outer"], IO.rope[name], IO.atom[CD.LayerKey[layer]]]; RETURN; }; IF innerPinsEnumeration THEN SELECT side FROM top, bottom => {min _ min + innerPos.x; max _ max + innerPos.x}; left, right => {min _ min + innerPos.y; max _ max + innerPos.y}; ENDCASE => ERROR; seg _ SELECT side FROM top, left => NEW [OnionCore.SegRec _ [max, min, side, side]], bottom, right => NEW [OnionCore.SegRec _ [min, max, side, side]], ENDCASE => ERROR; IF innerPinsEnumeration THEN net.innerSegs _ CONS [seg, net.innerSegs] ELSE net.outerSegs _ CONS [seg, net.outerSegs]; }; name: ROPE _ CoreOps.GetShortWireName[wire]; net: Net _ NARROW [HashTable.Fetch[nets, name].value]; IF wire.size#0 THEN RETURN; IF NOT Rope.Match[pattern: "Net*", object: name] THEN RETURN; IF net=NIL THEN net _ NEW [NetRec _ [name: name]]; IF Rope.Equal[name, "Net2"] THEN {net.width _ 8*CMosB.lambda; net.routeEveryOuterSeg _ FALSE}; IF Rope.Equal[name, "Net3"] THEN {net.routeEveryOuterSeg _ FALSE}; [] _ PWCore.InterestRect[IF innerPinsEnumeration THEN innerCT ELSE outerCT]; -- to make sure the cellType is decorated [] _ CoreGeometry.EnumerateSides[PWCore.extractMode.decoration, IF innerPinsEnumeration THEN innerCT ELSE outerCT, wire, EachPin]; [] _ HashTable.Store[nets, name, net]; }; ob _ CDCells.CreateEmptyCell[]; innerPinsEnumeration _ TRUE; [] _ CoreOps.VisitWire[innerCT.public, AddPinsToNets]; innerPinsEnumeration _ FALSE; [] _ CoreOps.VisitWire[outerCT.public, AddPinsToNets]; [] _ CDCells.IncludeOb[design: NIL, cell: ob, ob: inner, trans: [CDBasics.SubPoints[innerPos, CD.InterestBase[inner]]], mode: dontResize]; [] _ CDCells.IncludeOb[design: NIL, cell: ob, ob: outer, trans: [CDBasics.SubPoints[[0, 0], CD.InterestBase[outer]]], mode: dontResize]; IF NOT IncludeInOuter[ob, nets, innerPos, CD.InterestSize[inner], CD.InterestSize[outer]] THEN TerminalIO.PutF["*** Did not finish properly!\n"]; [] _ CDCells.ResizeCell[NIL, ob]; CoreOps.Print[Sinix.Extract[ob, PWCore.extractMode].result, TerminalIO.CreateStream[]]; }; PW.Register[OnionTest, "OnionTest"]; END. LOnionCoreTest.mesa Bertrand Serlet February 10, 1987 4:50:05 pm PST ΚΥ˜™Icode™0—J™šΟk ˜ KšœDœ œ"˜y—K˜šΟb œœœ˜Kšœœ>œ œ$˜}Kšœœ˜K˜šž œœ ˜JšœR˜RJšœR˜RJšœœ!˜*Jšœœ!˜*JšœU˜UJšœ œ/˜;Jšœœ˜šž œ˜'šžœ˜%J˜ šœœ˜JšœGœœœ œ œœœ˜°Jšœ˜J˜—šœœœ˜-JšœA˜AJšœA˜AJšœœ˜—šœœ˜Jšœœ-˜>Jšœœ-˜AJšœœ˜—Jš œœœœœ˜vJ˜—Jšœœ"˜,Jšœ œ%˜6Jšœ œœ˜Jšœœ+œœ˜=Jšœœœœ˜2Jšœœ7œ˜^Jšœœœ˜BJšœœœ œ Οc)˜vJšœ@œœ œ˜‚Jšœ&˜&J˜—Jšœœ˜Jšœœ8˜SJšœœ8˜TJšœœ<œ*˜ŠJšœœ:œ*˜ˆJš œœ$œœœ3˜‘Jšœœ˜!JšœGΟn œ˜WJšœ˜—K˜Jšœ"˜$—K˜Kšœ˜—…— ς