RouteTest2.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:48:15 pm PST
DIRECTORY
CD, CDCells, CDIO, CDOps, DABasics, Rope, Route, RoutePrivate;
RouteTest2: CEDAR PROGRAM
IMPORTS CD, CDCells, CDIO, CDOps, Route = BEGIN
EnumerateChannelNets: Route.EnumerateChannelNetsProc ~ {
PROC [channelData: REF, eachNet: EachChannelNetProc];
nets: LIST OF NetDef ← NARROW[channelData];
UNTIL nets = NIL DO
net: NetDef ← nets.first;
eachNet[net.name, EnumerateChannelPins, net.exitLeftOrBottom, net.exitRightOrTop, net.mayExit, net.trunkSize, NIL, net.netData];
nets ← nets.rest;
ENDLOOP};
EnumerateChannelPins: Route.EnumerateChannelPinsProc ~ {
PROC [channelData, netData: REF, eachPin: EachChannelPinProc];
pins: LIST OF Route.Pin ← NARROW[netData];
UNTIL pins = NIL DO
pin: Route.Pin ← pins.first;
bottomOrLeft: BOOL ← pin.side = bottom;
eachPin[bottomOrLeft, 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,
exitLeftOrBottom, exitRightOrTop: BOOLFALSE,
mayExit: BOOLTRUE,
trunkSize: CD.Number ← 0,
netData: LIST OF Route.Pin ← NIL];
name: Rope.ROPE ← "RouteTest2";
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", TRUE, FALSE, TRUE, 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", FALSE, FALSE, TRUE, 0, LIST[b1, b2]]];
c1: Route.Pin ← NEW[Route.PinRec ← [96, 100, 0, metal2, bottom]];
c2: Route.Pin ← NEW[Route.PinRec ← [146, 150, 0, metal2, top]];
c: NetDef ← NEW[NetDefRec ← ["c", FALSE, FALSE, TRUE, 0, LIST[c1, c2]]];
d1: Route.Pin ← NEW[Route.PinRec ← [146, 150, 0, metal2, bottom]];
d2: Route.Pin ← NEW[Route.PinRec ← [96, 100, 0, metal2, top]];
d: NetDef ← NEW[NetDefRec ← ["d", FALSE, FALSE, TRUE, 0, LIST[d1, d2]]];
e1: Route.Pin ← NEW[Route.PinRec ← [60, 64, 0, metal2, bottom]];
e2: Route.Pin ← NEW[Route.PinRec ← [110, 114, 0, metal2, top]];
e: NetDef ← NEW[NetDefRec ← ["e", FALSE, FALSE, TRUE, 0, LIST[e1, e2]]];
f1: Route.Pin ← NEW[Route.PinRec ← [60, 64, 0, metal2, top]];
f2: Route.Pin ← NEW[Route.PinRec ← [80, 90, 0, metal2, top]];
f3: Route.Pin ← NEW[Route.PinRec ← [220, 224, 0, metal2, top]];
f4: Route.Pin ← NEW[Route.PinRec ← [68, 72, 0, metal2, bottom]];
f5: Route.Pin ← NEW[Route.PinRec ← [212, 216, 0, metal2, bottom]];
f: NetDef ← NEW[NetDefRec ← ["f", FALSE, TRUE, TRUE, 0, LIST[f1, f2, f3, f4, f5]]];
g1: Route.Pin ← NEW[Route.PinRec ← [212, 216, 0, metal2, top]];
g2: Route.Pin ← NEW[Route.PinRec ← [238, 242, 0, metal2, top]];
g: NetDef ← NEW[NetDefRec ← ["g", FALSE, FALSE, TRUE, 0, LIST[g1, g2]]];
h1: Route.Pin ← NEW[Route.PinRec ← [238, 242, 0, metal2, bottom]];
h2: Route.Pin ← NEW[Route.PinRec ← [248, 260, 0, metal2, top]];
h: NetDef ← NEW[NetDefRec ← ["h", FALSE, FALSE, TRUE, 0, LIST[h1, h2]]];
nets: LIST OF NetDef ← LIST[a, b, c, d, e, f, g, h];
object: CD.Object ← Route.Channel[EnumerateChannelNets, 8*0, 8*264, rules, name, NIL, NIL, nets].object;
design: CD.Design ← CDOps.CreateDesign[technology];
[ ] ← CDCells.IncludeOb[design: design, ob: object];
[ ] ← CDIO.WriteDesign[design, name];
END.