DIRECTORY CD, CDBasics, CDCells, CDDirectory, CDInstances, CDMenus, CDOps, CDOrient, CDProperties, CDRects, CDSequencer, CDViewer, CDViewHighlight, CMos, CMosB, Core, CoreClasses, CoreOps, CoreProperties, Ports, PW, PWPins, Rope, Rosemary, Sinix, SinixCMos, TerminalIO, ViewerClasses; BooleDebug: CEDAR PROGRAM IMPORTS CDBasics, CDInstances, CDMenus, CDOps, CDOrient, CDProperties, CoreOps, CoreProperties, Ports, Rosemary, Sinix, SinixCMos, TerminalIO = BEGIN ROPE: TYPE = Core.ROPE; CellType: TYPE = Core.CellType; Wire: TYPE = Core.Wire; IsSingleSelected: PROC [selected: CD.Instance, multiple: BOOL] RETURNS [BOOL] = { IF selected=NIL THEN { TerminalIO.WriteRope["\n** No current selection--can't do it.\n"]; RETURN[FALSE]; }; IF multiple THEN { TerminalIO.WriteRope["\n** Multiple instances selected--can't do it.\n"]; RETURN[FALSE]; }; RETURN[TRUE]; }; FindWireAtPos: PROC [ct: CellType, posInCell: CD.Position] RETURNS [wr: Wire _ NIL, path: Rosemary.InstantiationPath _ NIL] = { rc: CellType _ Rosemary.Recordify[ct]; rcData: CoreClasses.RecordCellType _ NARROW [rc.data]; FindInInternal: CoreOps.EachWireProc = { FOR geom: LIST OF CD.Instance _ Sinix.GetWireGeometryProp[SinixCMos.extractBMode, wire], geom.rest WHILE geom#NIL DO IF CDInstances.PointToI[posInCell, geom.first] THEN {wr _ wire; quit _ TRUE} ENDLOOP; }; IF CoreOps.VisitWire[rcData.internal, FindInInternal] THEN RETURN; FOR i: NAT IN [0 .. rcData.size) DO inst: CD.Instance _ NARROW [CoreProperties.GetCellInstanceProp[rcData[i], SinixCMos.extractBMode.instanceProp]]; IF inst=NIL THEN ERROR; IF CDInstances.PointToI[posInCell, inst] THEN { subPos: CD.Position _ CDOrient.DeMapPoint[posInCell, inst.ob.size, inst.orientation, inst.location]; [wr, path] _ FindWireAtPos[rcData[i].type, subPos]; path _ CONS [rcData[i], path]; }; ENDLOOP; }; SeeRoseValue: PROC [command: CDSequencer.Command] = { simulation: Rosemary.Simulation _ NARROW [CDProperties.GetDesignProp[command.design, $Simulation]]; selected: CD.Instance; multiple: BOOL; pos: CD.Position _ command.pos; ct: CellType; wire: Wire; path: Rosemary.InstantiationPath; wireSize: NAT; bits: Ports.LevelSequence; wireCell: CellType; [selected, multiple] _ CDOps.SelectedInstance[command.design]; IF ~IsSingleSelected[selected, multiple] THEN RETURN; ct _ Sinix.Extract[selected.ob, SinixCMos.extractBMode].cellType; [wire, path] _ FindWireAtPos[ct, CDBasics.SubPoints[command.pos, selected.location]]; IF path=NIL THEN wireCell _ ct ELSE FOR end: Rosemary.InstantiationPath _ path, end.rest UNTIL end=NIL DO wireCell _ end.first.type ENDLOOP; wireSize _ CoreOps.WireBits[wire]; bits _ NEW[Ports.LevelSequenceRec[wireSize]]; Rosemary.GetWireValue[simulation, path, wire, bits]; TerminalIO.WriteRopes[CoreOps.GetFullWireName[NARROW[wireCell.data, CoreClasses.RecordCellType].internal, wire], " = ", Ports.LevelSequenceToRope[bits, wireSize]]; TerminalIO.WriteLn[]; }; CDMenus.ImplementEntryCommand[$OtherProgramMenu, "SeeRoseValue", SeeRoseValue, $SeeRoseValue]; END. BooleDebug.mesa Copyright c 1984 by Xerox Corporation. All rights reversed. Created by Bertrand Serlet August 30, 1985 11:41:04 am PDT Bertrand Serlet March 26, 1986 1:50:31 am PST Pradeep Sindhu December 2, 1985 6:42:39 pm PST Barth, March 21, 1986 12:47:57 pm PST Κf˜– "Cedar" stylešœ™Jšœ Οmœ1™˜>Kšžœ'žœžœ˜5KšœA˜AKšœU˜UKšžœžœžœ˜Kš žœžœ2žœžœžœžœ˜mKšœ"˜"Kšœžœ#˜-Kšœ4˜4Kšœ.žœo˜£Kšœ˜Jšœ˜—J™Jšœ_˜_J˜Jšžœ˜—J™—…— Ζ@