IF PhA
THEN
BEGIN
op0: BOOL = BitOps.EBFW[PreOpA, 8, 0];
op1: BOOL = BitOps.EBFW[PreOpA, 8, 1];
op2: BOOL = BitOps.EBFW[PreOpA, 8, 2];
not2: BOOL = NOT (op0 AND NOT op1); -- OpLength[op]#2
not3: BOOL = NOT (op0 AND op1); -- OpLength[op]#3
not5: BOOL = NOT (NOT op0 AND NOT op1 AND op2); -- OpLength[op]#5
len0: BOOL = NOT not5;
len1: BOOL = NOT (not2 AND not3);
len2: BOOL = not2;
PreLengthAB ← BitOps.IBIW[len0, PreLengthAB, 3, 0];
PreLengthAB ← BitOps.IBIW[len1, PreLengthAB, 3, 1];
PreLengthAB ← BitOps.IBIW[len2, PreLengthAB, 3, 2];
InstReadyAB ← NOT (NHas1A OR NOT (not2 OR Has2A) OR NOT (not3 OR Has3A) OR NOT (not5 OR Has5A));
IPCmdA ← IF newFetchBA THEN Fetch ELSE NoOp;
IPData ← BitOps.InsertLongInDouble[source: preFetchPCWord[b], container: IPData, containerWidth: 32, fieldPosition: 0, fieldWidth: 32];
state[a] ← state[b];
preFetchPCWord[a] ←
SELECT
TRUE
FROM
NOT DHold0BA AND newFetchBA => preFetchPCWord[b]+1,
ENDCASE => preFetchPCWord[b];
firstByteOffset[a] ← firstByteOffset[b];
pParityErrorAB ← (
NOT DHold0BA
AND successfulFetchBA)
AND (CacheOps.Parity32[pDataBA] # pParityBA);
NoneValidAB ← NHas1A;
noRoomForMoreAB ← NoRoomForMoreA;
END; -- of PhA evaluation
IF PhB
THEN
BEGIN
Dragon.Assert[NOT (IPFaultB # None AND NOT IPRejectB)];
Dragon.Assert[NOT (GetNextInstB AND JumpB)];
Dragon.Assert[NOT (GetNextInstB AND NOT InstReadyAB)];
PreFetchFaultedBA ← state[a] = faulted AND NOT InstReadyAB AND NOT JumpB;
IF pParityErrorAB THEN IPNPErrorB ← FALSE;
pDataBA ← BitOps.ExtractLongFDouble[container: IPData, containerWidth: 32, fieldPosition: 0, fieldWidth: 32]; -- latch for parity check
pParityBA ← IPParityB;
FetchFinishedB ← successfulFetchBA ←
NOT DHold1AB
AND NOT IPRejectB
AND NOT JumpB
AND state[a] IN [fetchingFirst..fetchingMore];
state[b] ←
SELECT
TRUE
FROM
DHold1AB => state[a],
JumpB AND IPRejectB => pendingJump,
NOT IPRejectB AND (JumpB OR state[a] = pendingJump) => fetchingFirst,
state[a] IN [fetchingFirst..fetchingMore] AND IPFaultB # None => faulted,
IPRejectB, state[a] = faulted => state[a],
NOT noRoomForMoreAB => fetchingMore,
ENDCASE => full;
newFetchBA ←
NOT IPRejectB
AND state[b]
IN [fetchingFirst..fetchingMore];
IF (FlushB ←
NOT DHold1AB
AND JumpB)
THEN
BEGIN
firstByteOffset[b] ← BitOps.ExtractLongFDouble[container: XBus, containerWidth: 32, fieldPosition: 0, fieldWidth: 32] MOD 4;
preFetchPCWord[b] ← BitOps.ExtractLongFDouble[container: XBus, containerWidth: 32, fieldPosition: 0, fieldWidth: 32]/4;
END
ELSE
BEGIN
firstByteOffset[b] ← firstByteOffset[a];
preFetchPCWord[b] ← preFetchPCWord[a];
END;
Take1B ← GetNextInstB OR ((state[a]=fetchingFirst AND NOT IPRejectB) AND (firstByteOffset[a]>=1));
Take2B ← (GetNextInstB AND (PreLengthAB>=2)) OR ((state[a]=fetchingFirst AND NOT IPRejectB) AND (firstByteOffset[a]>=2));
Take3B ← (GetNextInstB AND (PreLengthAB>=3)) OR ((state[a]=fetchingFirst AND NOT IPRejectB) AND (firstByteOffset[a]>=3));
Take5B ← GetNextInstB AND (PreLengthAB>=5);
END; -- of PhB evaluation