Cluster2:
CEDAR
DEFINITIONS
= BEGIN
Instances: TYPE = {iCache, eCache, eu, ifu};
historySize: NAT = 20;
ClusterState:
TYPE =
RECORD [
cycle: INT ← 0,
phase: Dragon.Phase ← a,
data: ARRAY Instances OF REF ANY ← ALL[NIL]
];
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, eCache: CacheOps.Cache ← NIL,
euSimulation: Rosemary.Simulation ← NIL,
euPort: Ports.Port ← NIL,
euSimulationTruthPort: Ports.Port ← NIL,
euSimulationTestPort: Ports.Port ← NIL,
euFlatInstance: CoreFlat.FlatInstance ← NIL,
euCyclesFromReject: CARDINAL ← 0,
euReject: CoreFlat.FlatWire ← NIL,
euDisplay: RosemaryUser.RoseDisplay ← NIL,
diagnostics: Core.ROPE ← NIL,
cluster: Core.CellType ← NIL,
coreInsts: ARRAY Instances OF CoreClasses.CellInstance ← ALL[NIL],
state: ARRAY [0..historySize) OF ClusterState
];
LizardSimulation: TYPE = REF LizardSimulationRec;
LizardSimulationRec:
TYPE =
RECORD [
processor: LizardHeart.Processor ← NIL,
control: LizardHeart.Control ← nextInst,
euCache: LizardCache.CacheBase,
lastInstrOps: LIST OF REF ANY -- RegStore, CacheTrans -- ← NIL
];
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,
continueTestFromAbort: BOOL ← FALSE,
reset, resched: BOOL ← FALSE,
enaECacheLog: BOOL ← FALSE,
enaIFULog: BOOL ← FALSE,
enaEULog: BOOL ← FALSE,
lizardToo: BOOL ← TRUE,
emulateBreakpoint: BOOL ← TRUE,
randomSeed: INT ← 0,
randomCycleLimit: INT ← 0,
running: BOOL ← FALSE,
msg: Core.ROPE ← NIL
];
StartNewLizard: PROC [ m: REF -- CacheOps.VM -- ] RETURNS [ sim: LizardSimulation ];
SuccessHalt: ERROR;
Breakpoint: SIGNAL;
DefaultCheckSynch: IFU2.CheckSynchProc;
CSProcRec: TYPE = RECORD [proc: IFU2.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.