summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MOESI_CMP_directory-dir.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_directory-dir.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_directory-dir.sm')
-rw-r--r--src/mem/protocol/MOESI_CMP_directory-dir.sm86
1 files changed, 43 insertions, 43 deletions
diff --git a/src/mem/protocol/MOESI_CMP_directory-dir.sm b/src/mem/protocol/MOESI_CMP_directory-dir.sm
index c2b5e35e1..752f80b3a 100644
--- a/src/mem/protocol/MOESI_CMP_directory-dir.sm
+++ b/src/mem/protocol/MOESI_CMP_directory-dir.sm
@@ -232,28 +232,28 @@ machine(Directory, "Directory protocol")
if (unblockNetwork_in.isReady()) {
peek(unblockNetwork_in, ResponseMsg) {
if (in_msg.Type == CoherenceResponseType:UNBLOCK) {
- if (getDirectoryEntry(in_msg.Addr).WaitingUnblocks == 1) {
- trigger(Event:Last_Unblock, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ if (getDirectoryEntry(in_msg.addr).WaitingUnblocks == 1) {
+ trigger(Event:Last_Unblock, in_msg.addr,
+ TBEs[in_msg.addr]);
} else {
- trigger(Event:Unblock, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:Unblock, in_msg.addr,
+ TBEs[in_msg.addr]);
}
} else if (in_msg.Type == CoherenceResponseType:UNBLOCK_EXCLUSIVE) {
- trigger(Event:Exclusive_Unblock, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:Exclusive_Unblock, in_msg.addr,
+ TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceResponseType:WRITEBACK_DIRTY_DATA) {
- trigger(Event:Dirty_Writeback, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:Dirty_Writeback, in_msg.addr,
+ TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceResponseType:WRITEBACK_CLEAN_ACK) {
- trigger(Event:Clean_Writeback, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:Clean_Writeback, in_msg.addr,
+ TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceResponseType:DATA_EXCLUSIVE) {
- trigger(Event:Data, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:Data, in_msg.addr,
+ TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceResponseType:DMA_ACK) {
- trigger(Event:DMA_ACK, in_msg.Addr,
- TBEs[in_msg.Addr]);
+ trigger(Event:DMA_ACK, in_msg.addr,
+ TBEs[in_msg.addr]);
} else {
error("Invalid message");
}
@@ -265,21 +265,21 @@ machine(Directory, "Directory protocol")
if (requestQueue_in.isReady()) {
peek(requestQueue_in, RequestMsg) {
if (in_msg.Type == CoherenceRequestType:GETS) {
- trigger(Event:GETS, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:GETS, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceRequestType:GETX) {
- trigger(Event:GETX, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:GETX, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceRequestType:PUTX) {
- trigger(Event:PUTX, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:PUTX, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceRequestType:PUTO) {
- trigger(Event:PUTO, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:PUTO, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceRequestType:PUTO_SHARERS) {
- trigger(Event:PUTO_SHARERS, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:PUTO_SHARERS, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == CoherenceRequestType:DMA_READ) {
- trigger(Event:DMA_READ, makeLineAddress(in_msg.Addr),
- TBEs[makeLineAddress(in_msg.Addr)]);
+ trigger(Event:DMA_READ, makeLineAddress(in_msg.addr),
+ TBEs[makeLineAddress(in_msg.addr)]);
} else if (in_msg.Type == CoherenceRequestType:DMA_WRITE) {
- trigger(Event:DMA_WRITE, makeLineAddress(in_msg.Addr),
- TBEs[makeLineAddress(in_msg.Addr)]);
+ trigger(Event:DMA_WRITE, makeLineAddress(in_msg.addr),
+ TBEs[makeLineAddress(in_msg.addr)]);
} else {
error("Invalid message");
}
@@ -292,9 +292,9 @@ machine(Directory, "Directory protocol")
if (memQueue_in.isReady()) {
peek(memQueue_in, MemoryMsg) {
if (in_msg.Type == MemoryRequestType:MEMORY_READ) {
- trigger(Event:Memory_Data, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:Memory_Data, in_msg.addr, TBEs[in_msg.addr]);
} else if (in_msg.Type == MemoryRequestType:MEMORY_WB) {
- trigger(Event:Memory_Ack, in_msg.Addr, TBEs[in_msg.Addr]);
+ trigger(Event:Memory_Ack, in_msg.addr, TBEs[in_msg.addr]);
} else {
DPRINTF(RubySlicc, "%s\n", in_msg.Type);
error("Invalid message");
@@ -308,7 +308,7 @@ machine(Directory, "Directory protocol")
action(a_sendWriteBackAck, "a", desc="Send writeback ack to requestor") {
peek(requestQueue_in, RequestMsg) {
enqueue(forwardNetwork_out, RequestMsg, directory_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:WB_ACK;
out_msg.Requestor := in_msg.Requestor;
out_msg.RequestorMachine := MachineType:Directory;
@@ -321,7 +321,7 @@ machine(Directory, "Directory protocol")
action(b_sendWriteBackNack, "b", desc="Send writeback nack to requestor") {
peek(requestQueue_in, RequestMsg) {
enqueue(forwardNetwork_out, RequestMsg, directory_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:WB_NACK;
out_msg.Requestor := in_msg.Requestor;
out_msg.RequestorMachine := MachineType:Directory;
@@ -347,7 +347,7 @@ machine(Directory, "Directory protocol")
action(d_sendDataMsg, "d", desc="Send data to requestor") {
peek(memQueue_in, MemoryMsg) {
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(in_msg.OriginalRequestorMachId);
@@ -367,7 +367,7 @@ machine(Directory, "Directory protocol")
action(p_fwdDataToDMA, "\d", desc="Send data to requestor") {
peek(requestQueue_in, RequestMsg) {
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(in_msg.Requestor);
@@ -388,11 +388,11 @@ machine(Directory, "Directory protocol")
action(f_forwardRequest, "f", desc="Forward request to owner") {
peek(requestQueue_in, RequestMsg) {
enqueue(forwardNetwork_out, RequestMsg, directory_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := in_msg.Type;
out_msg.Requestor := in_msg.Requestor;
out_msg.RequestorMachine := machineIDToMachineType(in_msg.Requestor);
- out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.Addr).Owner);
+ out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.addr).Owner);
out_msg.Acks := getDirectoryEntry(address).Sharers.count();
if (getDirectoryEntry(address).Sharers.isElement(in_msg.Requestor)) {
out_msg.Acks := out_msg.Acks - 1;
@@ -405,11 +405,11 @@ machine(Directory, "Directory protocol")
action(f_forwardRequestDirIsRequestor, "\f", desc="Forward request to owner") {
peek(requestQueue_in, RequestMsg) {
enqueue(forwardNetwork_out, RequestMsg, directory_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := in_msg.Type;
out_msg.Requestor := machineID;
out_msg.RequestorMachine := machineIDToMachineType(in_msg.Requestor);
- out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.Addr).Owner);
+ out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.addr).Owner);
out_msg.Acks := getDirectoryEntry(address).Sharers.count();
if (getDirectoryEntry(address).Sharers.isElement(in_msg.Requestor)) {
out_msg.Acks := out_msg.Acks - 1;
@@ -421,16 +421,16 @@ machine(Directory, "Directory protocol")
action(g_sendInvalidations, "g", desc="Send invalidations to sharers, not including the requester") {
peek(requestQueue_in, RequestMsg) {
- if ((getDirectoryEntry(in_msg.Addr).Sharers.count() > 1) ||
- ((getDirectoryEntry(in_msg.Addr).Sharers.count() > 0) &&
- (getDirectoryEntry(in_msg.Addr).Sharers.isElement(in_msg.Requestor) == false))) {
+ if ((getDirectoryEntry(in_msg.addr).Sharers.count() > 1) ||
+ ((getDirectoryEntry(in_msg.addr).Sharers.count() > 0) &&
+ (getDirectoryEntry(in_msg.addr).Sharers.isElement(in_msg.Requestor) == false))) {
enqueue(forwardNetwork_out, RequestMsg, directory_latency) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Type := CoherenceRequestType:INV;
out_msg.Requestor := in_msg.Requestor;
out_msg.RequestorMachine := machineIDToMachineType(in_msg.Requestor);
- // out_msg.Destination := getDirectoryEntry(in_msg.Addr).Sharers;
- out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.Addr).Sharers);
+ // out_msg.Destination := getDirectoryEntry(in_msg.addr).Sharers;
+ out_msg.Destination.addNetDest(getDirectoryEntry(in_msg.addr).Sharers);
out_msg.Destination.remove(in_msg.Requestor);
out_msg.MessageSize := MessageSizeType:Invalidate_Control;
}
@@ -508,7 +508,7 @@ machine(Directory, "Directory protocol")
action(a_sendDMAAck, "\a", desc="Send DMA Ack that write completed, along with Inv Ack count") {
peek(requestQueue_in, RequestMsg) {
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.SenderMachine := MachineType:Directory;
out_msg.Destination.add(in_msg.Requestor);
@@ -523,7 +523,7 @@ machine(Directory, "Directory protocol")
action(a_sendDMAAck2, "\aa", desc="Send DMA Ack that write completed, along with Inv Ack count") {
peek(unblockNetwork_in, ResponseMsg) {
enqueue(responseNetwork_out, ResponseMsg, 1) {
- out_msg.Addr := address;
+ out_msg.addr := address;
out_msg.Sender := machineID;
out_msg.SenderMachine := MachineType:Directory;
if (is_valid(tbe)) {
@@ -541,7 +541,7 @@ machine(Directory, "Directory protocol")
peek (requestQueue_in, RequestMsg) {
TBEs.allocate(address);
set_tbe(TBEs[address]);
- tbe.PhysicalAddress := in_msg.Addr;
+ tbe.PhysicalAddress := in_msg.addr;
tbe.Len := in_msg.Len;
tbe.DataBlk := in_msg.DataBlk;
tbe.Requestor := in_msg.Requestor;