CacheMInterfaceMEntryCtl.Mesa
created by RoseTranslate from CacheMInterfaceMEntryCtl.Rose of January 30, 1985 8:50:09 am PST for curry.pa at January 30, 1985 8:50:17 am PST
DIRECTORY
RoseTypes, RoseCreate, CacheOps, BitOps, BitSwOps, Dragon, SwitchTypes;
CacheMInterfaceMEntryCtl:
CEDAR
PROGRAM
IMPORTS RoseCreate, BitOps, BitSwOps, Dragon =
BEGIN
OPEN
RoseTypes, BitOps, BitSwOps, Dragon;
Signal Type decls
PreFetchAdrCmd: TYPE = CacheOps.PreFetchAdrCmd;
RegisterCells:
PROC =
BEGIN
[] ← RoseCreate.RegisterCellType[name: "MEntryCtl",
expandProc: NIL,
ioCreator: CreateMEntryCtlIO, initializer: InitializeMEntryCtl,
evals: [EvalSimple: MEntryCtlEvalSimple],
blackBox: NIL, stateToo: NIL,
ports: CreateMEntryCtlPorts[],
drivePrototype: NEW [MEntryCtlDrive]];
END;
otherss: SymbolTable ← RoseCreate.GetOtherss["CacheMInterfaceMEntryCtl.pass"];
CreateMEntryCtlPorts: PROC RETURNS [ports: Ports] = {ports ← RoseCreate.PortsFromFile["CacheMInterfaceMEntryCtl.MEntryCtl.rosePorts"]};
MEntryCtlIORef: TYPE = REF MEntryCtlIORec;
MEntryCtlIORec:
TYPE =
MACHINE
DEPENDENT
RECORD [
fill0(0:0..14): [0..32767],
Vdd(0:15..15): BOOLEAN,
fill1(1:0..14): [0..32767],
Gnd(1:15..15): BOOLEAN,
fill2(2:0..14): [0..32767],
PhAb(2:15..15): BOOLEAN,
fill3(3:0..14): [0..32767],
PhBb(3:15..15): BOOLEAN,
fill4(4:0..14): [0..32767],
Resetb(4:15..15): BOOLEAN,
QValidA(5:0..15): SwitchTypes.SwitchVal,
nQValidA(6:0..15): SwitchTypes.SwitchVal,
QSharedA(7:0..15): SwitchTypes.SwitchVal,
nQSharedA(8:0..15): SwitchTypes.SwitchVal,
QMasterA(9:0..15): SwitchTypes.SwitchVal,
nQMasterA(10:0..15): SwitchTypes.SwitchVal,
fill11(11:0..11): [0..4095],
MQSelBA(11:12..15): [0..15],
fill12(12:0..11): [0..4095],
MatchQSelBA(12:12..15): [0..15],
fill13(13:0..11): [0..4095],
nQDirtyB(13:12..15): [0..15],
RPValidBitA(14:0..15): SwitchTypes.SwitchVal,
nRPValidBitA(15:0..15): SwitchTypes.SwitchVal,
RPDirtyBitA(16:0..15): SwitchTypes.SwitchVal,
nRPDirtyBitA(17:0..15): SwitchTypes.SwitchVal,
VPValidBitA(18:0..15): SwitchTypes.SwitchVal,
nVPValidBitA(19:0..15): SwitchTypes.SwitchVal,
fill20(20:0..14): [0..32767],
ForceAllDataSelectsBA(20:15..15): BOOLEAN,
fill21(21:0..8): [0..511],
CellAdrBA(21:9..15): [0..127],
fill22(22:0..8): [0..511],
nCellAdrBA(22:9..15): [0..127],
fill23(23:0..14): [0..32767],
SelOrphanAdrBA(23:15..15): BOOLEAN,
fill24(24:0..14): [0..32767],
SelMapAdrBA(24:15..15): BOOLEAN,
fill25(25:0..14): [0..32767],
SelVPBA(25:15..15): BOOLEAN,
fill26(26:0..14): [0..32767],
SelRPVictimBA(26:15..15): BOOLEAN,
fill27(27:0..14): [0..32767],
SelRPDecoderBA(27:15..15): BOOLEAN,
fill28(28:0..14): [0..32767],
SelRealDataBA(28:15..15): BOOLEAN,
fill29(29:0..14): [0..32767],
SelDecodeBA(29:15..15): BOOLEAN,
fill30(30:0..14): [0..32767],
SenseVictimA(30:15..15): BOOLEAN,
fill31(31:0..11): [0..4095],
PAdr2831AB(31:12..15): [0..15],
fill32(32:0..14): [0..32767],
DriveVirtualPageAdrBA(32:15..15): BOOLEAN,
fill33(33:0..14): [0..32767],
DriveVirtualBlockAdrBA(33:15..15): BOOLEAN,
MDataI(34:0..31): ARRAY [0..2) OF CARDINAL,
fill35(36:0..14): [0..32767],
SetSharedA(36:15..15): BOOLEAN,
fill36(37:0..14): [0..32767],
ResetMasterA(37:15..15): BOOLEAN,
fill37(38:0..14): [0..32767],
SetRPDirtyVPValidA(38:15..15): BOOLEAN,
fill38(39:0..14): [0..32767],
FlagLatchB(39:15..15): BOOLEAN,
fill39(40:0..14): [0..32767],
SetFlagsA(40:15..15): BOOLEAN,
fill40(41:0..14): [0..32767],
IncrementVictimBA(41:15..15): BOOLEAN,
fill41(42:0..14): [0..32767],
IncrementMAdrCtrB(42:15..15): BOOLEAN,
fill42(43:0..14): [0..32767],
ZeroMAdrCtrB(43:15..15): BOOLEAN,
fill43(44:0..14): [0..32767],
SampleDirtyBitsB(44:15..15): BOOLEAN,
fill44(45:0..14): [0..32767],
DeleteDirtyBitB(45:15..15): BOOLEAN,
fill45(46:0..14): [0..32767],
VictimSelectBA(46:15..15): BOOLEAN,
fill46(47:0..14): [0..32767],
RefreshToDecoderBA(47:15..15): BOOLEAN,
fill47(48:0..14): [0..32767],
IfGrantThenGetAdrElseRefreshToDecoderBA(48:15..15): BOOLEAN,
fill48(49:0..14): [0..32767],
FetchAddressBA(49:15..15): BOOLEAN,
fill49(50:0..14): [0..32767],
DirtyBitsToMQSelBA(50:15..15): BOOLEAN,
fill50(51:0..14): [0..32767],
SamplePAdr2831B(51:15..15): BOOLEAN,
fill51(52:0..14): [0..32767],
SampleMAdr2831B(52:15..15): BOOLEAN,
fill52(53:0..14): [0..32767],
Adr2829ToMQSelBA(53:15..15): BOOLEAN,
fill53(54:0..14): [0..32767],
AddressBitsToMDataIA(54:15..15): BOOLEAN,
fill54(55:0..14): [0..32767],
VictimAddressBitsToMDataIA(55:15..15): BOOLEAN,
fill55(56:0..14): [0..32767],
SelectRPBA(56:15..15): BOOLEAN,
fill56(57:0..14): [0..32767],
SelectVPVictimOrOrphanBA(57:15..15): BOOLEAN,
fill57(58:0..14): [0..32767],
SelectRealDataBA(58:15..15): BOOLEAN,
fill58(59:0..14): [0..32767],
SelVictimOrOrphanBA(59:15..15): BOOLEAN,
fill59(60:0..14): [0..32767],
RefreshIfRefVirtualBA(60:15..15): BOOLEAN,
fill60(61:0..14): [0..32767],
SenseVictimBA(61:15..15): BOOLEAN,
fill61(62:0..13): [0..16383],
GetAdrCmdBA(62:14..15): PreFetchAdrCmd,
fill62(63:0..14): [0..32767],
IsCleanBA(63:15..15): BOOLEAN,
fill63(64:0..14): [0..32767],
LatchSharedBA(64:15..15): BOOLEAN,
fill64(65:0..14): [0..32767],
MasterBA(65:15..15): BOOLEAN,
fill65(66:0..14): [0..32767],
MatchRealBlockAB(66:15..15): BOOLEAN,
fill66(67:0..14): [0..32767],
ContinueBA(67:15..15): BOOLEAN,
fill67(68:0..14): [0..32767],
OneDirtyBA(68:15..15): BOOLEAN,
fill68(69:0..14): [0..32767],
SomeDirtyBA(69:15..15): BOOLEAN,
fill69(70:0..13): [0..16383],
MAdr3031BA(70:14..15): [0..3]];
port indices:
MEntryCtlQValidAPortIndex: CARDINAL = 5;
MEntryCtlNQValidAPortIndex: CARDINAL = 6;
MEntryCtlQSharedAPortIndex: CARDINAL = 7;
MEntryCtlNQSharedAPortIndex: CARDINAL = 8;
MEntryCtlQMasterAPortIndex: CARDINAL = 9;
MEntryCtlNQMasterAPortIndex: CARDINAL = 10;
MEntryCtlRPValidBitAPortIndex: CARDINAL = 14;
MEntryCtlNRPValidBitAPortIndex: CARDINAL = 15;
MEntryCtlRPDirtyBitAPortIndex: CARDINAL = 16;
MEntryCtlNRPDirtyBitAPortIndex: CARDINAL = 17;
MEntryCtlVPValidBitAPortIndex: CARDINAL = 18;
MEntryCtlNVPValidBitAPortIndex: CARDINAL = 19;
MEntryCtlDrive:
TYPE =
MACHINE
DEPENDENT
RECORD [
fill0(0:0..14): [0 .. 32768),
Vdd(0:15..15): BOOLEAN,
fill1(1:0..14): [0 .. 32768),
Gnd(1:15..15): BOOLEAN,
fill2(2:0..14): [0 .. 32768),
PhAb(2:15..15): BOOLEAN,
fill3(3:0..14): [0 .. 32768),
PhBb(3:15..15): BOOLEAN,
fill4(4:0..14): [0 .. 32768),
Resetb(4:15..15): BOOLEAN,
fill5(5:0..14): [0 .. 32768),
QValidA(5:15..15): BOOLEAN,
fill6(6:0..14): [0 .. 32768),
nQValidA(6:15..15): BOOLEAN,
fill7(7:0..14): [0 .. 32768),
QSharedA(7:15..15): BOOLEAN,
fill8(8:0..14): [0 .. 32768),
nQSharedA(8:15..15): BOOLEAN,
fill9(9:0..14): [0 .. 32768),
QMasterA(9:15..15): BOOLEAN,
fill10(10:0..14): [0 .. 32768),
nQMasterA(10:15..15): BOOLEAN,
fill11(11:0..14): [0 .. 32768),
MQSelBA(11:15..15): BOOLEAN,
fill12(12:0..14): [0 .. 32768),
MatchQSelBA(12:15..15): BOOLEAN,
fill13(13:0..14): [0 .. 32768),
nQDirtyB(13:15..15): BOOLEAN,
fill14(14:0..14): [0 .. 32768),
RPValidBitA(14:15..15): BOOLEAN,
fill15(15:0..14): [0 .. 32768),
nRPValidBitA(15:15..15): BOOLEAN,
fill16(16:0..14): [0 .. 32768),
RPDirtyBitA(16:15..15): BOOLEAN,
fill17(17:0..14): [0 .. 32768),
nRPDirtyBitA(17:15..15): BOOLEAN,
fill18(18:0..14): [0 .. 32768),
VPValidBitA(18:15..15): BOOLEAN,
fill19(19:0..14): [0 .. 32768),
nVPValidBitA(19:15..15): BOOLEAN,
fill20(20:0..14): [0 .. 32768),
ForceAllDataSelectsBA(20:15..15): BOOLEAN,
fill21(21:0..14): [0 .. 32768),
CellAdrBA(21:15..15): BOOLEAN,
fill22(22:0..14): [0 .. 32768),
nCellAdrBA(22:15..15): BOOLEAN,
fill23(23:0..14): [0 .. 32768),
SelOrphanAdrBA(23:15..15): BOOLEAN,
fill24(24:0..14): [0 .. 32768),
SelMapAdrBA(24:15..15): BOOLEAN,
fill25(25:0..14): [0 .. 32768),
SelVPBA(25:15..15): BOOLEAN,
fill26(26:0..14): [0 .. 32768),
SelRPVictimBA(26:15..15): BOOLEAN,
fill27(27:0..14): [0 .. 32768),
SelRPDecoderBA(27:15..15): BOOLEAN,
fill28(28:0..14): [0 .. 32768),
SelRealDataBA(28:15..15): BOOLEAN,
fill29(29:0..14): [0 .. 32768),
SelDecodeBA(29:15..15): BOOLEAN,
fill30(30:0..14): [0 .. 32768),
SenseVictimA(30:15..15): BOOLEAN,
fill31(31:0..14): [0 .. 32768),
PAdr2831AB(31:15..15): BOOLEAN,
fill32(32:0..14): [0 .. 32768),
DriveVirtualPageAdrBA(32:15..15): BOOLEAN,
fill33(33:0..14): [0 .. 32768),
DriveVirtualBlockAdrBA(33:15..15): BOOLEAN,
fill34(34:0..14): [0 .. 32768),
MDataI(34:15..15): BOOLEAN,
fill35(35:0..14): [0 .. 32768),
SetSharedA(35:15..15): BOOLEAN,
fill36(36:0..14): [0 .. 32768),
ResetMasterA(36:15..15): BOOLEAN,
fill37(37:0..14): [0 .. 32768),
SetRPDirtyVPValidA(37:15..15): BOOLEAN,
fill38(38:0..14): [0 .. 32768),
FlagLatchB(38:15..15): BOOLEAN,
fill39(39:0..14): [0 .. 32768),
SetFlagsA(39:15..15): BOOLEAN,
fill40(40:0..14): [0 .. 32768),
IncrementVictimBA(40:15..15): BOOLEAN,
fill41(41:0..14): [0 .. 32768),
IncrementMAdrCtrB(41:15..15): BOOLEAN,
fill42(42:0..14): [0 .. 32768),
ZeroMAdrCtrB(42:15..15): BOOLEAN,
fill43(43:0..14): [0 .. 32768),
SampleDirtyBitsB(43:15..15): BOOLEAN,
fill44(44:0..14): [0 .. 32768),
DeleteDirtyBitB(44:15..15): BOOLEAN,
fill45(45:0..14): [0 .. 32768),
VictimSelectBA(45:15..15): BOOLEAN,
fill46(46:0..14): [0 .. 32768),
RefreshToDecoderBA(46:15..15): BOOLEAN,
fill47(47:0..14): [0 .. 32768),
IfGrantThenGetAdrElseRefreshToDecoderBA(47:15..15): BOOLEAN,
fill48(48:0..14): [0 .. 32768),
FetchAddressBA(48:15..15): BOOLEAN,
fill49(49:0..14): [0 .. 32768),
DirtyBitsToMQSelBA(49:15..15): BOOLEAN,
fill50(50:0..14): [0 .. 32768),
SamplePAdr2831B(50:15..15): BOOLEAN,
fill51(51:0..14): [0 .. 32768),
SampleMAdr2831B(51:15..15): BOOLEAN,
fill52(52:0..14): [0 .. 32768),
Adr2829ToMQSelBA(52:15..15): BOOLEAN,
fill53(53:0..14): [0 .. 32768),
AddressBitsToMDataIA(53:15..15): BOOLEAN,
fill54(54:0..14): [0 .. 32768),
VictimAddressBitsToMDataIA(54:15..15): BOOLEAN,
fill55(55:0..14): [0 .. 32768),
SelectRPBA(55:15..15): BOOLEAN,
fill56(56:0..14): [0 .. 32768),
SelectVPVictimOrOrphanBA(56:15..15): BOOLEAN,
fill57(57:0..14): [0 .. 32768),
SelectRealDataBA(57:15..15): BOOLEAN,
fill58(58:0..14): [0 .. 32768),
SelVictimOrOrphanBA(58:15..15): BOOLEAN,
fill59(59:0..14): [0 .. 32768),
RefreshIfRefVirtualBA(59:15..15): BOOLEAN,
fill60(60:0..14): [0 .. 32768),
SenseVictimBA(60:15..15): BOOLEAN,
fill61(61:0..14): [0 .. 32768),
GetAdrCmdBA(61:15..15): BOOLEAN,
fill62(62:0..14): [0 .. 32768),
IsCleanBA(62:15..15): BOOLEAN,
fill63(63:0..14): [0 .. 32768),
LatchSharedBA(63:15..15): BOOLEAN,
fill64(64:0..14): [0 .. 32768),
MasterBA(64:15..15): BOOLEAN,
fill65(65:0..14): [0 .. 32768),
MatchRealBlockAB(65:15..15): BOOLEAN,
fill66(66:0..14): [0 .. 32768),
ContinueBA(66:15..15): BOOLEAN,
fill67(67:0..14): [0 .. 32768),
OneDirtyBA(67:15..15): BOOLEAN,
fill68(68:0..14): [0 .. 32768),
SomeDirtyBA(68:15..15): BOOLEAN,
fill69(69:0..14): [0 .. 32768),
MAdr3031BA(69:15..15): BOOLEAN];
CreateMEntryCtlIO:
PROC [cell: Cell]
--IOCreator-- = {
cell.realCellStuff.switchIO ← NEW [MEntryCtlIORec];
cell.realCellStuff.newIO ← NEW [MEntryCtlIORec];
cell.realCellStuff.oldIO ← NEW [MEntryCtlIORec];
};
MEntryCtlStateRef: TYPE = REF MEntryCtlStateRec;
MEntryCtlStateRec:
TYPE =
RECORD [
RefreshCountAB, RefreshCountBA: CARDINAL,
VictimCountAB, VictimCountBA: CARDINAL,
MAdrCtrAB, MAdrCtrBA: CARDINAL,
IncrementVictimAB: BOOL,
LatchVPValidBA, LatchRPDirtyBA: BOOL,
VictimDirtyBitsAB, VictimDirtyBitsBA: BitWord,
Adr2829BA, FirstDirty: CARDINAL,
Intermediate values, not actual state bits
DoGetAdrBA, DoRefreshBA, VictimDataSelectBA, ReallyVictimToDecoderBA: BOOL
];
InitializeMEntryCtl: Initializer = {
IF leafily
THEN
BEGIN
state: MEntryCtlStateRef ← NEW [MEntryCtlStateRec];
cell.realCellStuff.state ← state;
END;
};
MEntryCtlEvalSimple: CellProc =
BEGIN
sw: MEntryCtlIORef ← NARROW[cell.realCellStuff.switchIO];
newIO: MEntryCtlIORef ← NARROW[cell.realCellStuff.newIO];
state: MEntryCtlStateRef ←
NARROW[cell.realCellStuff.state];
BEGIN
OPEN newIO, state;
DriveBit:
PROC[bit, nBit: Switch, dBit:
BOOL]
RETURNS [newBit, newNBit: Switch] = {
newBit ← SIBISS[dBit, bit, [[driveStrong, L], [driveStrong, H]]];
newNBit ← SIBISS[dBit, nBit, [[driveStrong, H], [driveStrong, L]]];
};
{
s: SwitchTypes.Strength ← IF PhBb THEN drive ELSE none;
VPValidBitA ← SIBISS[TRUE, VPValidBitA, [[none, X], [s, H]]];
nVPValidBitA ← SIBISS[TRUE, nVPValidBitA, [[none, X], [s, H]]];
RPValidBitA ← SIBISS[TRUE, RPValidBitA, [[none, X], [s, H]]];
nRPValidBitA ← SIBISS[TRUE, nRPValidBitA, [[none, X], [s, H]]];
RPDirtyBitA ← SIBISS[TRUE, RPDirtyBitA, [[none, X], [s, H]]];
nRPDirtyBitA ← SIBISS[TRUE, nRPDirtyBitA, [[none, X], [s, H]]];
QValidA ← SIBISS[TRUE, QValidA, [[none, X], [s, H]]];
nQValidA ← SIBISS[TRUE, nQValidA, [[none, X], [s, H]]];
QMasterA ← SIBISS[TRUE, QMasterA, [[none, X], [s, H]]];
nQMasterA ← SIBISS[TRUE, nQMasterA, [[none, X], [s, H]]];
QSharedA ← SIBISS[TRUE, QSharedA, [[none, X], [s, H]]];
nQSharedA ← SIBISS[TRUE, nQSharedA, [[none, X], [s, H]]];
};
The next block of code assumes that the instructions have been set to none and only sets the instructions if a strength other than none is to be applied.
Assert[NOT MoreThanOneOf[SetSharedA, SetFlagsA, SetRPDirtyVPValidA]];
IF Resetb
AND PhAb
THEN {
[VPValidBitA, nVPValidBitA] ← DriveBit[VPValidBitA, nVPValidBitA, FALSE];
[RPValidBitA, nRPValidBitA] ← DriveBit[RPValidBitA, nRPValidBitA, FALSE];
[RPDirtyBitA, nRPDirtyBitA] ← DriveBit[RPDirtyBitA, nRPDirtyBitA, FALSE];
[QMasterA, nQMasterA] ← DriveBit[QMasterA, nQMasterA, FALSE];
[QSharedA, nQSharedA] ← DriveBit[QSharedA, nQSharedA, FALSE];
[QValidA, nQValidA] ← DriveBit[QValidA, nQValidA, FALSE];
};
IF SetSharedA THEN [QSharedA, nQSharedA] ← DriveBit[QSharedA, nQSharedA, TRUE];
IF ResetMasterA THEN [QMasterA, nQMasterA] ← DriveBit[QMasterA, nQMasterA, FALSE];
IF SetRPDirtyVPValidA
THEN {
[VPValidBitA, nVPValidBitA] ← DriveBit[VPValidBitA, nVPValidBitA, LatchVPValidBA];
[RPDirtyBitA, nRPDirtyBitA] ← DriveBit[RPDirtyBitA, nRPDirtyBitA, LatchRPDirtyBA];
};
IF FlagLatchB
THEN {
LatchVPValidBA ← EBFD[MDataI, 32, 30];
LatchRPDirtyBA ← EBFD[MDataI, 32, 31];
};
IF SetFlagsA
THEN {
[VPValidBitA, nVPValidBitA] ← DriveBit[VPValidBitA, nVPValidBitA, TRUE];
[RPValidBitA, nRPValidBitA] ← DriveBit[RPValidBitA, nRPValidBitA, TRUE];
[RPDirtyBitA, nRPDirtyBitA] ← DriveBit[RPDirtyBitA, nRPDirtyBitA, NOT IsCleanBA];
[QMasterA, nQMasterA] ← DriveBit[QMasterA, nQMasterA, FALSE];
[QSharedA, nQSharedA] ← DriveBit[QSharedA, nQSharedA, LatchSharedBA];
[QValidA, nQValidA] ← DriveBit[QValidA, nQValidA, TRUE];
};
IF PhAb
THEN {
RefreshCountAB ← IF Resetb THEN 0 ELSE RefreshCountBA;
VictimCountAB ← IF Resetb THEN 0 ELSE VictimCountBA;
VictimDirtyBitsAB ← VictimDirtyBitsBA;
MAdrCtrAB ← MAdrCtrBA;
IncrementVictimAB ← IncrementVictimBA;
};
IF PhBb THEN VictimCountBA ← IF IncrementVictimAB AND NOT MatchRealBlockAB THEN (VictimCountAB+1) MOD 4 ELSE VictimCountAB;
SenseVictimA ← PhAb AND SenseVictimBA AND NOT MatchRealBlockAB;
Assert[NOT MoreThanOneOf[IncrementMAdrCtrB, ZeroMAdrCtrB, SamplePAdr2831B, SampleMAdr2831B]];
IF IncrementMAdrCtrB THEN MAdrCtrBA ← IF ContinueBA THEN ((MAdrCtrAB+1) MOD 4) ELSE MAdrCtrAB;
IF ZeroMAdrCtrB THEN MAdrCtrBA ← 0;
Assert[NOT MoreThanOneOf[SampleDirtyBitsB, DeleteDirtyBitB]];
IF SampleDirtyBitsB THEN VictimDirtyBitsBA ← WNOT[nQDirtyB, 4];
IF PhAb THEN nQDirtyB ← 0FH;
IF DeleteDirtyBitB
THEN
FOR i:[0..4)
IN [0..4)
DO
IF
EBFW[VictimDirtyBitsAB, 4, i]
THEN {
VictimDirtyBitsBA ← IBIW[FALSE, VictimDirtyBitsAB, 4, i];
EXIT;
};
ENDLOOP;
SomeDirtyBA ← FALSE;
FOR i:[0..4)
IN [0..4)
DO
IF
EBFW[VictimDirtyBitsBA, 4, i]
THEN {
OneDirtyBA ← TRUE;
IF SomeDirtyBA THEN OneDirtyBA ← FALSE;
SomeDirtyBA ← TRUE;
};
ENDLOOP;
DoGetAdrBA ← (MasterBA AND IfGrantThenGetAdrElseRefreshToDecoderBA) OR FetchAddressBA;
DoRefreshBA ← (NOT MasterBA AND IfGrantThenGetAdrElseRefreshToDecoderBA) OR RefreshToDecoderBA OR (RefreshIfRefVirtualBA AND GetAdrCmdBA=RefVirtual);
VictimDataSelectBA ← (SelVictimOrOrphanBA AND NOT MatchRealBlockAB) OR VictimSelectBA;
SelMapAdrBA ← DoGetAdrBA AND GetAdrCmdBA=RefRealAssemble;
DriveVirtualPageAdrBA ← (DoGetAdrBA AND GetAdrCmdBA=RefVirtual) OR SelectVPVictimOrOrphanBA;
DriveVirtualBlockAdrBA ← (DoGetAdrBA AND (GetAdrCmdBA=RefRealMap OR GetAdrCmdBA=RefRealAssemble OR GetAdrCmdBA=RefVirtual)) OR SelectVPVictimOrOrphanBA;
SelRPVictimBA ← DoGetAdrBA AND GetAdrCmdBA=VictimReal;
SelRPDecoderBA ← SelectRPBA AND NOT MatchRealBlockAB;
SelVPBA ← SelectVPVictimOrOrphanBA AND NOT MatchRealBlockAB;
SelOrphanAdrBA ← SelectVPVictimOrOrphanBA AND MatchRealBlockAB;
ReallyVictimToDecoderBA ← SelRPDecoderBA OR VictimDataSelectBA;
SelRealDataBA ← SelectRealDataBA OR (SelVictimOrOrphanBA AND MatchRealBlockAB);
SelDecodeBA ← DoRefreshBA OR VictimDataSelectBA;
IF PhBb THEN ForceAllDataSelectsBA ← Resetb;
Assert[NOT MoreThanOneOf[ReallyVictimToDecoderBA, DoRefreshBA]];
IF ReallyVictimToDecoderBA THEN CellAdrBA ← ICIW[VictimCountBA, 0, 7, 0, 7];
Assert[NOT MoreThanOneOf[DoRefreshBA, DirtyBitsToMQSelBA, Adr2829ToMQSelBA]];
IF PhBb THEN RefreshCountBA ← IF DoRefreshBA THEN (RefreshCountAB+1) MOD 512 ELSE RefreshCountAB;
IF DoRefreshBA
THEN {
CellAdrBA ← MWTW[RefreshCountBA, 9, 0, 7, 0, 7, 0, 7];
MQSelBA ←
SELECT
ECFW[RefreshCountBA, 9, 7, 2]
FROM
0 => 8,
1 => 4,
2 => 2,
3 => 1,
ENDCASE => ERROR;
};
nCellAdrBA ← WNOT[CellAdrBA, 7];
IF Resetb THEN MQSelBA ← 0FH;
FOR i:[0..4)
IN [0..4)
DO
IF
EBFW[VictimDirtyBitsBA, 4, i]
THEN {
FirstDirty ← i;
EXIT;
};
ENDLOOP;
IF DirtyBitsToMQSelBA
THEN {
MQSelBA ← IBIW[TRUE, 0, 4, FirstDirty];
};
IF SamplePAdr2831B
THEN {
Adr2829BA ← ECFW[PAdr2831AB, 4, 0, 2];
MAdrCtrBA ← ECFW[PAdr2831AB, 4, 2, 2]
};
IF SampleMAdr2831B
THEN {
Adr2829BA ← ECFD[MDataI, 32, 28, 2];
MAdrCtrBA ← ECFD[MDataI, 32, 30, 2]
};
MatchQSelBA ←
SELECT Adr2829BA
FROM
0 => 8,
1 => 4,
2 => 2,
3 => 1,
ENDCASE => ERROR;
IF Adr2829ToMQSelBA
THEN {
MQSelBA ←
SELECT Adr2829BA
FROM
0 => 8,
1 => 4,
2 => 2,
3 => 1,
ENDCASE => ERROR;
};
MAdr3031BA ← ICIW[MAdrCtrBA, MAdr3031BA, 2, 0, 2];
Assert[NOT MoreThanOneOf[AddressBitsToMDataIA, VictimAddressBitsToMDataIA]];
IF AddressBitsToMDataIA THEN MDataI ← MWTD[PAdr2831AB, 4, 0, 4, MDataI, 32, 28, 4];
IF VictimAddressBitsToMDataIA
THEN {
MDataI ← ICID[FirstDirty, MDataI, 32, 28, 2];
MDataI ← ICID[0, MDataI, 32, 30, 2];
};
END;
END;
RegisterCells[];
END.