DIRECTORY CD USING [Design, Instance, InstanceList, lambda, Object, Position], CDCommandOps USING [CallWithResource], CDInstances USING [OnlySelected], CDMenus USING [CreateEntry], CDOps USING [InstList, Info], CDOrient USING [MapPoint], CDSequencer USING [Command, ImplementCommand], IO USING [EndOfStream, Error, GetInt, RIS, STREAM], Process USING [priorityBackground, SetPriority], Rope USING [Cat, ROPE], SXAccess USING [Analyze], SXAtoms USING [analyzeAndCoreSelected, analyzeAndRoseSelected, analyzeAndThymeSelected, analyzeSelected, coreOut, highlightKeyboardCoordsNode, highlightPointedNode, rosePrint, thymePrint], SXHighlightNode USING [HighlightNode], TerminalIO USING [RequestRope, WriteRope]; SXCommands: CEDAR PROGRAM IMPORTS CDCommandOps, CDInstances, CDMenus, CDOps, CDOrient, CDSequencer, IO, Process, Rope, SXAccess, SXAtoms, SXHighlightNode, TerminalIO = BEGIN AnalyzeComm: PROCEDURE [comm: CDSequencer.Command] = BEGIN stopFlag: REF BOOL _ NEW[BOOL_FALSE]; ProtectedAnalyzeComm: PROCEDURE [comm: CDSequencer.Command] = BEGIN selected: CD.InstanceList _ CDInstances.OnlySelected[CDOps.InstList[comm.design]]; IF selected=NIL THEN TerminalIO.WriteRope[ "no selection\n"] ELSE { skipped: BOOL; format: REF ANY; SELECT comm.a FROM SXAtoms.analyzeAndThymeSelected => { TerminalIO.WriteRope["Analysis and Thyme format extraction of\n"]; format _ SXAtoms.thymePrint; }; SXAtoms.analyzeAndRoseSelected => { TerminalIO.WriteRope["Analysis and Rosemary format extraction of\n"]; format _ SXAtoms.rosePrint; }; SXAtoms.analyzeAndCoreSelected => { TerminalIO.WriteRope["Analysis and Core format extraction of\n"]; format _ SXAtoms.coreOut; }; ENDCASE => { TerminalIO.WriteRope["Analysis of\n"]; format _ NIL; }; FOR list: CD.InstanceList _ selected, list.rest WHILE list#NIL DO TerminalIO.WriteRope[Rope.Cat[" ", CDOps.Info[list.first.ob], "\n"]]; ENDLOOP; TRUSTED { Process.SetPriority[Process.priorityBackground] }; skipped _ SXAccess.Analyze[design: comm.design, hierarchyRoots: selected, formatKey: format, stopFlag: stopFlag]; IF skipped THEN TerminalIO.WriteRope["Analysis skipped\n"] ELSE TerminalIO.WriteRope["Analysis complete\n"] } END; TerminalIO.WriteRope["Spinifex\n"]; [] _ CDCommandOps.CallWithResource[ProtectedAnalyzeComm, comm, $Spinifex, stopFlag]; END; HighLightNode: PROCEDURE [comm: CDSequencer.Command] = BEGIN TerminalIO.WriteRope["Highlight Node (cur layer, pointed)\n"]; TRUSTED { Process.SetPriority[Process.priorityBackground] }; SXHighlightNode.HighlightNode[comm.design, comm.pos, comm.l]; END; HighLightNodeFromKeyboard: PROCEDURE [comm: CDSequencer.Command] = BEGIN ENABLE { IO.Error => { TerminalIO.WriteRope[" Invalid Coords (Format is: x y )\n"]; ERROR ABORTED }; IO.EndOfStream => { TerminalIO.WriteRope[" Invalid Coords (Format is: x y )\n"]; ERROR ABORTED }; }; coords: CD.Position _ [0,0]; inLine: IO.STREAM ~ IO.RIS[ TerminalIO.RequestRope["Highlight Node (cur layer)\n Enter coords of node relative to currently pushed cell>"]]; coords.x _ IO.GetInt[inLine] * CD.lambda; coords.y _ IO.GetInt[inLine] * CD.lambda; TRUSTED { Process.SetPriority[Process.priorityBackground] }; { a: CD.Instance ~ comm.design.actual.first.mightReplace; IF a # NIL THEN coords _ CDOrient.MapPoint[ coords, a.ob.size, a.orientation, a.location]; }; SXHighlightNode.HighlightNode[comm.design, coords, comm.l]; END; CDSequencer.ImplementCommand[a: SXAtoms.analyzeSelected, p: AnalyzeComm, queue: doQueue]; CDSequencer.ImplementCommand[a: SXAtoms.analyzeAndThymeSelected, p: AnalyzeComm, queue: doQueue]; CDSequencer.ImplementCommand[a: SXAtoms.analyzeAndRoseSelected, p: AnalyzeComm, queue: doQueue]; CDSequencer.ImplementCommand[a: SXAtoms.analyzeAndCoreSelected, p: AnalyzeComm, queue: doQueue]; CDSequencer.ImplementCommand[a: SXAtoms.highlightPointedNode, p: HighLightNode, queue: doQueue]; CDSequencer.ImplementCommand[a: SXAtoms.highlightKeyboardCoordsNode, p: HighLightNodeFromKeyboard, queue: doQueue]; CDMenus.CreateEntry[menu: $ProgramMenu, entry: "DRC", key: SXAtoms.analyzeSelected]; CDMenus.CreateEntry[menu: $ProgramMenu, entry: "DRC & extract Thyme", key: SXAtoms.analyzeAndThymeSelected]; CDMenus.CreateEntry[menu: $ProgramMenu, entry: "DRC & extract Rose", key: SXAtoms.analyzeAndRoseSelected]; CDMenus.CreateEntry[menu: $ProgramMenu, entry: "DRC & extract Core", key: SXAtoms.analyzeAndCoreSelected]; CDMenus.CreateEntry[menu: $RectProgramMenu, entry: "Highlight node", key: SXAtoms.highlightPointedNode]; CDMenus.CreateEntry[menu: $ProgramMenu, entry: "Highlight node (at coords)", key: SXAtoms.highlightKeyboardCoordsNode]; TerminalIO.WriteRope["Spinifex layout analysis package loaded\n"] END. \SXCommands.mesa Copyright c 1984, 1985 by Xerox Corporation. All rights reserved. Written by Shand, September 12, 1983 11:40 pm Last Edited by: Shand, March 11, 1985 2:51:32 am PST Last Edited by: Jacobi, April 8, 1985 12:14:48 pm PST Last edited by: gbb July 31, 1985 6:55:17 pm PDT -- Transform coords from those of currently pushed appliaction to those of screen. -- SpinifexCommands Edited on October 22, 1984 11:57:12 am PDT, by gbb Implementation of dynamic menu entries (new feature of Chipndale). changes to: DIRECTORY: added CDMenus, IMPORTS: added CDMenus, CDSequencer: parameters specified using keyword notation, CDMenus: new, create a dynamic menu entry. CDMenus: "Hilight pointed node" now in RectProgramMenu Edited on December 6, 1984 3:14:29 pm PST, by Jacobi changed the formatting, simplified, use of CDInstances.OnlySelected, Edited on December 18, 1984 6:22:50 pm PST, by Jacobi AnaysisAccess changed Edited on January 30, 1985 7:49:17 pm PST, by Jacobi Clear of SpinifexProperties removed and put in proper module Edited on March 11, 1985 2:51:32 am PST, by Shand New Command HighLightNodeFromKeyboard changes to: DIRECTORY, HighLightNodeFromKeyboard, AnalyzeComm, HighLightNodeFromKeyboard, HighLightNodeFromKeyboard gbb July 31, 1985 6:53:46 pm PDT Added command for Core output. changes to: DIRECTORY, AnalyzeComm, CDSequencer, CDMenus Κ—˜code™Kšœ Οmœ7™BK™-K™4K™5K™0—K˜šΟk ˜ Kšžœžœ<˜DKšœ žœ˜&Kšœ žœ˜!Kšœžœ˜Kšœžœ˜Kšœ žœ ˜Kšœ žœ˜.Kšžœžœžœžœ˜3Kšœžœ#˜0Kšœžœžœ˜Kšœ žœ ˜Kšœžœ―˜ΌKšœžœ˜&Kšœ žœ˜*—K˜šΟb œžœž˜KšžœCžœA˜—Kšž˜K˜K˜šΟn œž œ˜4Kšž˜Kš œ žœžœžœžœžœ˜%K˜š œž œ˜=Kšžœ˜Kšœ žœF˜RKšžœ žœžœ(˜<šžœ˜Kšœ žœ˜Kšœžœžœ˜šžœž˜šœ$˜$KšœB˜BKšœ˜K˜—šœ#˜#KšœE˜EKšœ˜K˜—šœ#˜#KšœA˜AKšœ˜K˜—šžœ˜ Kšœ&˜&Kšœ žœ˜ K˜——š žœžœ$žœžœž˜AKšœG˜GKšžœ˜—Kšžœ5˜˜>Kšžœ5˜