DIRECTORY CD, CDCells, CDIO, CDOps, DABasics, Rope, Route, RoutePrivate; RouteTest4: CEDAR PROGRAM IMPORTS CD, CDCells, CDIO, CDOps, Route = BEGIN EnumerateSwitchBoxNets: Route.EnumerateSwitchBoxNetsProc ~ { nets: LIST OF NetDef _ NARROW[switchBoxData]; UNTIL nets = NIL DO net: NetDef _ nets.first; eachNet[net.name, EnumerateSwitchBoxPins, net.trunkSize, NIL, net.netData]; nets _ nets.rest; ENDLOOP}; EnumerateSwitchBoxPins: Route.EnumerateSwitchBoxPinsProc ~ { pins: LIST OF Route.Pin _ NARROW[netData]; UNTIL pins = NIL DO pin: Route.Pin _ pins.first; eachPin[pin.side, 8*pin.min, 8*pin.max, 8*pin.depth, pin.layer]; pins _ pins.rest; ENDLOOP}; NetDef: TYPE = REF NetDefRec; NetDefRec: TYPE = RECORD [ name: Rope.ROPE, trunkSize: CD.Number _ 0, netData: LIST OF Route.Pin _ NIL]; technology: CD.Technology _ CD.FetchTechnology[$cmosB]; metal: CD.Layer _ CD.FetchLayer[technology, $met]; metal2: CD.Layer _ CD.FetchLayer[technology, $met2]; rules: Route.DesignRulesParameters _ Route.DefaultDesignRulesParameters[technology, metal, metal2, horizontal]; a1: Route.Pin _ NEW[Route.PinRec _ [40, 44, 0, metal2, bottom]]; a2: Route.Pin _ NEW[Route.PinRec _ [120, 124, 0, metal2, top]]; a3: Route.Pin _ NEW[Route.PinRec _ [200, 204, 0, metal2, top]]; a: NetDef _ NEW[NetDefRec _ ["a", 0, LIST[a1, a2, a3]]]; b1: Route.Pin _ NEW[Route.PinRec _ [120, 124, 0, metal2, bottom]]; b2: Route.Pin _ NEW[Route.PinRec _ [40, 44, 0, metal2, top]]; b: NetDef _ NEW[NetDefRec _ ["b", 0, LIST[b1, b2]]]; nets: LIST OF NetDef _ LIST[a, b]; rect: DABasics.Rect _ [8*0, 8*0, 8*300, 8*100]; object: CD.Object _ Route.SwitchBox[EnumerateSwitchBoxNets, rect, rules, "RouteTest4", NIL, nets].object; design: CD.Design _ CDOps.CreateDesign[technology]; [ ] _ CDCells.IncludeOb[design: design, ob: object]; [ ] _ CDIO.WriteDesign[design, "RouteTest4"]; END. FRouteTest4.mesa Copyright Σ 1985, 1987 by Xerox Corporation. All rights reserved. Last Edited by: Preas, July 17, 1987 6:57:53 pm PDT Christian Le Cocq December 2, 1987 12:46:33 pm PST -- PROC [switchBoxData: REF, eachNet: EachSwitchBoxNetProc]; PROC [switchBoxData, netData: REF, eachPin: EachSwitchBoxPinsPinProc]; Κi˜Icodešœ™KšœB™Bšœ0Οk™3K™2—K™š œ˜ Kšœ œ-˜>—K˜šΠln œœ˜K˜Kšœœ œ˜'Kšœ˜K˜—šΟnœ&˜