summaryrefslogtreecommitdiff
path: root/src/mem/protocol/MI_example-msg.sm
diff options
context:
space:
mode:
authorLena Olson <lena@cs.wisc.edu>2013-06-18 16:58:33 -0500
committerLena Olson <lena@cs.wisc.edu>2013-06-18 16:58:33 -0500
commit7c39d5df7ea61a39ad1b9a3aa70d22f0e2943b21 (patch)
treed2d2ca457dd5a1d43ee2389ce7202b68f567b951 /src/mem/protocol/MI_example-msg.sm
parentd06064c38613662dfbf68a701052278b4018de8c (diff)
downloadgem5-7c39d5df7ea61a39ad1b9a3aa70d22f0e2943b21.tar.xz
ruby: restrict Address to being a type and not a variable name
Change all occurrances of Address as a variable name to instead use Addr. Address is an allowed name in slicc even when Address is also being used as a type, leading to declarations of "Address Address". While this works, it prevents adding another field of type Address because the compiler then thinks Address is a variable name, not type. Committed by: Nilay Vaish <nilay@cs.wisc.edu>
Diffstat (limited to 'src/mem/protocol/MI_example-msg.sm')
-rw-r--r--src/mem/protocol/MI_example-msg.sm12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/protocol/MI_example-msg.sm b/src/mem/protocol/MI_example-msg.sm
index 0645371f6..568b79786 100644
--- a/src/mem/protocol/MI_example-msg.sm
+++ b/src/mem/protocol/MI_example-msg.sm
@@ -51,7 +51,7 @@ enumeration(CoherenceResponseType, desc="...") {
// RequestMsg (and also forwarded requests)
structure(RequestMsg, desc="...", interface="NetworkMessage") {
- Address Address, desc="Physical address for this request";
+ Address Addr, desc="Physical address for this request";
CoherenceRequestType Type, desc="Type of request (GetS, GetX, PutX, etc)";
MachineID Requestor, desc="Node who initiated the request";
NetDest Destination, desc="Multicast destination mask";
@@ -61,7 +61,7 @@ structure(RequestMsg, desc="...", interface="NetworkMessage") {
bool functionalRead(Packet *pkt) {
// Valid data block is only present in PUTX messages
if (Type == CoherenceRequestType:PUTX) {
- return testAndRead(Address, DataBlk, pkt);
+ return testAndRead(Addr, DataBlk, pkt);
}
return false;
}
@@ -69,13 +69,13 @@ structure(RequestMsg, desc="...", interface="NetworkMessage") {
bool functionalWrite(Packet *pkt) {
// No check on message type required since the protocol should read
// data block from only those messages that contain valid data
- return testAndWrite(Address, DataBlk, pkt);
+ return testAndWrite(Addr, DataBlk, pkt);
}
}
// ResponseMsg (and also unblock requests)
structure(ResponseMsg, desc="...", interface="NetworkMessage") {
- Address Address, desc="Physical address for this request";
+ Address Addr, desc="Physical address for this request";
CoherenceResponseType Type, desc="Type of response (Ack, Data, etc)";
MachineID Sender, desc="Node who sent the data";
NetDest Destination, desc="Node to whom the data is sent";
@@ -86,13 +86,13 @@ structure(ResponseMsg, desc="...", interface="NetworkMessage") {
bool functionalRead(Packet *pkt) {
// A check on message type should appear here so that only those
// messages that contain data
- return testAndRead(Address, DataBlk, pkt);
+ return testAndRead(Addr, DataBlk, pkt);
}
bool functionalWrite(Packet *pkt) {
// No check on message type required since the protocol should read
// data block from only those messages that contain valid data
- return testAndWrite(Address, DataBlk, pkt);
+ return testAndWrite(Addr, DataBlk, pkt);
}
}