summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:22 -0700
committerBrad Beckmann <Brad.Beckmann@amd.com>2010-03-21 21:22:22 -0700
commitb55e69ccace9ff7ff01714d2da81fb42e9733ae6 (patch)
tree04888706dd2ef29631c31d6c3d5a7c3510f7947b
parent898f1fc4a45454f5d70ef64de3c4b4caf686677a (diff)
downloadgem5-b55e69ccace9ff7ff01714d2da81fb42e9733ae6.tar.xz
ruby: Removed the unnecessary MachineType message fields
-rw-r--r--src/mem/protocol/MOESI_CMP_token-L1cache.sm26
-rw-r--r--src/mem/protocol/MOESI_CMP_token-L2cache.sm20
-rw-r--r--src/mem/protocol/MOESI_CMP_token-dir.sm12
3 files changed, 3 insertions, 55 deletions
diff --git a/src/mem/protocol/MOESI_CMP_token-L1cache.sm b/src/mem/protocol/MOESI_CMP_token-L1cache.sm
index 05a144b10..e3e3fa2cb 100644
--- a/src/mem/protocol/MOESI_CMP_token-L1cache.sm
+++ b/src/mem/protocol/MOESI_CMP_token-L1cache.sm
@@ -516,7 +516,7 @@ machine(L1Cache, "Token protocol")
assert(in_msg.Destination.isElement(machineID));
// Mark TBE flag if response received off-chip. Use this to update average latency estimate
- if ( in_msg.SenderMachine == MachineType:L2Cache ) {
+ if ( machineIDToMachineType(in_msg.Sender) == MachineType:L2Cache ) {
if (in_msg.Sender == mapAddressToRange(in_msg.Address,
MachineType:L2Cache,
@@ -532,12 +532,12 @@ machine(L1Cache, "Token protocol")
else {
// profile_onchipL2_response(in_msg.Address );
}
- } else if ( in_msg.SenderMachine == MachineType:Directory ) {
+ } else if ( machineIDToMachineType(in_msg.Sender) == MachineType:Directory ) {
if (L1_TBEs.isPresent(in_msg.Address)) {
L1_TBEs[in_msg.Address].ExternalResponse := true;
// profile_memory_response( in_msg.Address);
}
- } else if ( in_msg.SenderMachine == MachineType:L1Cache) {
+ } else if ( machineIDToMachineType(in_msg.Sender) == MachineType:L1Cache) {
//if (isLocalProcessor(machineID, in_msg.Sender) == false) {
//if (L1_TBEs.isPresent(in_msg.Address)) {
// L1_TBEs[in_msg.Address].ExternalResponse := true;
@@ -697,7 +697,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
-
out_msg.Destination.add(mapAddressToRange(address,
MachineType:L2Cache,
l2_select_low_bit,
@@ -718,7 +717,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
-
//
// Since only one chip, assuming all L1 caches are local
//
@@ -766,7 +764,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := PersistentRequestType:GETX_PERSISTENT;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:L1Cache;
out_msg.Destination.broadcast(MachineType:L1Cache);
//
@@ -821,7 +818,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceRequestType:GETX;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:L1Cache;
out_msg.Destination.add(mapAddressToRange(address,
MachineType:L2Cache,
@@ -885,7 +881,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.MessageSize := in_msg.MessageSize;
@@ -899,7 +894,6 @@ machine(L1Cache, "Token protocol")
enqueue(responseNetwork_out, ResponseMsg, latency = l1_response_latency) {
out_msg.Address := address;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(mapAddressToRange(address,
MachineType:L2Cache,
@@ -924,7 +918,6 @@ machine(L1Cache, "Token protocol")
enqueue(responseNetwork_out, ResponseMsg, latency = l1_response_latency) {
out_msg.Address := address;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(mapAddressToRange(address,
MachineType:L2Cache,
@@ -956,7 +949,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := 1;
out_msg.DataBlk := getCacheEntry(address).DataBlk;
@@ -980,7 +972,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := N_tokens;
out_msg.DataBlk := getCacheEntry(address).DataBlk;
@@ -999,7 +990,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := 1;
out_msg.DataBlk := getCacheEntry(address).DataBlk;
@@ -1023,7 +1013,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(in_msg.Requestor);
assert(getCacheEntry(address).Tokens >= 1);
out_msg.Tokens := getCacheEntry(address).Tokens;
@@ -1046,7 +1035,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getCacheEntry(address).Tokens >= 1);
out_msg.Tokens := getCacheEntry(address).Tokens;
@@ -1063,7 +1051,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getCacheEntry(address).Tokens >= 1);
out_msg.Tokens := getCacheEntry(address).Tokens;
@@ -1082,7 +1069,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getCacheEntry(address).Tokens >= 1);
if (getCacheEntry(address).Tokens > N_tokens) {
@@ -1108,7 +1094,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getCacheEntry(address).Tokens >= 1);
if (getCacheEntry(address).Tokens > N_tokens) {
@@ -1138,7 +1123,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.DataBlk := in_msg.DataBlk;
@@ -1236,8 +1220,6 @@ machine(L1Cache, "Token protocol")
out_msg.Type := CoherenceResponseType:INV;
out_msg.Tokens := 0;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
- out_msg.DestMachine := MachineType:L2Cache;
out_msg.Destination.add(mapAddressToRange(address,
MachineType:L2Cache,
@@ -1273,7 +1255,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := PersistentRequestType:DEACTIVATE_PERSISTENT;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:L1Cache;
out_msg.Destination.broadcast(MachineType:L1Cache);
//
@@ -1320,7 +1301,6 @@ machine(L1Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L1Cache;
out_msg.Destination.add(in_msg.Requestor);
assert(getCacheEntry(address).Tokens >= 1);
out_msg.Tokens := getCacheEntry(address).Tokens;
diff --git a/src/mem/protocol/MOESI_CMP_token-L2cache.sm b/src/mem/protocol/MOESI_CMP_token-L2cache.sm
index 4f5b0c76a..d3e11349d 100644
--- a/src/mem/protocol/MOESI_CMP_token-L2cache.sm
+++ b/src/mem/protocol/MOESI_CMP_token-L2cache.sm
@@ -477,7 +477,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := in_msg.Address;
out_msg.Type := in_msg.Type;
out_msg.Requestor := in_msg.Requestor;
- out_msg.RequestorMachine := in_msg.RequestorMachine;
out_msg.RetryNum := in_msg.RetryNum;
//
@@ -507,7 +506,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.MessageSize := in_msg.MessageSize;
@@ -523,7 +521,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.Tokens := getL2CacheEntry(address).Tokens;
out_msg.MessageSize := MessageSizeType:Writeback_Control;
@@ -536,7 +533,6 @@ machine(L2Cache, "Token protocol")
enqueue(responseNetwork_out, ResponseMsg, latency=l2_response_latency) {
out_msg.Address := address;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(map_Address_to_Directory(address));
out_msg.Tokens := getL2CacheEntry(address).Tokens;
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
@@ -560,7 +556,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := N_tokens;
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
@@ -574,7 +569,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := 1;
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
@@ -592,7 +586,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens;
@@ -610,7 +603,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens;
@@ -625,7 +617,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens;
@@ -644,7 +635,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens - 1;
@@ -662,7 +652,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens - 1;
@@ -684,7 +673,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.DataBlk := in_msg.DataBlk;
@@ -706,7 +694,6 @@ machine(L2Cache, "Token protocol")
out_msg.Type := CoherenceResponseType:ACK;
}
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.DataBlk := in_msg.DataBlk;
@@ -724,7 +711,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.DataBlk := in_msg.DataBlk;
@@ -752,7 +738,6 @@ machine(L2Cache, "Token protocol")
enqueue(localRequestNetwork_out, RequestMsg, latency=l2_response_latency ) {
out_msg.Address := in_msg.Address;
out_msg.Requestor := in_msg.Requestor;
- out_msg.RequestorMachine := in_msg.RequestorMachine;
//
// Currently assuming only one chip so all L1s are local
@@ -781,7 +766,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_SHARED;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
out_msg.Dirty := false;
@@ -799,7 +783,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
out_msg.Dirty := getL2CacheEntry(address).Dirty;
@@ -818,7 +801,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
out_msg.DataBlk := getL2CacheEntry(address).DataBlk;
out_msg.Dirty := getL2CacheEntry(address).Dirty;
@@ -892,7 +874,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens;
@@ -910,7 +891,6 @@ machine(L2Cache, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:L2Cache;
out_msg.Destination.add(in_msg.Requestor);
assert(getL2CacheEntry(address).Tokens >= 1);
out_msg.Tokens := getL2CacheEntry(address).Tokens;
diff --git a/src/mem/protocol/MOESI_CMP_token-dir.sm b/src/mem/protocol/MOESI_CMP_token-dir.sm
index eeee40100..67e31d72a 100644
--- a/src/mem/protocol/MOESI_CMP_token-dir.sm
+++ b/src/mem/protocol/MOESI_CMP_token-dir.sm
@@ -355,7 +355,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(in_msg.Requestor);
out_msg.Tokens := getDirectoryEntry(in_msg.Address).Tokens;
out_msg.MessageSize := MessageSizeType:Response_Control;
@@ -371,7 +370,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := PersistentRequestType:GETX_PERSISTENT;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:Directory;
out_msg.Destination.broadcast(MachineType:L1Cache);
//
@@ -418,7 +416,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceRequestType:GETX;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:Directory;
//
// Since only one chip, assuming all L1 caches are local
@@ -443,7 +440,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := PersistentRequestType:GETS_PERSISTENT;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:Directory;
out_msg.Destination.broadcast(MachineType:L1Cache);
//
@@ -486,7 +482,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceRequestType:GETS;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:Directory;
//
// Since only one chip, assuming all L1 caches are local
@@ -513,7 +508,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:ACK;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := getDirectoryEntry(address).Tokens;
out_msg.MessageSize := MessageSizeType:Response_Control;
@@ -528,7 +522,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(in_msg.OriginalRequestorMachId);
assert(getDirectoryEntry(address).Tokens > 0);
out_msg.Tokens := getDirectoryEntry(in_msg.Address).Tokens;
@@ -546,7 +539,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(persistentTable.findSmallest(address));
assert(getDirectoryEntry(address).Tokens > 0);
out_msg.Tokens := getDirectoryEntry(address).Tokens;
@@ -648,7 +640,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := PersistentRequestType:DEACTIVATE_PERSISTENT;
out_msg.Requestor := machineID;
- out_msg.RequestorMachine := MachineType:Directory;
out_msg.Destination.broadcast(MachineType:L1Cache);
//
@@ -746,7 +737,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := in_msg.Type;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.MessageSize := in_msg.MessageSize;
@@ -788,8 +778,6 @@ machine(Directory, "Token protocol")
out_msg.Address := address;
out_msg.Type := CoherenceResponseType:DATA_OWNER;
out_msg.Sender := machineID;
- out_msg.SenderMachine := MachineType:Directory;
- out_msg.DestMachine := MachineType:L1Cache;
out_msg.Destination.add(persistentTable.findSmallest(address));
out_msg.Tokens := in_msg.Tokens;
out_msg.DataBlk := getDirectoryEntry(in_msg.Address).DataBlk;