RouteTest4.mesa
Copyright Ó 1985, 1987 by Xerox Corporation. All rights reserved.
Last Edited by: Preas, July 17, 1987 6:57:53 pm PDT
Christian Le Cocq December 2, 1987 12:46:33 pm PST
DIRECTORY
CD, CDCells, CDIO, CDOps, DABasics, Rope, Route, RoutePrivate;
RouteTest4:
CEDAR
PROGRAM
IMPORTS CD, CDCells, CDIO, CDOps, Route
= BEGIN
EnumerateSwitchBoxNets: Route.EnumerateSwitchBoxNetsProc ~ {
-- PROC [switchBoxData: REF, eachNet: EachSwitchBoxNetProc];
nets: LIST OF NetDef ← NARROW[switchBoxData];
UNTIL nets =
NIL
DO
net: NetDef ← nets.first;
eachNet[net.name, EnumerateSwitchBoxPins, net.trunkSize, NIL, net.netData];
nets ← nets.rest;
ENDLOOP};
EnumerateSwitchBoxPins: Route.EnumerateSwitchBoxPinsProc ~ {
PROC [switchBoxData, netData: REF, eachPin: EachSwitchBoxPinsPinProc];
pins: LIST OF Route.Pin ← NARROW[netData];
UNTIL pins =
NIL
DO
pin: Route.Pin ← pins.first;
eachPin[pin.side, 8*pin.min, 8*pin.max, 8*pin.depth, pin.layer];
pins ← pins.rest;
ENDLOOP};
NetDef: TYPE = REF NetDefRec;
NetDefRec:
TYPE =
RECORD [
name: Rope.ROPE,
trunkSize: CD.Number ← 0,
netData: LIST OF Route.Pin ← NIL];
technology: CD.Technology ← CD.FetchTechnology[$cmosB];
metal: CD.Layer ← CD.FetchLayer[technology, $met];
metal2: CD.Layer ← CD.FetchLayer[technology, $met2];
rules: Route.DesignRulesParameters ← Route.DefaultDesignRulesParameters[technology, metal, metal2, horizontal];
a1: Route.Pin ← NEW[Route.PinRec ← [40, 44, 0, metal2, bottom]];
a2: Route.Pin ← NEW[Route.PinRec ← [120, 124, 0, metal2, top]];
a3: Route.Pin ← NEW[Route.PinRec ← [200, 204, 0, metal2, top]];
a: NetDef ← NEW[NetDefRec ← ["a", 0, LIST[a1, a2, a3]]];
b1: Route.Pin ← NEW[Route.PinRec ← [120, 124, 0, metal2, bottom]];
b2: Route.Pin ← NEW[Route.PinRec ← [40, 44, 0, metal2, top]];
b: NetDef ← NEW[NetDefRec ← ["b", 0, LIST[b1, b2]]];
nets: LIST OF NetDef ← LIST[a, b];
rect: DABasics.Rect ← [8*0, 8*0, 8*300, 8*100];
object: CD.Object ← Route.SwitchBox[EnumerateSwitchBoxNets, rect, rules, "RouteTest4", NIL, nets].object;
design: CD.Design ← CDOps.CreateDesign[technology];
[ ] ← CDCells.IncludeOb[design: design, ob: object];
[ ] ←
CDIO.WriteDesign[design, "RouteTest4"];
END.