RouteTest3.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:45:58 pm PST
DIRECTORY
CD, CDCells, CDIO, CDOps, DABasics, Rope, Route, RoutePrivate;
RouteTest3: 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 = left;
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];
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, metal2, metal, vertical];
a1: Route.Pin ← NEW[Route.PinRec ← [40, 80, 0, metal2, left]];
a2: Route.Pin ← NEW[Route.PinRec ← [120, 128, 0, metal2, right]];
a3: Route.Pin ← NEW[Route.PinRec ← [200, 208, 0, metal2, right]];
a: NetDef ← NEW[NetDefRec ← ["a", TRUE, TRUE, TRUE, 0, LIST[a1, a2, a3]]];
b1: Route.Pin ← NEW[Route.PinRec ← [120, 128, 0, metal2, left]];
b2: Route.Pin ← NEW[Route.PinRec ← [40, 80, 0, metal2, right]];
b: NetDef ← NEW[NetDefRec ← ["b", FALSE, FALSE, TRUE, 0, LIST[b1, b2]]];
nets: LIST OF NetDef ← LIST[a, b];
object: CD.Object ← Route.Channel[EnumerateChannelNets, 8*0, 8*250, rules, "RouteTest3", NIL, NIL, nets].object;
design: CD.Design ← CDOps.CreateDesign[technology];
[ ] ← CDCells.IncludeOb[design: design, ob: object];
[ ] ← CDIO.WriteDesign[design, "RouteTest3"];
END.