summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MOESI_CMP_token-L1cache.sm
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2015-08-14 12:04:47 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2015-08-14 12:04:47 -0500
commit9ea5d9cad9381e05004de28ef25309ebe94c3a79 (patch)
tree9e984df6ec20f479ea4c21fd29d1186052ef9ac0 /src/mem/protocol/MOESI_CMP_token-L1cache.sm
parent93c173a95e985d6b1fd413a9cfb5a3f8839135c0 (diff)
downloadgem5-9ea5d9cad9381e05004de28ef25309ebe94c3a79.tar.xz
ruby: rename variables Addr to addr
Avoid clash between type Addr and variable name Addr.
Diffstat (limited to 'src/mem/protocol/MOESI_CMP_token-L1cache.sm')
-rw-r--r--src/mem/protocol/MOESI_CMP_token-L1cache.sm126
1 files changed, 63 insertions, 63 deletions
diff --git a/src/mem/protocol/MOESI_CMP_token-L1cache.sm b/src/mem/protocol/MOESI_CMP_token-L1cache.sm
index 6edac4202..bdad86cf6 100644
--- a/src/mem/protocol/MOESI_CMP_token-L1cache.sm
+++ b/src/mem/protocol/MOESI_CMP_token-L1cache.sm
@@ -150,7 +150,7 @@ machine(L1Cache, "Token protocol")
// TBE fields
structure(TBE, desc="...") {
- Address Addr, desc="Physical address for this TBE";
+ Address addr, desc="Physical address for this TBE";
State TBEState, desc="Transient state";
int IssueCount, default="0", desc="The number of times we've issued a request for this line.";
Address PC, desc="Program counter of request";
@@ -494,47 +494,47 @@ machine(L1Cache, "Token protocol")
// Persistent Network
in_port(persistentNetwork_in, PersistentMsg, persistentToL1Cache, rank=3) {
if (persistentNetwork_in.isReady()) {
- peek(persistentNetwork_in, PersistentMsg, block_on="Addr") {
+ peek(persistentNetwork_in, PersistentMsg, block_on="addr") {
assert(in_msg.Destination.isElement(machineID));
// Apply the lockdown or unlockdown message to the table
if (in_msg.Type == PersistentRequestType:GETX_PERSISTENT) {
- persistentTable.persistentRequestLock(in_msg.Addr, in_msg.Requestor, AccessType:Write);
+ persistentTable.persistentRequestLock(in_msg.addr, in_msg.Requestor, AccessType:Write);
} else if (in_msg.Type == PersistentRequestType:GETS_PERSISTENT) {
- persistentTable.persistentRequestLock(in_msg.Addr, in_msg.Requestor, AccessType:Read);
+ persistentTable.persistentRequestLock(in_msg.addr, in_msg.Requestor, AccessType:Read);
} else if (in_msg.Type == PersistentRequestType:DEACTIVATE_PERSISTENT) {
- persistentTable.persistentRequestUnlock(in_msg.Addr, in_msg.Requestor);
+ persistentTable.persistentRequestUnlock(in_msg.addr, in_msg.Requestor);
} else {
error("Unexpected message");
}
// React to the message based on the current state of the table
- Entry cache_entry := getCacheEntry(in_msg.Addr);
- TBE tbe := L1_TBEs[in_msg.Addr];
+ Entry cache_entry := getCacheEntry(in_msg.addr);
+ TBE tbe := L1_TBEs[in_msg.addr];
- if (persistentTable.isLocked(in_msg.Addr)) {
- if (persistentTable.findSmallest(in_msg.Addr) == machineID) {
+ if (persistentTable.isLocked(in_msg.addr)) {
+ if (persistentTable.findSmallest(in_msg.addr) == machineID) {
// Our Own Lock - this processor is highest priority
- trigger(Event:Own_Lock_or_Unlock, in_msg.Addr,
+ trigger(Event:Own_Lock_or_Unlock, in_msg.addr,
cache_entry, tbe);
} else {
- if (persistentTable.typeOfSmallest(in_msg.Addr) == AccessType:Read) {
+ if (persistentTable.typeOfSmallest(in_msg.addr) == AccessType:Read) {
if (getTokens(cache_entry) == 1 ||
getTokens(cache_entry) == (max_tokens() / 2) + 1) {
- trigger(Event:Persistent_GETS_Last_Token, in_msg.Addr,
+ trigger(Event:Persistent_GETS_Last_Token, in_msg.addr,
cache_entry, tbe);
} else {
- trigger(Event:Persistent_GETS, in_msg.Addr,
+ trigger(Event:Persistent_GETS, in_msg.addr,
cache_entry, tbe);
}
} else {
- trigger(Event:Persistent_GETX, in_msg.Addr,
+ trigger(Event:Persistent_GETX, in_msg.addr,
cache_entry, tbe);
}
}
} else {
// Unlock case - no entries in the table
- trigger(Event:Own_Lock_or_Unlock, in_msg.Addr,
+ trigger(Event:Own_Lock_or_Unlock, in_msg.addr,
cache_entry, tbe);
}
}
@@ -544,42 +544,42 @@ machine(L1Cache, "Token protocol")
// Response Network
in_port(responseNetwork_in, ResponseMsg, responseToL1Cache, rank=2) {
if (responseNetwork_in.isReady()) {
- peek(responseNetwork_in, ResponseMsg, block_on="Addr") {
+ peek(responseNetwork_in, ResponseMsg, block_on="addr") {
assert(in_msg.Destination.isElement(machineID));
- Entry cache_entry := getCacheEntry(in_msg.Addr);
- TBE tbe := L1_TBEs[in_msg.Addr];
+ Entry cache_entry := getCacheEntry(in_msg.addr);
+ TBE tbe := L1_TBEs[in_msg.addr];
// Mark TBE flag if response received off-chip. Use this to update average latency estimate
if ( machineIDToMachineType(in_msg.Sender) == MachineType:L2Cache ) {
- if (in_msg.Sender == mapAddressToRange(in_msg.Addr,
+ if (in_msg.Sender == mapAddressToRange(in_msg.addr,
MachineType:L2Cache, l2_select_low_bit,
l2_select_num_bits, intToID(0))) {
// came from an off-chip L2 cache
if (is_valid(tbe)) {
- // L1_TBEs[in_msg.Addr].ExternalResponse := true;
- // profile_offchipL2_response(in_msg.Addr);
+ // L1_TBEs[in_msg.addr].ExternalResponse := true;
+ // profile_offchipL2_response(in_msg.addr);
}
}
else {
- // profile_onchipL2_response(in_msg.Addr );
+ // profile_onchipL2_response(in_msg.addr );
}
} else if ( machineIDToMachineType(in_msg.Sender) == MachineType:Directory ) {
if (is_valid(tbe)) {
setExternalResponse(tbe);
- // profile_memory_response( in_msg.Addr);
+ // profile_memory_response( in_msg.addr);
}
} else if ( machineIDToMachineType(in_msg.Sender) == MachineType:L1Cache) {
//if (isLocalProcessor(machineID, in_msg.Sender) == false) {
//if (is_valid(tbe)) {
// tbe.ExternalResponse := true;
- // profile_offchipL1_response(in_msg.Addr );
+ // profile_offchipL1_response(in_msg.addr );
//}
//}
//else {
- // profile_onchipL1_response(in_msg.Addr );
+ // profile_onchipL1_response(in_msg.addr );
//}
} else {
error("unexpected SenderMachine");
@@ -589,21 +589,21 @@ machine(L1Cache, "Token protocol")
if (getTokens(cache_entry) + in_msg.Tokens != max_tokens()) {
if (in_msg.Type == CoherenceResponseType:ACK) {
assert(in_msg.Tokens < (max_tokens() / 2));
- trigger(Event:Ack, in_msg.Addr, cache_entry, tbe);
+ trigger(Event:Ack, in_msg.addr, cache_entry, tbe);
} else if (in_msg.Type == CoherenceResponseType:DATA_OWNER) {
- trigger(Event:Data_Owner, in_msg.Addr, cache_entry, tbe);
+ trigger(Event:Data_Owner, in_msg.addr, cache_entry, tbe);
} else if (in_msg.Type == CoherenceResponseType:DATA_SHARED) {
assert(in_msg.Tokens < (max_tokens() / 2));
- trigger(Event:Data_Shared, in_msg.Addr, cache_entry, tbe);
+ trigger(Event:Data_Shared, in_msg.addr, cache_entry, tbe);
} else {
error("Unexpected message");
}
} else {
if (in_msg.Type == CoherenceResponseType:ACK) {
assert(in_msg.Tokens < (max_tokens() / 2));
- trigger(Event:Ack_All_Tokens, in_msg.Addr, cache_entry, tbe);
+ trigger(Event:Ack_All_Tokens, in_msg.addr, cache_entry, tbe);
} else if (in_msg.Type == CoherenceResponseType:DATA_OWNER || in_msg.Type == CoherenceResponseType:DATA_SHARED) {
- trigger(Event:Data_All_Tokens, in_msg.Addr, cache_entry, tbe);
+ trigger(Event:Data_All_Tokens, in_msg.addr, cache_entry, tbe);
} else {
error("Unexpected message");
}
@@ -615,40 +615,40 @@ machine(L1Cache, "Token protocol")
// Request Network
in_port(requestNetwork_in, RequestMsg, requestToL1Cache) {
if (requestNetwork_in.isReady()) {
- peek(requestNetwork_in, RequestMsg, block_on="Addr") {
+ peek(requestNetwork_in, RequestMsg, block_on="addr") {
assert(in_msg.Destination.isElement(machineID));
- Entry cache_entry := getCacheEntry(in_msg.Addr);
- TBE tbe := L1_TBEs[in_msg.Addr];
+ Entry cache_entry := getCacheEntry(in_msg.addr);
+ TBE tbe := L1_TBEs[in_msg.addr];
if (in_msg.Type == CoherenceRequestType:GETX) {
if (in_msg.isLocal) {
- trigger(Event:Transient_Local_GETX, in_msg.Addr,
+ trigger(Event:Transient_Local_GETX, in_msg.addr,
cache_entry, tbe);
}
else {
- trigger(Event:Transient_GETX, in_msg.Addr,
+ trigger(Event:Transient_GETX, in_msg.addr,
cache_entry, tbe);
}
} else if (in_msg.Type == CoherenceRequestType:GETS) {
if (getTokens(cache_entry) == 1 ||
getTokens(cache_entry) == (max_tokens() / 2) + 1) {
if (in_msg.isLocal) {
- trigger(Event:Transient_Local_GETS_Last_Token, in_msg.Addr,
+ trigger(Event:Transient_Local_GETS_Last_Token, in_msg.addr,
cache_entry, tbe);
}
else {
- trigger(Event:Transient_GETS_Last_Token, in_msg.Addr,
+ trigger(Event:Transient_GETS_Last_Token, in_msg.addr,
cache_entry, tbe);
}
}
else {
if (in_msg.isLocal) {
- trigger(Event:Transient_Local_GETS, in_msg.Addr,
+ trigger(Event:Transient_Local_GETS, in_msg.addr,
cache_entry, tbe);
}
else {
- trigger(Event:Transient_GETS, in_msg.Addr,
+ trigger(Event:Transient_GETS, in_msg.addr,
cache_entry, tbe);
}
}
@@ -748,7 +748,7 @@ machine(L1Cache, "Token protocol")
// Issue a persistent request if possible
if (okToIssueStarving(address, machineID) && (starving == false)) {
enqueue(persistentNetwork_out, PersistentMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := PersistentRequestType:GETS_PERSISTENT;
out_msg.Requestor := machineID;
out_msg.Destination.broadcast(MachineType:L1Cache);
@@ -800,7 +800,7 @@ machine(L1Cache, "Token protocol")
} else {
// Make a normal request
enqueue(requestNetwork_out, RequestMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
out_msg.Destination.add(mapAddressToRange(address,
@@ -819,7 +819,7 @@ machine(L1Cache, "Token protocol")
// send to other local L1s, with local bit set
enqueue(requestNetwork_out, RequestMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
//
@@ -867,7 +867,7 @@ machine(L1Cache, "Token protocol")
// Issue a persistent request if possible
if ( okToIssueStarving(address, machineID) && (starving == false)) {
enqueue(persistentNetwork_out, PersistentMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := PersistentRequestType:GETX_PERSISTENT;
out_msg.Requestor := machineID;
out_msg.Destination.broadcast(MachineType:L1Cache);
@@ -919,7 +919,7 @@ machine(L1Cache, "Token protocol")
} else {
// Make a normal request
enqueue(requestNetwork_out, RequestMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:GETX;
out_msg.Requestor := machineID;
@@ -940,7 +940,7 @@ machine(L1Cache, "Token protocol")
// send to other local L1s too
enqueue(requestNetwork_out, RequestMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:GETX;
out_msg.Requestor := machineID;
out_msg.isLocal := true;
@@ -981,7 +981,7 @@ machine(L1Cache, "Token protocol")
peek(responseNetwork_in, ResponseMsg) {
// FIXME, should use a 3rd vnet
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
out_msg.Destination.add(map_Address_to_Directory(address));
@@ -996,7 +996,7 @@ machine(L1Cache, "Token protocol")
action(c_ownedReplacement, "c", desc="Issue writeback") {
assert(is_valid(cache_entry));
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.Destination.add(mapAddressToRange(address,
@@ -1020,7 +1020,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
assert (cache_entry.Tokens > 0);
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.Destination.add(mapAddressToRange(address,
@@ -1042,7 +1042,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
if (cache_entry.Tokens > 0) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.Destination.add(mapAddressToRange(address,
@@ -1067,7 +1067,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
peek(requestNetwork_in, RequestMsg) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
out_msg.Destination.add(in_msg.Requestor);
@@ -1091,7 +1091,7 @@ machine(L1Cache, "Token protocol")
peek(requestNetwork_in, RequestMsg) {
if (cache_entry.Tokens > (N_tokens + (max_tokens() / 2))) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
out_msg.Destination.add(in_msg.Requestor);
@@ -1109,7 +1109,7 @@ machine(L1Cache, "Token protocol")
}
else if (cache_entry.Tokens > 1) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
out_msg.Destination.add(in_msg.Requestor);
@@ -1133,7 +1133,7 @@ machine(L1Cache, "Token protocol")
peek(requestNetwork_in, RequestMsg) {
assert(is_valid(cache_entry));
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
out_msg.Destination.add(in_msg.Requestor);
@@ -1156,7 +1156,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
if (cache_entry.Tokens > 0) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
if (cache_entry.Tokens > (max_tokens() / 2)) {
out_msg.Type := CoherenceResponseType:DATA_OWNER;
} else {
@@ -1178,7 +1178,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
assert(cache_entry.Tokens > 0);
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
out_msg.Destination.add(persistentTable.findSmallest(address));
@@ -1197,7 +1197,7 @@ machine(L1Cache, "Token protocol")
assert(cache_entry.Tokens > 0);
if (cache_entry.Tokens > 1) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
if (cache_entry.Tokens > (max_tokens() / 2)) {
out_msg.Type := CoherenceResponseType:DATA_OWNER;
} else {
@@ -1227,7 +1227,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
assert(cache_entry.Tokens > ((max_tokens() / 2) + 1));
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
out_msg.Destination.add(persistentTable.findSmallest(address));
@@ -1252,7 +1252,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
assert(cache_entry.Tokens == ((max_tokens() / 2) + 1));
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
out_msg.Destination.add(persistentTable.findSmallest(address));
@@ -1272,7 +1272,7 @@ machine(L1Cache, "Token protocol")
// assert(persistentTable.findSmallest(address) != id); // Make sure we never bounce tokens to ourself
// FIXME, should use a 3rd vnet in some cases
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
out_msg.Destination.add(persistentTable.findSmallest(address));
@@ -1384,7 +1384,7 @@ machine(L1Cache, "Token protocol")
action(p_informL2AboutTokenLoss, "p", desc="Inform L2 about loss of all tokens") {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceResponseType:INV;
out_msg.Tokens := 0;
out_msg.Sender := machineID;
@@ -1401,7 +1401,7 @@ machine(L1Cache, "Token protocol")
assert(is_valid(cache_entry));
assert(in_msg.Tokens != 0);
DPRINTF(RubySlicc, "L1 received tokens for address: %s, tokens: %d\n",
- in_msg.Addr, in_msg.Tokens);
+ in_msg.addr, in_msg.Tokens);
cache_entry.Tokens := cache_entry.Tokens + in_msg.Tokens;
DPRINTF(RubySlicc, "%d\n", cache_entry.Tokens);
@@ -1418,7 +1418,7 @@ machine(L1Cache, "Token protocol")
// assert(starving);
outstandingRequests := outstandingRequests - 1;
enqueue(persistentNetwork_out, PersistentMsg, l1_request_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := PersistentRequestType:DEACTIVATE_PERSISTENT;
out_msg.Requestor := machineID;
out_msg.Destination.broadcast(MachineType:L1Cache);
@@ -1465,7 +1465,7 @@ machine(L1Cache, "Token protocol")
if (cache_entry.Tokens > 0) {
peek(requestNetwork_in, RequestMsg) {
enqueue(responseNetwork_out, ResponseMsg, l1_response_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
if (cache_entry.Tokens > (max_tokens() / 2)) {
out_msg.Type := CoherenceResponseType:DATA_OWNER;
} else {