PWRouteTest.mesa
Copyright © 1984 by Xerox Corporation. All rights reversed.
Last Edited by: Monier, June 21, 1985 11:52:00 am PDT
Preas October 29, 1985 4:08:58 pm PST
Use with the file PWRouteTest.dale to test routing:
RWRoute.load
cdread PWRouteTest -- NOTE: PWRouteTest.dale must be in the /// directory
run PWRouteTest
middle click P in the ChipNDale viewer
select the appropriate generator
DIRECTORY
PW, PWRoute, Rope;
PWRouteTest: CEDAR PROGRAM
IMPORTS PW, PWRoute =
BEGIN
ROPE: TYPE = Rope.ROPE;
TestChRouterX: PW.UserProc =
BEGIN
left, right, top, bottom, test: PW.Object;
examples: PW.Design ← PW.OpenDesign["PWRouteTest.dale"];
left ← PW.Get[examples, "ChXleft"];
right ← PW.Get[examples, "ChXright"];
top ← PW.Get[examples, "ChXtop"];
bottom ← PW.Get[examples, "ChXbottom"];
test ← PWRoute.AbutChRouteListX[design, LIST[left, right], LIST[bottom], LIST[top]];
RETURN[test];
END;
TestChRouterY: PW.UserProc =
BEGIN
left, right, top, bottom, test: PW.Object;
examples: PW.Design ← PW.OpenDesign["PWRouteTest.dale"];
left ← PW.Get[examples, "ChYleft"];
right ← PW.Get[examples, "ChYright"];
top ← PW.Get[examples, "ChYtop"];
bottom ← PW.Get[examples, "ChYbottom"];
test ← PWRoute.AbutChRouteListY[design, LIST[bottom, top], LIST[left], LIST[right]];
RETURN[test];
END;
TestSbRouterH: PW.UserProc =
BEGIN
left, right, top, bottom, sb, column, test: PW.Object;
dx1, dx2, dy1: INT;
examples: PW.Design ← PW.OpenDesign["PWRouteTest.dale"];
left ← PW.Get[examples, "SbXleft"];
right ← PW.Get[examples, "SbXright"];
top ← PW.Get[examples, "SbXtop"];
bottom ← PW.Get[examples, "SbXbottom"];
sb ← PWRoute.AbutSbRoute[design, bottom, right, top, left, horizontal];
column ← PW.AbutListY[design, LIST[bottom, sb, top]];
test ← PW.CreateEmptyCell[];
dy1 ← PW.IRSize[bottom].y;
dx1 ← PW.IRSize[left].x;
dx2 ← PW.IRSize[column].x;
[] ← PW.IncludeInCell[test, left, [0, dy1]];
[] ← PW.IncludeInCell[test, column, [dx1 , 0]];
[] ← PW.IncludeInCell[test, right, [dx1 + dx2, dy1]];
PW.IncludeInDirectory[design, test, "Switchbox"];
RETURN[test];
END;
TestSbRouterV: PW.UserProc =
BEGIN
left, right, top, bottom, sb, row, test: PW.Object;
dx1, dy1, dy2: INT;
examples: PW.Design ← PW.OpenDesign["PWRouteTest.dale"];
left ← PW.Get[examples, "SbYleft"];
right ← PW.Get[examples, "SbYright"];
top ← PW.Get[examples, "SbYtop"];
bottom ← PW.Get[examples, "SbYbottom"];
sb ← PWRoute.AbutSbRoute[design, bottom, right, top, left, vertical];
row ← PW.AbutListX[design, LIST[left, sb, right]];
test ← PW.CreateEmptyCell[];
dy1 ← PW.IRSize[bottom].y;
dy2 ← PW.IRSize[row].y;
dx1 ← PW.IRSize[left].x;
[] ← PW.IncludeInCell[test, bottom, [dx1, 0]];
[] ← PW.IncludeInCell[test, row, [0 , dy1]];
[] ← PW.IncludeInCell[test, top, [dx1, dy1 + dy2]];
PW.IncludeInDirectory[design, test, "Switchbox"];
RETURN[test];
END;
TestSb2Sides: PW.UserProc =
BEGIN
left, bottom, sb, row, test: PW.Object;
dx, dy: INT;
examples: PW.Design ← PW.OpenDesign["PWRouteTest.dale"];
left ← PW.Get[examples, "Sb2left"];
bottom ← PW.Get[examples, "Sb2bottom"];
sb ← PWRoute.AbutSbRoute[design, bottom, NIL, NIL, left, vertical];
row ← PW.AbutListX[design, LIST[left, sb]];
test ← PW.CreateEmptyCell[];
dy ← PW.IRSize[bottom].y;
dx ← PW.IRSize[left].x;
[] ← PW.IncludeInCell[test, bottom, [dx, 0]];
[] ← PW.IncludeInCell[test, row, [0 , dy]];
PW.IncludeInDirectory[design, test, "Switchbox"];
RETURN[test];
END;
PW.Register[TestChRouterX, "TestChRouterX"];
PW.Register[TestChRouterY, "TestChRouterY"];
PW.Register[TestSbRouterH, "TestSbRouterH"];
PW.Register[TestSbRouterV, "TestSbRouterV"];
PW.Register[TestSb2Sides, "TestSb2Sides"];
END.