DIRECTORY CD, Core, CoreCreate, CoreGeometry, CoreOps, CoreRoute, PW, PWCore, Rope, Route, Sinix, SinixOps, TerminalIO; TestCoreRoute: CEDAR PROGRAM IMPORTS CoreCreate, CoreGeometry, CoreOps, CoreRoute, PW, PWCore, Rope, Sinix, SinixOps, TerminalIO = BEGIN OPEN CoreRoute; TestExtendObject: PW.GeneratorProc = { EnumerateSegments: PROC [eachSegment: PROC [Segment]] = { EachWirePin: CoreGeometry.EachWirePinProc = { IF side=chosenSide THEN eachSegment[[LabelInternal[testCT.public, wire], min, max, layer]]; }; [] _ CoreGeometry.EnumerateWireSides[mode.decoration, testCT, EachWirePin]; }; test: CD.Object _ PW.Get[design, "test.mask"]; mode: Sinix.Mode = SinixOps.GetExtractMode[$cmosB]; testCT: Core.CellType = NARROW [Sinix.Extract[test, mode].result]; chosenSide: CoreGeometry.Side = SELECT TerminalIO.RequestSelection["Side", LIST["left", "right", "top", "bottom"]] FROM 1 => left, 2 => right, 3 => top, ENDCASE => bottom; RETURN [ExtendObject[EnumerateSegments, [320, 320], chosenSide, AllButHorizLeft]]; }; AllButHorizLeft: ExtendSegmentProc = { IF Rope.Equal[label, "horiz"] AND side=left THEN RETURN; RETURN [ExtendSegment[label, size, layer, side, extension]]; }; TrivialNaming: PROC [name: Rope.ROPE] RETURNS [label: Route.Label] = { label _ name; }; TestMakeRoutingCell: PROC [cell: CD.Object] RETURNS [routingCell: CD.Object] = { routingCell _ MakeRoutingCell[cell, TrivialNaming]; }; TestX: PROC [design: CD.Design] RETURNS [channelCT: Core.CellType] = { left: CD.Object _ PW.Get[design, "left.mask"]; right: CD.Object _ PW.Get[design, "right.mask"]; leftCT: Core.CellType _ PWCore.FromLayoutWithoutPublic[left]; rightCT: Core.CellType _ PWCore.FromLayoutWithoutPublic[right]; public: Core.Wire _ CoreCreate.Wires["middlea", "through", "bar", "left", "higha", "highb"]; onlyInternal: Core.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, $RawChannelRoute, $ChannelInfo, NEW [ChannelInfoRec _ [ direction: vertical, tech: design.technology, bottomOrLeftWires: LIST [CoreOps.FindWire[public, "middlea"], CoreOps.FindWire[public, "through"], CoreOps.FindWire[public, "highb"]], topOrRightWires: LIST[CoreOps.FindWire[public, "through"], CoreOps.FindWire[public, "highb"]], trunk: "metal", branch: "metal2" ]]]; }; TestY: PROC [design: CD.Design] RETURNS [channelCT: Core.CellType] = { left: CD.Object _ PW.Get[design, "rleft.mask"]; right: CD.Object _ PW.Get[design, "rright.mask"]; leftCT: Core.CellType _ PWCore.FromLayoutWithoutPublic[left]; rightCT: Core.CellType _ PWCore.FromLayoutWithoutPublic[right]; public: Core.Wire _ CoreCreate.Wires["middlea", "x", "y", "z", "bar", "left", "higha", "highb"]; onlyInternal: Core.Wire _ CoreCreate.Wires["middleb", "green", "red", "ring", "foo"]; channelCT _ CoreCreate.Cell[ public: public, onlyInternal: onlyInternal, instances: LIST [ CoreCreate.Instance[rightCT, ["righta", "middlea"], ["foo", "middlea"], ["rightb", "middleb"]], CoreCreate.Instance[leftCT, ["righta", "middlea"], ["rightb", "middleb"]] ], name: "ChannelInY" ]; PWCore.SetLayout[channelCT, $RawChannelRoute, $ChannelInfo, NEW [ChannelInfoRec _ [ direction: horizontal, tech: design.technology, justifyBottomOrLeft: FALSE, bottomOrLeftWires: LIST [public[0], public[1], public[2], public[3]], topOrRightWires: LIST[public[0], public[1], public[2], public[3]], trunk: "metal", branch: "metal2" ]]]; }; PW.RegisterGenerator[TestExtendObject, "TestExtendObject"]; END. ΎTestCoreRoute.mesa Copyright Σ 1985, 1986, 1987 by Xerox Corporation. All rights reversed. Bertrand Serlet August 23, 1987 7:48:54 pm PDT Extension ToRouting Channel Initialization Κr˜– "Cedar" stylešœ™JšœH™HIcodešœ.™.—J™JšΟk œœ6œ3˜wJ˜šΟn œœ˜Jšœ0œ-˜fJšœœ ˜—head™ šžœœ˜&šžœœœ˜9šž œ"˜-JšœœD˜[J˜—JšœK˜KJ˜—Jšœœ œ˜.Jšœ3˜3Jšœœ$˜BJš œ œ%œ$œ"œ ˜«JšœL˜R˜J˜——šžœ˜&Jšœœ œœ˜8Jšœ6˜