Expand
P Interfaces for instruction cache
IPData: INT[32]; -- address to cache during PhA, data to/from cache during PhB
IPCmd: Mnemonic["PBusCommands"]; -- during PhA
IPReject: BOOL; -- during PhB
IPFault: BOOL; -- during PhB
IPPageFault: BOOL; -- during PhB
IPParity: BOOL; -- during PhB
IPNPError: BOOL;
Interface within IFU
InstReadyA: BOOL; -- generated during PhA
PreOpA, PreAlphaA, PreBetaA, PreGammaA, PreDeltaA: INT[8]; -- generated during PhA
PreLengthA: INT[3]; -- generated during PhA
GetNextInstB, JumpB: BOOL; -- used during PhB
JumpTargetB: INT[32]; -- used during PhB
PreFetchFaultedB: BOOL; -- generated during PhB (there's no hurry)
Main memory interface .. not used
MData: INT[32];
MCmd: Mnemonic["MBusCommands"];
MNShared: BOOL;
MParity: BOOL;
MNError: BOOL;
MReady: BOOL;
MRq: BOOL;
MNewRq: BOOL;
MGnt: BOOL;
fetcher: IFetcher[];
cache: Cache[PData: IPData, PCmd: IPCmd, PReject: IPReject, PFault: IPFault, PPageFault: IPPageFault, PParity: IPParity, PNPError: IPNPError];
decoder: SimpleIDecoder[]
BlackBoxTest
realHandle: REF RoseTesting.CellTestHandleRep;
oldIO, newIO: IFetcherTestIORef;
TRUSTED {realHandle ← LOOPHOLE[handle]};
oldIO ← NARROW[realHandle.tester.realCellStuff.oldIO];
newIO ← NARROW[realHandle.tester.realCellStuff.newIO];
instructions^ ← newIO^;
IF oldIO^ = newIO^
AND (PhA
OR PhB)
THEN
BEGIN -- user did nothing, so we push the simulation along ourselves
wasPhA: BOOL = PhA;
PhA ← PhB ← FALSE;
[] ← RoseRun.Eval[handle];
PhB ← wasPhA;
PhA ← NOT wasPhA;
[] ← RoseRun.Eval[handle];
END;
[] ← RoseRun.Eval[handle];
[] ← RoseRun.Eval[handle]