OnionTest.mesa
Copyright © 1984 by Xerox Corporation. All rights reversed.
Created by: Serlet, May 14, 1985 1:17:53 pm PDT
Last Edited by: Serlet, July 5, 1985 6:00:26 pm PDT
Pradeep Sindhu January 2, 1986 3:43:01 pm PST
Bertrand Serlet November 13, 1985 8:23:58 pm PST
DIRECTORY
CD, CDCells, CDDirectory, CDProperties, CDRects, CMos, Core, CoreOps, PW, Onion, PWCore, RefTab, Rope,
SymTab, TerminalIO;
OnionTest: CEDAR PROGRAM
IMPORTS CDCells, CDDirectory, CDProperties, CDRects, CMos, CoreOps, Onion, PW, PWCore, RefTab =
BEGIN
Wire: TYPE = Core.Wire;
net1: Wire ← CoreOps.CreateWire[name: "net1"];
net2: Wire ← CoreOps.CreateWire[name: "net2"];
net3: Wire ← CoreOps.CreateWire[name: "net3"];
net4: Wire ← CoreOps.CreateWire[name: "net4"];
net5: Wire ← CoreOps.CreateWire[name: "net5"];
Inner: PROC RETURNS [inner: CD.Object] = {
inner ← CDCells.CreateEmptyCell[];
CDProperties.PutPropOnObject[inner, PWCore.netsProp, RefTab.Create[]];
[] ← PW.IncludeInCell[inner, CDRects.CreateRect[[80, 6], CMos.met], [0, 0]];
[] ← PW.IncludeInCell[inner, CDRects.CreateRect[[80, 6], CMos.met], [0, 74]];
[] ← PW.IncludeInCell[inner, CDRects.CreateRect[[6, 80], CMos.met], [0, 0]];
[] ← PW.IncludeInCell[inner, CDRects.CreateRect[[6, 80], CMos.met], [74, 0]];
[] ← Onion.IncludePin[inner, net1, CMos.pol, [4, 20], [0, 30]];
[] ← Onion.IncludePin[inner, net1, CMos.met, [2, 6], [50, 74]];
[] ← Onion.IncludePin[inner, net1, CMos.met2, [8, 8], [72, 40]];
[] ← Onion.IncludePin[inner, net2, CMos.pol, [6, 6], [0, 10]];
[] ← Onion.IncludePin[inner, net2, CMos.met2, [22, 4], [4, 76]];
[] ← Onion.IncludePin[inner, net3, CMos.met, [8, 6], [72, 10]];
[] ← Onion.IncludePin[inner, net4, CMos.met, [6, 6], [74, 30]];
[] ← CDCells.RepositionCell[inner, NIL];
};
Outer: PROC RETURNS [outer: CD.Object] = {
outer ← CDCells.CreateEmptyCell[];
CDProperties.PutPropOnObject[outer, PWCore.netsProp, RefTab.Create[]];
[] ← PW.IncludeInCell[outer, CDRects.CreateRect[[300, 8], CMos.pol], [0, 0]];
[] ← PW.IncludeInCell[outer, CDRects.CreateRect[[300, 8], CMos.pol], [0, 392]];
[] ← PW.IncludeInCell[outer, CDRects.CreateRect[[8, 400], CMos.pol], [0, 0]];
[] ← PW.IncludeInCell[outer, CDRects.CreateRect[[8, 400], CMos.pol], [292, 0]];
[] ← Onion.IncludePin[outer, net1, CMos.met, [6, 20], [0, 80]];
[] ← Onion.IncludePin[outer, net1, CMos.met, [2, 6], [200, 0]];
[] ← Onion.IncludePin[outer, net2, CMos.met, [38, 6], [70, 0]];
[] ← Onion.IncludePin[outer, net2, CMos.met, [4, 8], [296, 60]];
[] ← Onion.IncludePin[outer, net2, CMos.met, [6, 2], [60, 398]];
[] ← Onion.IncludePin[outer, net3, CMos.met, [6, 4], [294, 170]];
[] ← Onion.IncludePin[outer, net5, CMos.met, [6, 10], [140, 0]];
[] ← CDCells.RepositionCell[outer, NIL];
};
RingWidthSpecial: Onion.RingWidthProc = {
ringWidth ← IF netWire=net2 THEN 22 ELSE 8;
};
MyProc: PW.UserProc =
BEGIN
inner, outer, result: CD.Object;
myParameters: Onion.LayersParameters ← Onion.defaultLayersParameters;
inner ← Inner[]; outer ← Outer[];
inner ← PWCore.LabelPins[CoreOps.WiresToWireSequence[LIST [net1, net2, net3, net4]], inner];
outer ← PWCore.LabelPins[CoreOps.WiresToWireSequence[LIST [net1, net2, net3, net5]], outer];
myParameters.wireExtendProc ← Onion.WireExtendPolToMetForPads;
myParameters.ringWidth ← RingWidthSpecial;
[] ← CDDirectory.Include[design, inner, "inner"];
[] ← CDDirectory.Include[design, outer, "outer"];
result ← Onion.LRSRoute[design, Onion.MakeInner[design, inner], outer, [100, 120], myParameters].cell;
result ← Onion.Channel[design, Onion.MakeInner[design, inner], outer, 400, myParameters].cell;
RETURN[result];
END;
PW.Register[MyProc, "OnionTest"];
END.