--CacheEntries.Mesa
--created by RoseTranslate from CacheEntries.Rose of May 22, 1984 8:17:28 pm PDT for Barth.pa at May 22, 1984 8:28:12 pm PDT
DIRECTORY
RoseTypes, RoseCreate, CacheEntry, IO, NumTypes, SwitchTypes;
CacheEntries: CEDAR PROGRAM
IMPORTS RoseCreate, CacheEntry, IO, NumTypes =
BEGIN OPEN
RoseTypes;
--Signal Type decls
RegisterCells: PROC =
BEGIN
CreateCacheEntriesPorts[];
[] ← RoseCreate.RegisterCellClass[className: "CacheEntries",
expandProc: CacheEntriesExpand,
ioCreator: CreateCacheEntriesIO, initializer: NIL,
evals: [],
blackBox: NIL, stateToo: NIL,
ports: CacheEntriesPorts,
drivePrototype: NEW [CacheEntriesDrive]];
END;
CreateCacheEntriesPorts: PROC = {CacheEntriesPorts ← RoseCreate.PortsFromFile["CacheEntries.CacheEntries.rosePorts"]};
CacheEntriesIORef: TYPE = REF CacheEntriesIORec;
CacheEntriesIORec: 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],
nPhBb(4:15..15): BOOLEAN,
fill5(5:0..14): [0..32767],
Resetb(5:15..15): BOOLEAN,
VirtualPage(6:0..31): ARRAY [0..2) OF CARDINAL,
nVirtualPage(8:0..31): ARRAY [0..2) OF CARDINAL,
fill8(10:0..9): [0..1023],
VirtualBlock(10:10..15): [0..63],
fill9(11:0..9): [0..1023],
nVirtualBlock(11:10..15): [0..63],
RealPage(12:0..31): ARRAY [0..2) OF CARDINAL,
nRealPage(14:0..31): ARRAY [0..2) OF CARDINAL,
fill12(16:0..9): [0..1023],
RealBlock(16:10..15): [0..63],
fill13(17:0..9): [0..1023],
nRealBlock(17:10..15): [0..63],
CAMPageAccess(18:0..383): PACKED ARRAY [0 .. 23] OF SwitchTypes.SwitchVal,
nCAMPageAccess(42:0..383): PACKED ARRAY [0 .. 23] OF SwitchTypes.SwitchVal,
CAMBlockAccess(66:0..95): PACKED ARRAY [0 .. 5] OF SwitchTypes.SwitchVal,
nCAMBlockAccess(72:0..95): PACKED ARRAY [0 .. 5] OF SwitchTypes.SwitchVal,
PBits(78:0..1055): PACKED ARRAY [0 .. 65] OF SwitchTypes.SwitchVal,
nPBits(144:0..1055): PACKED ARRAY [0 .. 65] OF SwitchTypes.SwitchVal,
MBits(210:0..1055): PACKED ARRAY [0 .. 65] OF SwitchTypes.SwitchVal,
nMBits(276:0..1055): PACKED ARRAY [0 .. 65] OF SwitchTypes.SwitchVal,
fill22(342:0..14): [0..32767],
nVirtualMatch(342:15..15): BOOLEAN,
fill23(343:0..14): [0..32767],
nMatchPageClean(343:15..15): BOOLEAN,
fill24(344:0..14): [0..32767],
nMatchCellShared(344:15..15): BOOLEAN,
fill25(345:0..14): [0..32767],
nMapValid(345:15..15): BOOLEAN,
fill26(346:0..14): [0..32767],
nRealMatch(346:15..15): BOOLEAN,
fill27(347:0..14): [0..32767],
nVictimClean(347:15..15): BOOLEAN,
fill28(348:0..14): [0..32767],
nMatchTIP(348:15..15): BOOLEAN,
fill29(349:0..7): [0..255],
CellAdr(349:8..15): [0..255],
fill30(350:0..7): [0..255],
nCellAdr(350:8..15): [0..255],
fill31(351:0..14): [0..32767],
VirtualAccess(351:15..15): BOOLEAN,
fill32(352:0..14): [0..32767],
nVirtualAccess(352:15..15): BOOLEAN,
fill33(353:0..14): [0..32767],
SelCell(353:15..15): BOOLEAN,
fill34(354:0..14): [0..32767],
SelVictimAdr(354:15..15): BOOLEAN,
fill35(355:0..14): [0..32767],
SelMapAdr(355:15..15): BOOLEAN,
fill36(356:0..14): [0..32767],
SelRealData(356:15..15): BOOLEAN,
fill37(357:0..14): [0..32767],
SelPageFlag(357:15..15): BOOLEAN,
fill38(358:0..14): [0..32767],
SelVictimData(358:15..15): BOOLEAN,
fill39(359:0..14): [0..32767],
SelRealAdr(359:15..15): BOOLEAN,
fill40(360:0..14): [0..32767],
FinishSharedStore(360:15..15): BOOLEAN,
VPValid(361:0..15): SwitchTypes.SwitchVal,
nVPValid(362:0..15): SwitchTypes.SwitchVal,
RPValid(363:0..15): SwitchTypes.SwitchVal,
nRPValid(364:0..15): SwitchTypes.SwitchVal,
RPDirty(365:0..15): SwitchTypes.SwitchVal,
nRPDirty(366:0..15): SwitchTypes.SwitchVal,
Master(367:0..15): SwitchTypes.SwitchVal,
nMaster(368:0..15): SwitchTypes.SwitchVal,
Shared(369:0..15): SwitchTypes.SwitchVal,
nShared(370:0..15): SwitchTypes.SwitchVal,
Victim(371:0..15): SwitchTypes.SwitchVal,
nVictim(372:0..15): SwitchTypes.SwitchVal,
TIP(373:0..15): SwitchTypes.SwitchVal,
nTIP(374:0..15): SwitchTypes.SwitchVal,
Broken(375:0..15): SwitchTypes.SwitchVal,
nBroken(376:0..15): SwitchTypes.SwitchVal,
fill57(377:0..14): [0..32767],
MAdrLow(377:15..15): BOOLEAN,
fill58(378:0..14): [0..32767],
nMAdrLow(378:15..15): BOOLEAN,
fill59(379:0..14): [0..32767],
PAdrLow(379:15..15): BOOLEAN,
fill60(380:0..14): [0..32767],
nPAdrLow(380:15..15): BOOLEAN,
fill61(381:0..14): [0..32767],
PStore(381:15..15): BOOLEAN,
fill62(382:0..14): [0..32767],
VictimFeedback(382:15..15): BOOLEAN,
fill63(383:0..14): [0..32767],
nVictimFeedback(383:15..15): BOOLEAN,
fill64(384:0..14): [0..32767],
ShiftVictim(384:15..15): BOOLEAN,
fill65(385:0..14): [0..32767],
nShiftVictim(385:15..15): BOOLEAN,
fill66(386:0..14): [0..32767],
ForceDataSelect(386:15..15): BOOLEAN];
-- port indices:
CacheEntriesCAMPageAccessPortIndex: CARDINAL = 14;
CacheEntriesNCAMPageAccessPortIndex: CARDINAL = 15;
CacheEntriesCAMBlockAccessPortIndex: CARDINAL = 16;
CacheEntriesNCAMBlockAccessPortIndex: CARDINAL = 17;
CacheEntriesPBitsPortIndex: CARDINAL = 18;
CacheEntriesNPBitsPortIndex: CARDINAL = 19;
CacheEntriesMBitsPortIndex: CARDINAL = 20;
CacheEntriesNMBitsPortIndex: CARDINAL = 21;
CacheEntriesVPValidPortIndex: CARDINAL = 41;
CacheEntriesNVPValidPortIndex: CARDINAL = 42;
CacheEntriesRPValidPortIndex: CARDINAL = 43;
CacheEntriesNRPValidPortIndex: CARDINAL = 44;
CacheEntriesRPDirtyPortIndex: CARDINAL = 45;
CacheEntriesNRPDirtyPortIndex: CARDINAL = 46;
CacheEntriesMasterPortIndex: CARDINAL = 47;
CacheEntriesNMasterPortIndex: CARDINAL = 48;
CacheEntriesSharedPortIndex: CARDINAL = 49;
CacheEntriesNSharedPortIndex: CARDINAL = 50;
CacheEntriesVictimPortIndex: CARDINAL = 51;
CacheEntriesNVictimPortIndex: CARDINAL = 52;
CacheEntriesTIPPortIndex: CARDINAL = 53;
CacheEntriesNTIPPortIndex: CARDINAL = 54;
CacheEntriesBrokenPortIndex: CARDINAL = 55;
CacheEntriesNBrokenPortIndex: CARDINAL = 56;
CacheEntriesDrive: 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),
nPhBb(4:15..15): BOOLEAN,
fill5(5:0..14): [0 .. 32768),
Resetb(5:15..15): BOOLEAN,
fill6(6:0..14): [0 .. 32768),
VirtualPage(6:15..15): BOOLEAN,
fill7(7:0..14): [0 .. 32768),
nVirtualPage(7:15..15): BOOLEAN,
fill8(8:0..14): [0 .. 32768),
VirtualBlock(8:15..15): BOOLEAN,
fill9(9:0..14): [0 .. 32768),
nVirtualBlock(9:15..15): BOOLEAN,
fill10(10:0..14): [0 .. 32768),
RealPage(10:15..15): BOOLEAN,
fill11(11:0..14): [0 .. 32768),
nRealPage(11:15..15): BOOLEAN,
fill12(12:0..14): [0 .. 32768),
RealBlock(12:15..15): BOOLEAN,
fill13(13:0..14): [0 .. 32768),
nRealBlock(13:15..15): BOOLEAN,
fill14(14:0..14): [0 .. 32768),
CAMPageAccess(14:15..15): BOOLEAN,
fill15(15:0..14): [0 .. 32768),
nCAMPageAccess(15:15..15): BOOLEAN,
fill16(16:0..14): [0 .. 32768),
CAMBlockAccess(16:15..15): BOOLEAN,
fill17(17:0..14): [0 .. 32768),
nCAMBlockAccess(17:15..15): BOOLEAN,
fill18(18:0..14): [0 .. 32768),
PBits(18:15..15): BOOLEAN,
fill19(19:0..14): [0 .. 32768),
nPBits(19:15..15): BOOLEAN,
fill20(20:0..14): [0 .. 32768),
MBits(20:15..15): BOOLEAN,
fill21(21:0..14): [0 .. 32768),
nMBits(21:15..15): BOOLEAN,
fill22(22:0..14): [0 .. 32768),
nVirtualMatch(22:15..15): BOOLEAN,
fill23(23:0..14): [0 .. 32768),
nMatchPageClean(23:15..15): BOOLEAN,
fill24(24:0..14): [0 .. 32768),
nMatchCellShared(24:15..15): BOOLEAN,
fill25(25:0..14): [0 .. 32768),
nMapValid(25:15..15): BOOLEAN,
fill26(26:0..14): [0 .. 32768),
nRealMatch(26:15..15): BOOLEAN,
fill27(27:0..14): [0 .. 32768),
nVictimClean(27:15..15): BOOLEAN,
fill28(28:0..14): [0 .. 32768),
nMatchTIP(28:15..15): BOOLEAN,
fill29(29:0..14): [0 .. 32768),
CellAdr(29:15..15): BOOLEAN,
fill30(30:0..14): [0 .. 32768),
nCellAdr(30:15..15): BOOLEAN,
fill31(31:0..14): [0 .. 32768),
VirtualAccess(31:15..15): BOOLEAN,
fill32(32:0..14): [0 .. 32768),
nVirtualAccess(32:15..15): BOOLEAN,
fill33(33:0..14): [0 .. 32768),
SelCell(33:15..15): BOOLEAN,
fill34(34:0..14): [0 .. 32768),
SelVictimAdr(34:15..15): BOOLEAN,
fill35(35:0..14): [0 .. 32768),
SelMapAdr(35:15..15): BOOLEAN,
fill36(36:0..14): [0 .. 32768),
SelRealData(36:15..15): BOOLEAN,
fill37(37:0..14): [0 .. 32768),
SelPageFlag(37:15..15): BOOLEAN,
fill38(38:0..14): [0 .. 32768),
SelVictimData(38:15..15): BOOLEAN,
fill39(39:0..14): [0 .. 32768),
SelRealAdr(39:15..15): BOOLEAN,
fill40(40:0..14): [0 .. 32768),
FinishSharedStore(40:15..15): BOOLEAN,
fill41(41:0..14): [0 .. 32768),
VPValid(41:15..15): BOOLEAN,
fill42(42:0..14): [0 .. 32768),
nVPValid(42:15..15): BOOLEAN,
fill43(43:0..14): [0 .. 32768),
RPValid(43:15..15): BOOLEAN,
fill44(44:0..14): [0 .. 32768),
nRPValid(44:15..15): BOOLEAN,
fill45(45:0..14): [0 .. 32768),
RPDirty(45:15..15): BOOLEAN,
fill46(46:0..14): [0 .. 32768),
nRPDirty(46:15..15): BOOLEAN,
fill47(47:0..14): [0 .. 32768),
Master(47:15..15): BOOLEAN,
fill48(48:0..14): [0 .. 32768),
nMaster(48:15..15): BOOLEAN,
fill49(49:0..14): [0 .. 32768),
Shared(49:15..15): BOOLEAN,
fill50(50:0..14): [0 .. 32768),
nShared(50:15..15): BOOLEAN,
fill51(51:0..14): [0 .. 32768),
Victim(51:15..15): BOOLEAN,
fill52(52:0..14): [0 .. 32768),
nVictim(52:15..15): BOOLEAN,
fill53(53:0..14): [0 .. 32768),
TIP(53:15..15): BOOLEAN,
fill54(54:0..14): [0 .. 32768),
nTIP(54:15..15): BOOLEAN,
fill55(55:0..14): [0 .. 32768),
Broken(55:15..15): BOOLEAN,
fill56(56:0..14): [0 .. 32768),
nBroken(56:15..15): BOOLEAN,
fill57(57:0..14): [0 .. 32768),
MAdrLow(57:15..15): BOOLEAN,
fill58(58:0..14): [0 .. 32768),
nMAdrLow(58:15..15): BOOLEAN,
fill59(59:0..14): [0 .. 32768),
PAdrLow(59:15..15): BOOLEAN,
fill60(60:0..14): [0 .. 32768),
nPAdrLow(60:15..15): BOOLEAN,
fill61(61:0..14): [0 .. 32768),
PStore(61:15..15): BOOLEAN,
fill62(62:0..14): [0 .. 32768),
VictimFeedback(62:15..15): BOOLEAN,
fill63(63:0..14): [0 .. 32768),
nVictimFeedback(63:15..15): BOOLEAN,
fill64(64:0..14): [0 .. 32768),
ShiftVictim(64:15..15): BOOLEAN,
fill65(65:0..14): [0 .. 32768),
nShiftVictim(65:15..15): BOOLEAN,
fill66(66:0..14): [0 .. 32768),
ForceDataSelect(66:15..15): BOOLEAN];
CacheEntriesExpand: ExpandProc = {
PrivateLookupNode: PROC [name: ROPE] RETURNS [node: Node] = {node ← RoseCreate.LookupNode[from: thisCell, path: LIST[name]]};
Vdd: Node ← PrivateLookupNode["Vdd"];
Gnd: Node ← PrivateLookupNode["Gnd"];
PhAb: Node ← PrivateLookupNode["PhAb"];
PhBb: Node ← PrivateLookupNode["PhBb"];
nPhBb: Node ← PrivateLookupNode["nPhBb"];
Resetb: Node ← PrivateLookupNode["Resetb"];
VirtualPage: Node ← PrivateLookupNode["VirtualPage"];
nVirtualPage: Node ← PrivateLookupNode["nVirtualPage"];
VirtualBlock: Node ← PrivateLookupNode["VirtualBlock"];
nVirtualBlock: Node ← PrivateLookupNode["nVirtualBlock"];
RealPage: Node ← PrivateLookupNode["RealPage"];
nRealPage: Node ← PrivateLookupNode["nRealPage"];
RealBlock: Node ← PrivateLookupNode["RealBlock"];
nRealBlock: Node ← PrivateLookupNode["nRealBlock"];
CAMPageAccess: Node ← PrivateLookupNode["CAMPageAccess"];
nCAMPageAccess: Node ← PrivateLookupNode["nCAMPageAccess"];
CAMBlockAccess: Node ← PrivateLookupNode["CAMBlockAccess"];
nCAMBlockAccess: Node ← PrivateLookupNode["nCAMBlockAccess"];
PBits: Node ← PrivateLookupNode["PBits"];
nPBits: Node ← PrivateLookupNode["nPBits"];
MBits: Node ← PrivateLookupNode["MBits"];
nMBits: Node ← PrivateLookupNode["nMBits"];
nVirtualMatch: Node ← PrivateLookupNode["nVirtualMatch"];
nMatchPageClean: Node ← PrivateLookupNode["nMatchPageClean"];
nMatchCellShared: Node ← PrivateLookupNode["nMatchCellShared"];
nMapValid: Node ← PrivateLookupNode["nMapValid"];
nRealMatch: Node ← PrivateLookupNode["nRealMatch"];
nVictimClean: Node ← PrivateLookupNode["nVictimClean"];
nMatchTIP: Node ← PrivateLookupNode["nMatchTIP"];
CellAdr: Node ← PrivateLookupNode["CellAdr"];
nCellAdr: Node ← PrivateLookupNode["nCellAdr"];
VirtualAccess: Node ← PrivateLookupNode["VirtualAccess"];
nVirtualAccess: Node ← PrivateLookupNode["nVirtualAccess"];
SelCell: Node ← PrivateLookupNode["SelCell"];
SelVictimAdr: Node ← PrivateLookupNode["SelVictimAdr"];
SelMapAdr: Node ← PrivateLookupNode["SelMapAdr"];
SelRealData: Node ← PrivateLookupNode["SelRealData"];
SelPageFlag: Node ← PrivateLookupNode["SelPageFlag"];
SelVictimData: Node ← PrivateLookupNode["SelVictimData"];
SelRealAdr: Node ← PrivateLookupNode["SelRealAdr"];
FinishSharedStore: Node ← PrivateLookupNode["FinishSharedStore"];
VPValid: Node ← PrivateLookupNode["VPValid"];
nVPValid: Node ← PrivateLookupNode["nVPValid"];
RPValid: Node ← PrivateLookupNode["RPValid"];
nRPValid: Node ← PrivateLookupNode["nRPValid"];
RPDirty: Node ← PrivateLookupNode["RPDirty"];
nRPDirty: Node ← PrivateLookupNode["nRPDirty"];
Master: Node ← PrivateLookupNode["Master"];
nMaster: Node ← PrivateLookupNode["nMaster"];
Shared: Node ← PrivateLookupNode["Shared"];
nShared: Node ← PrivateLookupNode["nShared"];
Victim: Node ← PrivateLookupNode["Victim"];
nVictim: Node ← PrivateLookupNode["nVictim"];
TIP: Node ← PrivateLookupNode["TIP"];
nTIP: Node ← PrivateLookupNode["nTIP"];
Broken: Node ← PrivateLookupNode["Broken"];
nBroken: Node ← PrivateLookupNode["nBroken"];
MAdrLow: Node ← PrivateLookupNode["MAdrLow"];
nMAdrLow: Node ← PrivateLookupNode["nMAdrLow"];
PAdrLow: Node ← PrivateLookupNode["PAdrLow"];
nPAdrLow: Node ← PrivateLookupNode["nPAdrLow"];
PStore: Node ← PrivateLookupNode["PStore"];
VictimFeedback: Node ← PrivateLookupNode["VictimFeedback"];
nVictimFeedback: Node ← PrivateLookupNode["nVictimFeedback"];
ShiftVictim: Node ← PrivateLookupNode["ShiftVictim"];
nShiftVictim: Node ← PrivateLookupNode["nShiftVictim"];
ForceDataSelect: Node ← PrivateLookupNode["ForceDataSelect"];
--explicitly requested CEDAR:
[] ← RoseCreate.CreateNode[within: thisCell, name: "VictimData3", type: NumTypes.boolType];
FOR ce: CARDINAL IN [0..4) DO
IF ce#3 THEN [] ← RoseCreate.CreateNode[within: thisCell, name: IO.PutFR["VictimData%g", IO.card[ce]], type: NumTypes.boolType];
[] ← RoseCreate.CreateCell[within: thisCell, instanceName: IO.PutFR["CacheEntry%g", IO.card[ce]], className: "CacheEntry", interfaceNodes: IO.PutFR["VictimOut:VictimData%g, VictimIn:VictimData%g", IO.card[ce], IF ce=0 THEN IO.card[3] ELSE IO.card[ce-1]], initData: NEW[CacheEntry.CacheEntryInitRec ← [ce]]];
ENDLOOP;
};
CreateCacheEntriesIO: IOCreator = {
cell.realCellStuff.switchIO ← NEW [CacheEntriesIORec];
cell.realCellStuff.newIO ← NEW [CacheEntriesIORec];
cell.realCellStuff.oldIO ← NEW [CacheEntriesIORec];
};
CacheEntriesPorts: Ports ← NEW [PortsRep[67]];
RegisterCells[];
END.