TestPW.mesa
Copyright © 1984, 1985, 1986 by Xerox Corporation. All rights reversed.
Last Edited by: Monier, June 21, 1985 11:52:00 am PDT
Bertrand Serlet December 7, 1986 10:01:13 pm PST
Louis Monier August 22, 1985 1:11:41 pm PDT
DIRECTORY
CDRects, CMosB, PW, PWObjects, Rope;
TestPW: CEDAR PROGRAMIMPORTS CDRects, CMosB, PW, PWObjects = BEGIN
l: INT = CMosB.cmosB.lambda;
ROPE: TYPE = Rope.ROPE;
examples: PW.Design ← PW.OpenDesign["TestPW.dale"];
TestPWX: PW.UserProc =
BEGIN
-- Cells
a, b, test: PW.Object;
n: INT;
a ← PW.Get[examples, "a"];
b ← PW.Get[examples, "b"];
test ← PW.AbutX[a, b];
RETURN[test];
END;
TestPWSharedY: PW.UserProc =
BEGIN
-- Cells
a, b, test: PW.Object;
n: INT;
a ← PW.Rot90[PW.Get[examples, "a"]];
b ← PW.Rot90[PW.Get[examples, "b"]];
test ← PW.SharedAbutListY[LIST[a, b, a, b, a]];
RETURN[test];
END;
TestMapFunction: PW.UserProc =
BEGIN
Cells
contact, noContact, edge, test: PW.Object;
BinaryCount: PW.XYFunction =
{RETURN[
SELECT TRUE FROM
y=0 => edge,
PW.XthBitOfN[y-1, x] => contact,
ENDCASE => noContact]};
contact ← PW.Get[examples, "contact"];
edge ← PW.Get[examples, "edge"];
noContact ← PW.Inst[contact, LIST["contact"]];
test ← PW.MapFunction[BinaryCount, 0, 16, 0, 4];
RETURN[test];
END;
TestRoutingCell: PW.UserProc = {
node: PWObjects.Node ← PWObjects.CreateNode[LIST[[CDRects.CreateRect[[10 * l, 4 * l], CMosB.met], [0, 5 * l]]]];
RETURN [PWObjects.CreateRouting[[0, 0, 10 * l, 13 * l], LIST [node]]];
};
PW.Register[TestPWX, "TestPWX"];
PW.Register[TestPWSharedY, "TestPWSharedY"];
PW.Register[TestMapFunction, "TestMapFunction"];
PW.Register[TestRoutingCell, "TestRoutingCell"];
END.