TestPWCoreRoute.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reversed.
Bertrand Serlet February 19, 1987 11:46:44 pm PST
DIRECTORY CD, CoreCreate, CoreOps, PW, PWCore, PWCoreRoute;
TestPWCoreRoute: CEDAR PROGRAM
IMPORTS CoreCreate, CoreOps, PW, PWCore =
BEGIN OPEN PWCoreRoute;
design: CD.Design ← PW.OpenDesign["TestPWCoreRoute"];
TestX: PROC RETURNS [channelCT: CellType] = {
left: CD.Object ← PW.Get[design, "left.mask"];
right: CD.Object ← PW.Get[design, "right.mask"];
leftCT: CellType ← PWCore.FromLayoutWithoutPublic[left];
rightCT: CellType ← PWCore.FromLayoutWithoutPublic[right];
public: Wire ← CoreCreate.Wires["middlea", "through", "bar", "left", "higha", "highb"];
onlyInternal: Wire ← CoreCreate.Wires["middleb", "green", "red", "ring", "foo"];
channelCT ← CoreCreate.Cell[
public: public,
onlyInternal: onlyInternal,
instances: LIST [
CoreCreate.Instance[leftCT, ["righta", "middlea"], ["rightb", "middleb"]],
CoreCreate.Instance[rightCT, ["righta", "middlea"], ["rightb", "middleb"]]
],
name: "ChannelInX"
];
PWCore.SetLayout[channelCT, $Channel, $ChannelData, NEW [ChannelDataRec ← [
inX: TRUE,
extend: TRUE,
bottomOrLeftWires: LIST [CoreOps.FindWire[public, "middlea"], CoreOps.FindWire[public, "through"], CoreOps.FindWire[public, "highb"]],
topOrRightWires: LIST[CoreOps.FindWire[public, "middlea"], CoreOps.FindWire[public, "through"], CoreOps.FindWire[public, "highb"]],
trunkLayer: "metal",
branchLayer: "metal2"
]]];
};
TestY: PROC RETURNS [channelCT: CellType] = {
left: CD.Object ← PW.Get[design, "rleft.mask"];
right: CD.Object ← PW.Get[design, "rright.mask"];
leftCT: CellType ← PWCore.FromLayoutWithoutPublic[left];
rightCT: CellType ← PWCore.FromLayoutWithoutPublic[right];
public: Wire ← CoreCreate.Wires["middlea", "x", "y", "z", "bar", "left", "higha", "highb"];
onlyInternal: Wire ← CoreCreate.Wires["middleb", "green", "red", "ring", "foo"];
channelCT ← CoreCreate.Cell[
public: public,
onlyInternal: onlyInternal,
instances: LIST [
CoreCreate.Instance[rightCT, ["righta", "middlea"], ["rightb", "middleb"]],
CoreCreate.Instance[leftCT, ["righta", "middlea"], ["rightb", "middleb"]]
],
name: "ChannelInY"
];
PWCore.SetLayout[channelCT, $Channel, $ChannelData, NEW [ChannelDataRec ← [
inX: FALSE,
extend: TRUE,
extendTopOrRight: FALSE,
bottomOrLeftWires: LIST [public[0], public[1], public[2], public[3]],
topOrRightWires: LIST[public[0], public[1], public[2], public[3]],
trunkLayer: "metal",
branchLayer: "metal2"
]]];
};
END.