Cluster:
CEDAR
DEFINITIONS
= BEGIN
nCacheLines: NAT;
skipIFURejects: BOOL;
skipEURejects: BOOL;
fullEU: BOOL;
fullIFU: BOOL;
fullIFUCuts: LIST OF Core.ROPE;
quickIFU: BOOL;
rawIFU: BOOL;
recordPlotData: BOOL;
chrgdMemNodesOk: BOOL;
initIFUVectorWt: BOOL;
initEUVectorWt: BOOL;
lastKs: KitchenSink;
Instances: TYPE = {ifu, eu, eCache, iCache};
historySize: NAT = 20;
OpaqueKitchenSink: TYPE = REF ANY;
KitchenSink: TYPE = REF KitchenSinkRec;
KitchenSinkRec:
TYPE =
RECORD [
controlPanel: ControlPanel ← NIL,
log: Core.STREAM ← NIL,
lizardSimulation: LizardSimulation ← NIL,
rosemarySimulation: Rosemary.Simulation ← NIL,
rosemaryStores: LIST OF REF ANY ← NIL,
clusterIOPort: Ports.Port ← NIL,
vm: CacheOps.VirtualMemory ← NIL,
iCache: CacheOps.Cache ← NIL,
eCache: CacheOps.Cache ← NIL,
protCyclesAfterReject: CARDINAL ← 0,
ifuSimulation: Rosemary.Simulation ← NIL,
ifuSimulationTruthPort: Ports.Port ← NIL,
ifuSimulationTestPort: Ports.Port ← NIL,
ifuDisplay: RosemaryUser.RoseDisplay ← NIL,
ifuVectors: RosemaryVector.VectorFile ← NIL,
ifuScanBuffer: IFUPublic.ScanRef ← NIL,
euSimulation: Rosemary.Simulation ← NIL,
euPort: Ports.Port ← NIL,
euSimulationTruthPort: Ports.Port ← NIL,
euSimulationTestPort: Ports.Port ← NIL,
euReject: CoreFlat.FlatWire ← NIL,
euDisplay: RosemaryUser.RoseDisplay ← NIL,
euVectors: RosemaryVector.VectorFile ← NIL,
diagnostics: Core.ROPE ← NIL,
cluster: Core.CellType ← NIL,
flatCT: ARRAY Instances OF CoreFlat.FlatCellType ← ALL[NIL],
coreInsts: ARRAY Instances OF CoreClasses.CellInstance ← ALL[NIL],
stateTop: ARRAY [0..historySize) OF ClusterState,
stateFull: ARRAY [0..historySize) OF ClusterState ];
ClusterState:
TYPE =
RECORD [
refCy: REF INT ← NIL,
refPh: REF Dragon.Phase ← NIL,
data: ARRAY Instances OF REF ANY ← ALL[NIL] ];
LizardSimulation: TYPE = REF LizardSimulationRec;
LizardSimulationRec:
TYPE =
RECORD [
processor: LizardHeart.Processor ← NIL,
control: LizardHeart.Control ← nextInst,
euCache: LizardCache.CacheBase,
lastInstrOps: LIST OF REF ANY ← NIL ]; -- RegStore, CacheTrans
ControlPanel: TYPE = REF ControlPanelRec;
ControlPanelRec:
TYPE =
RECORD [
diagnostic: Core.ROPE ← NIL,
cycle: INT ← 0,
slowFromCycle: INT ← 10000000,
instrCount: INT ← 0,
slowFromInstr: INT ← 10000000,
phase: Dragon.Phase ← a,
stopInPh: ARRAY Dragon.Phase OF BOOL ← ALL[TRUE],
repeatPhase: BOOL ← FALSE,
sampleFullIFU: BOOL ← TRUE,
proceedFromCompareTest: BOOL ← FALSE,
proceedFromCheckPort: BOOL ← FALSE,
continueTestFromAbort: BOOL ← FALSE,
reset: BOOL ← FALSE,
resched: BOOL ← FALSE,
enaECacheLog: BOOL ← FALSE,
enaIFULog: BOOL ← FALSE,
enaIFUVectorWt: BOOL ← FALSE,
enaEULog: BOOL ← FALSE,
enaEUVectorWt: BOOL ← FALSE,
lizardToo: BOOL ← TRUE,
emulateBreakpoint: BOOL ← TRUE,
randomSeed: INT ← 0,
randomCycleLimit: INT ← 0,
ifuDebugScanOut: BOOL ← FALSE,
ifuDebugScanLoc: INT ← 0,
recordPlotData: BOOL ← TRUE,
chrgdMemNodesOk: BOOL ← FALSE,
running: BOOL ← FALSE,
msg: Core.ROPE ← NIL ];
StartNewLizard: PROC [ m: REF -- CacheOps.VM -- ] RETURNS [ sim: LizardSimulation];
SetSuccessHalt: PROC[new: BOOL];
GetSuccessHalt: PROC RETURNS[BOOL];
Breakpoint: SIGNAL;
DefaultCheckSynch: IFUTop.CheckSynchProc;
CSProcRec: TYPE = RECORD [proc: IFUTop.CheckSynchProc];
csProcRec: CSProcRec; -- for easy replacement
MakeCluster: PROC RETURNS [ks: KitchenSink];
DoCluster: PROC [ks: KitchenSink, diagnostic: Core.ROPE ← NIL];
GetPublicBool: PROC [ks: KitchenSink, signal: ATOM] RETURNS [value: BOOL];
SetPublicBool: PROC [ks: KitchenSink, signal: ATOM, value: BOOL];
SetPublic: PROC [ks: KitchenSink, signal: ATOM, value: REF ANY];
SetPublicAndSettle: PROC [ks: KitchenSink, signal: ATOM, value: REF ANY];
END.