RouteTestB.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, July 17, 1985 11:44:46 am PDT
Bryan Preas December 18, 1986 3:09:57 pm PST
DIRECTORY
CD, CDCells, CDDirectory, CDIO, CDOps, Rope, Route, RouteUtil, TerminalIO;
RouteTestB: CEDAR PROGRAM
IMPORTS CD, CDCells, CDDirectory, CDIO, CDOps, Rope, Route, RouteUtil, TerminalIO
SHARES Route =
BEGIN
a1, a2, a3, a4, a5, b1, b2, c1, c2, d1, d2, e1, e2, f1, f2, f3, f4, f5, f6, g1, g2, h1, h2: Route.Pin;
a1cd, a2cd, a3cd, a4cd, a5cd, b1cd, b2cd, c1cd, c2cd, d1cd, d2cd, e1cd, e2cd, f1cd, f2cd, f3cd, f4cd, f5cd, f6cd, g1cd, g2cd, h1cd, h2cd: CD.Instance;
result: Route.RoutingResult;
design: CD.Design;
object: CD.Object;
technology: CD.Technology ← CD.FetchTechnology[$cmos];
metal: Route.Layer ← CD.FetchLayer[technology, $met];
metal2: Route.Layer ← CD.FetchLayer[technology, $met2];
rules: Route.DesignRules ← Route.CreateDesignRules[$cmos, metal, metal2, horizontal];
routingArea: Route.RoutingArea ← Route.CreateRoutingArea["RouteTestB", rules];
Route.IncludeRoutingAreaSide[routingArea, bottom, [0, 0]];
Route.IncludeRoutingAreaSide[routingArea, top, [0, 0]];
Route.IncludeRoutingAreaSide[routingArea, left, [0, 0]];
a1cd ← RouteUtil.CreateCDPin["a1", [8, 0, 24, -8], metal2];
a1 ← Route.CreatePin[a1cd, bottom];
a2cd ← RouteUtil.CreateCDPin["a2", [8, 0, 12, 8], metal2];
a2 ← Route.CreatePin[a2cd, top];
a3cd ← RouteUtil.CreateCDPin["a3", [44, 0, 52, 8], metal2];
a3 ← Route.CreatePin[a3cd, top];
a4cd ← RouteUtil.CreateCDPin["a4", [44, 0, 52, 8], metal2];
a4 ← Route.CreatePin[a4cd, bottom];
a5cd ← RouteUtil.CreateCDPin["a5", [0, 0, 0, 0], metal];
a5 ← Route.CreatePin[a5cd, left];
Route.IncludeNet[routingArea, "a", LIST[a1, a2, a3, a4, a5]];
b1cd ← RouteUtil.CreateCDPin["b1", [64, 0, 68, -8], metal2];
b1 ← Route.CreatePin[b1cd, bottom];
b2cd ← RouteUtil.CreateCDPin["b2", [64, 0, 68, 8], metal2];
b2 ← Route.CreatePin[b2cd, top];
Route.IncludeNet[routingArea, "b", LIST[b1, b2]];
c1cd ← RouteUtil.CreateCDPin["c1", [90, 0, 98, -8], metal2];
c1 ← Route.CreatePin[c1cd, bottom];
c2cd ← RouteUtil.CreateCDPin["c2", [150, 0, 158, 8], metal2];
c2 ← Route.CreatePin[c2cd, top];
Route.IncludeNet[routingArea, "c", LIST[c1, c2]];
d1cd ← RouteUtil.CreateCDPin["d1", [150, 0, 158, -8], metal2];
d1 ← Route.CreatePin[d1cd, bottom];
d2cd ← RouteUtil.CreateCDPin["d2", [90, 0, 98, 8], metal2];
d2 ← Route.CreatePin[d2cd, top];
Route.IncludeNet[routingArea, "d", LIST[d1, d2]];
e1cd ← RouteUtil.CreateCDPin["e1", [190, 0, 198, -8], metal2];
e1 ← Route.CreatePin[e1cd, bottom];
e2cd ← RouteUtil.CreateCDPin["e2", [170, 0, 178, 8], metal2];
e2 ← Route.CreatePin[e2cd, top];
Route.IncludeNet[routingArea, "e", LIST[e1, e2]];
f1cd ← RouteUtil.CreateCDPin["f1", [170, 0, 178, -8], metal2];
f1 ← Route.CreatePin[f1cd, bottom];
f2cd ← RouteUtil.CreateCDPin["f2", [190, 0, 198, 8], metal2];
f2 ← Route.CreatePin[f2cd, top];
f3cd ← RouteUtil.CreateCDPin["f3", [210, 0, 218, 8], metal2];
f3 ← Route.CreatePin[f3cd, top];
f4cd ← RouteUtil.CreateCDPin["f4", [210, 0, 218, -8], metal2];
f4 ← Route.CreatePin[f4cd, bottom];
f5cd ← RouteUtil.CreateCDPin["f5", [0, 0, 0, 0], metal];
f5 ← Route.CreatePin[f5cd, right];
f6cd ← RouteUtil.CreateCDPin["f6", [0, 0, 0, 0], metal];
f6 ← Route.CreatePin[f6cd, left];
Route.IncludeNet[routingArea, "f", LIST[f1, f2, f3, f4, f5, f6]];
g1cd ← RouteUtil.CreateCDPin["g1", [230, 0, 238, -8], metal2];
g1 ← Route.CreatePin[g1cd, bottom];
g2cd ← RouteUtil.CreateCDPin["g1", [230, 0, 238, 8], metal2];
g2 ← Route.CreatePin[g2cd, top];
Route.IncludeNet[routingArea, "g", LIST[g1, g2]];
h1cd ← RouteUtil.CreateCDPin["h1", [250, 0, 258, -8], metal2];
h1 ← Route.CreatePin[h1cd, bottom];
h2cd ← RouteUtil.CreateCDPin["h2", [250, 0, 258, 8], metal2];
h2 ← Route.CreatePin[h2cd, top];
Route.IncludeNet[routingArea, "h", LIST[h1, h2]];
result ← Route.ChannelRoute[routingArea, [[0, 0], [270, 0], [0, 30], [-10, 0]], [0, 0, 270, 30]];
design ← CDOps.CreateDesign[technology];
object ← Route.RetrieveRouting[result, result.routingArea.name, NIL, NIL].object;
[ ] ← CDCells.IncludeOb[design: design, ob: object];
IF CDIO.WriteDesign[design, result.routingArea.name] THEN
BEGIN
newCellName: Rope.ROPE ← CDDirectory.Name[object];
IF ~Rope.Equal[result.routingArea.name, newCellName] THEN
TerminalIO.PutRope[Rope.Cat["cell name changed to: ", newCellName, "\n"]];
END
ELSE
TerminalIO.PutRope["Error: design not written\n"];
END.