DIRECTORY CD, CDBasics, PW, PWRoute, Rope; PWRouteTest: CEDAR PROGRAM IMPORTS CD, CDBasics, PW, PWRoute = BEGIN ROPE: TYPE = Rope.ROPE; IRSize: PROC [obj: PW.Object] RETURNS [size: CD.Position] = {size _ CDBasics.SizeOfRect[CD.InterestRect[obj]]}; TestChRouterX: PW.UserProc = BEGIN -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; routerParams: PWRoute.RouterParams _ NEW[PWRoute.RouterParamsRec _ ["metal2", "metal", design.technology.key]]; leftOrig: PW.Object _ PW.Get[design, "ChXleft"]; leftXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, leftOrig, right, 50, "metal"]; left: PW.Object _ PW.AbutX[leftOrig, leftXfer]; rightOrig: PW.Object _ PW.Get[design, "ChXright"]; rightXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, rightOrig, left, 50, "metal"]; right: PW.Object _ PW.AbutX[rightXfer, rightOrig]; topOrig: PW.Object _ PW.Get[design, "ChXtop"]; topXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, topOrig, bottom, 50, "metal2"]; top: PW.Object _ PW.AbutY[topXfer, topOrig]; bottomOrig: PW.Object _ PW.Get[design, "ChXbottom"]; bottomXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, bottomOrig, top, 50, "metal2"]; bottom: PW.Object _ PW.AbutY[bottomOrig, bottomXfer]; test: PW.Object _ PWRoute.AbutChRouteListX[LIST[left, right], LIST[bottom], LIST[top], routerParams]; RETURN[test]; END; TestChRouterY: PW.UserProc = BEGIN left, right, top, bottom, test: PW.Object; -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; left _ PW.Get[design, "ChYleft"]; right _ PW.Get[design, "ChYright"]; top _ PW.Get[design, "ChYtop"]; bottom _ PW.Get[design, "ChYbottom"]; test _ PWRoute.AbutChRouteListY[LIST[bottom, top], LIST[left], LIST[right]]; RETURN[test]; END; TestSbRouterH: PW.UserProc = BEGIN left, right, top, bottom, sb, column, test: PW.Object; dx1, dx2, dy1: INT; -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; left _ PW.Get[design, "SbXleft"]; right _ PW.Get[design, "SbXright"]; top _ PW.Get[design, "SbXtop"]; bottom _ PW.Get[design, "SbXbottom"]; sb _ PWRoute.AbutSbRoute[bottom, right, top, left, horizontal]; column _ PW.AbutListY[LIST[bottom, sb, top]]; test _ PW.CreateEmptyCell[]; dy1 _ IRSize[bottom].y; dx1 _ IRSize[left].x; dx2 _ IRSize[column].x; [] _ PW.IncludeInCell[test, left, [0, dy1]]; [] _ PW.IncludeInCell[test, column, [dx1 , 0]]; [] _ PW.IncludeInCell[test, right, [dx1 + dx2, dy1]]; PW.RepositionCell[test]; RETURN[test]; END; TestSbSmlRouterH: PW.UserProc = BEGIN -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; left: PW.Object _ PW.Get[design, "SbXSmlLeft"]; right: PW.Object _ PW.Get[design, "SbXSmlRight"]; top: PW.Object _ PW.Get[design, "SbXSmlTop"]; bottom: PW.Object _ PW.Get[design, "SbXSmlBottom"]; h: INT _ MAX[IRSize[bottom].x, IRSize[top].x]; v: INT _ MAX[IRSize[left].y, IRSize[right].y]; dy1: INT _ IRSize[bottom].y; dx1: INT _ IRSize[left].x; rect: PWRoute.RefRect _ NEW[PWRoute.Rect _ [-dx1, -dy1, h + dx1, v + dy1]]; sb: PW.Object _ PWRoute.MakeChannel[bottom, top, left, right, rect, PWRoute.defaultRouterParams, FALSE, switchBox]; dx2: INT _ IRSize[sb].x; dy2: INT _ IRSize[sb].y; test: PW.Object _ PW.CreateEmptyCell[]; [] _ PW.IncludeInCell[test, bottom, [2*dx1, 0]]; [] _ PW.IncludeInCell[test, top, [2*dx1, dy1 + dy2]]; [] _ PW.IncludeInCell[test, left, [0, 2*dy1]]; [] _ PW.IncludeInCell[test, sb, [dx1 , dy1]]; [] _ PW.IncludeInCell[test, right, [dx1 + dx2, 2*dy1]]; PW.RepositionCell[test]; RETURN[test]; END; TestPinsH: PW.UserProc = BEGIN -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; routerParams: PWRoute.RouterParams _ NEW[PWRoute.RouterParamsRec _ ["metal", "metal2"]]; left: PW.Object _ PW.Get[design, "PinsLeft"]; right: PW.Object _ PW.Get[design, "PinsRight"]; top: PW.Object _ PW.Get[design, "PinsTop"]; bottom: PW.Object _ PW.Get[design, "PinsBottom"]; h: INT _ MAX[IRSize[bottom].x, IRSize[top].x]; v: INT _ MAX[IRSize[left].y, IRSize[right].y]; dy1: INT _ IRSize[bottom].y; dx1: INT _ IRSize[left].x; -- rect: PWRoute.RefRect _ NEW[PWRoute.Rect _ [-dx1, -dy1, h + dx1, v + dy1]]; sb: PW.Object _ PWRoute.MakeChannel[bottom, top, left, right, NIL -- rect --, routerParams, FALSE, channel]; dx2: INT _ IRSize[sb].x; dy2: INT _ IRSize[sb].y; test: PW.Object _ PW.CreateEmptyCell[]; [] _ PW.IncludeInCell[test, bottom, [dx1, 0]]; [] _ PW.IncludeInCell[test, top, [dx1, dy1 + dy2]]; [] _ PW.IncludeInCell[test, left, [0, dy1]]; [] _ PW.IncludeInCell[test, sb, [dx1 , dy1]]; [] _ PW.IncludeInCell[test, right, [dx1 + dx2, dy1]]; PW.RepositionCell[test]; RETURN[test]; END; TestMulDL: PW.UserProc = BEGIN right, top, bottom, left, sb, row, test: PW.Object; dx1, dy1, dy2: INT; -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; routerParams: PWRoute.RouterParams _ NEW[PWRoute.RouterParamsRec _ ["metal", "metal2"]]; right _ PW.Get[design, "MulDLRight"]; top _ PW.Get[design, "MulDLTop"]; bottom _ PW.Get[design, "MulDLBottom"]; left _ PW.Get[design, "MulDLLeft"]; sb _ PWRoute.AbutSbRoute[bottom, right, top, left, horizontal, routerParams]; row _ PW.AbutListX[LIST[left, sb, right]]; test _ PW.CreateEmptyCell[]; dx1 _ IRSize[left].x; dy1 _ IRSize[bottom].y; dy2 _ IRSize[row].y; [] _ PW.IncludeInCell[test, bottom, [dx1, 0]]; [] _ PW.IncludeInCell[test, row, [0 , dy1]]; [] _ PW.IncludeInCell[test, top, [dx1, dy1 + dy2]]; PW.RepositionCell[test]; RETURN[test]; END; TestSbRouterV: PW.UserProc = BEGIN left, right, top, bottom, sb, row, test: PW.Object; dx1, dy1, dy2: INT; -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; left _ PW.Get[design, "SbYleft"]; right _ PW.Get[design, "SbYright"]; top _ PW.Get[design, "SbYtop"]; bottom _ PW.Get[design, "SbYbottom"]; sb _ PWRoute.AbutSbRoute[bottom, right, top, left, vertical]; row _ PW.AbutListX[LIST[left, sb, right]]; test _ PW.CreateEmptyCell[]; dy1 _ IRSize[bottom].y; dy2 _ IRSize[row].y; dx1 _ IRSize[left].x; [] _ PW.IncludeInCell[test, bottom, [dx1, 0]]; [] _ PW.IncludeInCell[test, row, [0 , dy1]]; [] _ PW.IncludeInCell[test, top, [dx1, dy1 + dy2]]; PW.RepositionCell[test]; RETURN[test]; END; TestSbMMRouterV: PW.UserProc = BEGIN -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; routerParams: PWRoute.RouterParams _ NEW[PWRoute.RouterParamsRec _ ["metal2", "metal", design.technology.key]]; leftOrig: PW.Object _ PW.Get[design, "SbMMleft"]; leftXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, leftOrig, right, 50, "metal"]; left: PW.Object _ PW.AbutX[leftOrig, leftXfer]; rightOrig: PW.Object _ PW.Get[design, "SbMMright"]; rightXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, rightOrig, left, 50, "metal"]; right: PW.Object _ PW.AbutX[rightXfer, rightOrig]; topOrig: PW.Object _ PW.Get[design, "SbMMtop"]; topXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, topOrig, bottom, 50, "metal2"]; top: PW.Object _ PW.AbutY[topXfer, topOrig]; bottomOrig: PW.Object _ PW.Get[design, "SbMMbottom"]; bottomXfer: PW.Object _ PWRoute.XferPins[routerParams.technologyKey, bottomOrig, top, 50, "metal2"]; bottom: PW.Object _ PW.AbutY[bottomOrig, bottomXfer]; sb: PW.Object _ PWRoute.AbutSbRoute[bottom, right, top, left, vertical, routerParams]; row: PW.Object _ PW.AbutListX[LIST[left, sb, right]]; test: PW.Object _ PW.CreateEmptyCell[]; dy1: INT _ IRSize[bottom].y; dy2: INT _ IRSize[row].y; dx1: INT _ IRSize[left].x; [] _ PW.IncludeInCell[test, bottom, [dx1, 0]]; [] _ PW.IncludeInCell[test, row, [0 , dy1]]; [] _ PW.IncludeInCell[test, top, [dx1, dy1 + dy2]]; PW.RepositionCell[test]; RETURN[test]; END; TestSb2Sides: PW.UserProc = BEGIN -- examples: PW.Design _ PW.OpenDesign["PWRouteTest.dale"]; leftOrig: PW.Object _ PW.Get[design, "Sb2left"]; leftXfer: PW.Object _ PWRoute.XferPins[design.technology.key, leftOrig, right, 0, "poly"]; left: PW.Object _ PW.AbutX[leftOrig, leftXfer]; bottomOrig: PW.Object _ PW.Get[design, "Sb2bottom"]; bottomXfer: PW.Object _ PWRoute.XferPins[design.technology.key, bottomOrig, top, 50, "metal"]; bottom: PW.Object _ PW.AbutY[bottomOrig, bottomXfer]; sb: PW.Object _ PWRoute.AbutSbRoute[bottom, NIL, NIL, left, vertical]; row: PW.Object _ PW.AbutListX[LIST[left, sb]]; test: PW.Object _ PW.CreateEmptyCell[]; dy: INT _ IRSize[bottom].y; dx: INT _ IRSize[left].x; [] _ PW.IncludeInCell[test, bottom, [dx, 0]]; [] _ PW.IncludeInCell[test, row, [0 , dy]]; PW.RepositionCell[test]; RETURN[test]; END; PW.Register[TestChRouterX, "TestChRouterX"]; PW.Register[TestChRouterY, "TestChRouterY"]; PW.Register[TestSbRouterH, "TestSbRouterH"]; PW.Register[TestSbSmlRouterH, "TestSbSmlRouterH"]; PW.Register[TestSbRouterV, "TestSbRouterV"]; PW.Register[TestSb2Sides, "TestSb2Sides"]; PW.Register[TestSbMMRouterV, "TestSbMMRouterV"]; PW.Register[TestPinsH, "TestPinsH"]; PW.Register[TestMulDL, "TestMulDL"]; END. ΦPWRouteTest.mesa Copyright c 1984 by Xerox Corporation. All rights reversed. Last Edited by: Monier, June 21, 1985 11:52:00 am PDT Bryan Preas February 19, 1986 5:25:02 pm PST Preas October 29, 1985 4:08:58 pm PST Use with the file PWRouteTest.dale to test routing: CDCmosB (or CDCmosA) PWRoute.load cdread PWRouteTest -- NOTE: PWRouteTest.dale must be in the /// directory run PWRouteTest middle click P in the ChipNDale viewer select the appropriate generator Κ /˜– "Cedar" stylešœ™Jšœ Οmœ1™