RosemaryUser.mesa
Copyright © 1985, 1986 by Xerox Corporation. All rights reserved.
Barth, February 17, 1987 10:58:08 am PST
Bertrand Serlet October 17, 1986 10:03:12 pm PDT
DIRECTORY Buttons, ChoiceButtons, Core, CoreFlat, HashTable, IO, PlotGraph, Ports, Rosemary, ViewerClasses;
RosemaryUser: CEDAR DEFINITIONS = BEGIN
ROPE: TYPE = Core.ROPE;
Client Controlled Simulations
DisplayViewer: PROC [simulation: Rosemary.Simulation, cellType: Core.CellType, name: ROPENIL, displayWires: CoreFlat.FlatWires ← NIL, graphWires: CoreFlat.FlatWires ← NIL] RETURNS [handle: RoseDisplay];
LogSettle: PROC [handle: RoseDisplay, time: INT];
Same as Rosemary.Settle but pays attention to the log button and records changes.
UpdateDisplay: PROC [handle: RoseDisplay];
InitializeDeltas: PROC [handle: RoseDisplay];
Resets the initial state of all the wires to the current state.
RecordDelta: PROC [handle: RoseDisplay, wire: Rosemary.RoseWire, time: INT];
Must be called from a Rosemary.UpdateProc if plotting is to be used.
DeltaFinished: PROC [handle: RoseDisplay, time: INT];
Says that data is valid up to time.
WireTimeValue: PROC [handle: RoseDisplay, flatWire: CoreFlat.FlatWire, time: INT] RETURNS [value: Ports.LevelSequence];
Gets the value of the wire. May raise Rosemary.NotInstantiated.
Test Procedure Simulations
TestProcedureViewer: PROC [cellType: Core.CellType, testButtons: LIST OF ROPE, name: ROPENIL, displayWires: CoreFlat.FlatWires ← NIL, graphWires: CoreFlat.FlatWires ← NIL, cutSet: CoreFlat.CutSet ← NIL, historySize: NAT ← 0, steady: BOOLFALSE, recordDeltas: BOOLTRUE] RETURNS [tester: Tester];
StartTest: PROC [tester: Tester];
SetProceedUntil: PROC [tester: Tester, count: INT];
RegisterTestProc: PROC [name: ROPE, proc: TestProc];
TestProc: TYPE = PROC [cellType: Core.CellType, p: Ports.Port, Eval: PROC [memory: BOOLTRUE]];
Wire Display
DisplayPortLeafWires: PROC [root: Core.CellType, flatCell: CoreFlat.FlatCellTypeRec ← CoreFlat.rootCellType] RETURNS [displayWires: CoreFlat.FlatWires];
AddWireToPlot: PROC [handle: RoseDisplay, wire: CoreFlat.FlatWire] RETURNS [msg: Core.ROPENIL];
RemoveWireFromPlot: PROC [handle: RoseDisplay, wire: CoreFlat.FlatWire] RETURNS [found: BOOLFALSE];
Data Structures
Not intended to be understood by clients.
Tester: TYPE = REF TesterRec;
TesterRec: TYPE = RECORD [
intermediatePort: Ports.Port ← NIL,
runState: ViewerClasses.Viewer ← NIL,
evalsSinceStart: ViewerClasses.Viewer ← NIL,
evalSinceStartCount: INT,
proceedUntil: ViewerClasses.Viewer ← NIL,
evalUntil: INT,
historyTrigger: ViewerClasses.Viewer ← NIL,
historyTriggerCount: INT,
currentStatePoint: NAT ← 0,
displayedStatePoint: NAT ← 0,
validStates: NAT ← 0,
historySize: NAT ← 0,
testVectorBuffer: Rosemary.PortSequence ← NIL,
proceed: CONDITION,
testStarted: BOOLFALSE,
waiting: BOOLFALSE,
abort: BOOLFALSE,
interrupt: BOOLFALSE,
singleEval: BOOLFALSE,
testButtonList: LIST OF Buttons.Button,
currentTestProc: ROPENIL,
display: RoseDisplay ← NIL,
steadyInit: BOOLTRUE,
recordDeltas: BOOLTRUE];
RoseDisplay: TYPE = REF RoseDisplayRec;
RoseDisplayRec: TYPE = RECORD [
name: Core.ROPENIL,
cellType: Core.CellType,
simulation: Rosemary.Simulation,
displayWires: LIST OF ChoiceButtons.PromptDataRef ← NIL,
tsin: IO.STREAMNIL,
tsout: IO.STREAMNIL,
path: ViewerClasses.Viewer ← NIL,
currentWire: ViewerClasses.Viewer ← NIL,
plot: PlotGraph.Plot ← NIL,
ps: IO.STREAMNIL,
psLock: BOOLFALSE,
psWait: CONDITION,
psHash: HashTable.Table ← NIL,
lastValidTime: INT ← -1,
wDir: REF ANYNIL,
logChanges: BOOLFALSE,
cutSet: CoreFlat.CutSet ← NIL];
END.