CacheMInterfaceMCAMDriver.rose
Last edited by: Barth, July 24, 1984 1:20:59 pm PDT
Last edited by: Curry, January 29, 1985 9:30:00 pm PST
Imports BitOps, BitSwOps;
Open BitOps, BitSwOps;
CELLTYPE "MCAMDriver"
PORTS[
Timing and housekeeping interface
Vdd, Gnd<BOOL,
Buffered timing and housekeeping interface
PhAb, PhBb<BOOL,
CAM interface
CAMPage, nCAMPage=SWITCH[24]-(Special XPhobic),
CAMBlock, nCAMBlock=SWITCH[4]-(Special XPhobic),
Internal main memory interface
MDataI=INT[32],
CAM driver ROM interface
CAMRegSenseMDataIB, ACAMRegDriveCAMBitsA, BCAMRegDriveCAMBitsAB, FormAddressBA, PageDriveMDataIA, BlockDriveMDataIA<BOOL,
Control steel wool
GetAdrCmdBA<EnumType["CacheOps.PreFetchAdrCmd"],
MasterBA<BOOL
]
State
PageReg: BitDWord,
BlockReg: BitWord,
Intermediate values, not state bits
PageRegSenseCAMBitsA, BlockRegSenseCAMBitsA, PrechargeCAMBits, DriveCAMBits: BOOL
EvalSimple
BlockRegSenseCAMBitsA ← PhAb AND FormAddressBA AND MasterBA;
PrechargeCAMBits ← PhBb AND FormAddressBA AND MasterBA;
DriveCAMBits ← (PhBb AND ((FormAddressBA AND NOT MasterBA) OR BCAMRegDriveCAMBitsAB)) OR ACAMRegDriveCAMBitsA;
PageRegSenseCAMBitsA ← BlockRegSenseCAMBitsA AND (GetAdrCmdBA=VictimReal OR GetAdrCmdBA=RefRealAssemble OR GetAdrCmdBA=RefVirtual);
IF CAMRegSenseMDataIB THEN {
PageReg ← MDTD[MDataI, 32, 0, 24, PageReg, 24, 0, 24];
BlockReg ← MDTW[MDataI, 32, 24, 4, BlockReg, 4, 0, 4];
};
TRUSTED {
cpd: SwitchMWord ← DESCRIPTOR[CAMPage];
ncpd: SwitchMWord ← DESCRIPTOR[nCAMPage];
cbd: SwitchMWord ← DESCRIPTOR[CAMBlock];
ncbd: SwitchMWord ← DESCRIPTOR[nCAMBlock];
s: SwitchTypes.Strength ← IF DriveCAMBits THEN driveStrong ELSE none;
IF PageRegSenseCAMBitsA THEN PageReg ← CSTD[cpd, 24, 0, 24, PageReg, 24, 0, 24];
IF BlockRegSenseCAMBitsA THEN BlockReg ← CSTW[cbd, 4, 0, 4, BlockReg, 4, 0, 4];
SCDTS[PageReg, 24, 0, 24, cpd, 24, 0, 24, [[s, L], [s, H]]];
SCDTS[PageReg, 24, 0, 24, ncpd, 24, 0, 24, [[s, H], [s, L]]];
SCWTS[BlockReg, 4, 0, 4, cbd, 4, 0, 4, [[s, L], [s, H]]];
SCWTS[BlockReg, 4, 0, 4, ncbd, 4, 0, 4, [[s, H], [s, L]]];
IF PrechargeCAMBits THEN {
SCDTS[BitDWordOnes, 24, 0, 24, cpd, 24, 0, 24, [[none, X], [drive, H]]];
SCDTS[BitDWordOnes, 24, 0, 24, ncpd, 24, 0, 24, [[none, X], [drive, H]]];
SCWTS[BitWordOnes, 4, 0, 4, cbd, 4, 0, 4, [[none, X], [drive, H]]];
SCWTS[BitWordOnes, 4, 0, 4, ncbd, 4, 0, 4, [[none, X], [drive, H]]];
};
};
IF PageDriveMDataIA THEN MDataI ← MDTD[PageReg, 24, 0, 24, MDataI, 32, 0, 24];
IF BlockDriveMDataIA THEN MDataI ← MWTD[BlockReg, 4, 0, 4, MDataI, 32, 24, 4];
ENDCELLTYPE