RouteTest6.mesa
Copyright Ó 1985, 1987, 1988 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, February 22, 1988 3:11:58 pm PST
DIRECTORY
CD, CDCells, CDIO, CDOps, DABasics, Rope, Route, RoutePrivate;
RouteTest6: CEDAR PROGRAM
IMPORTS CD, CDCells, CDIO, CDOps, Route
= BEGIN
EnumerateSwitchBoxNets: Route.EnumerateSwitchBoxNetsProc ~ {
-- PROC [switchBoxData: REF, eachNet: EachSwitchBoxNetProc];
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 ~ {
PROC [switchBoxData, netData: REF, eachPin: EachSwitchBoxPinsPinProc];
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];
name: Rope.ROPE ← "RouteTest6";
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]]];
c1: Route.Pin ← NEW[Route.PinRec ← [180, 184, 0, metal2, top]];
c2: Route.Pin ← NEW[Route.PinRec ← [40, 44, 0, metal, left]];
c: NetDef ← NEW[NetDefRec ← ["c", 0, LIST[c1, c2]]];
d1: Route.Pin ← NEW[Route.PinRec ← [160, 164, 0, metal2, bottom]];
d2: Route.Pin ← NEW[Route.PinRec ← [40, 44, 0, metal, right]];
d: NetDef ← NEW[NetDefRec ← ["d", 0, LIST[d1, d2]]];
nets: LIST OF NetDef ← LIST[a, b, c, d];
rect: DABasics.Rect ← [8*0, 8*0, 8*300, 8*100];
object: CD.Object ← Route.SwitchBox[EnumerateSwitchBoxNets, rect, rules, name, NIL, nets].object;
design: CD.Design ← CDOps.CreateDesign[technology];
[ ] ← CDCells.IncludeOb[design: design, ob: object];
[ ] ← CDIO.WriteDesign[design, name];
END.