From 7c39d5df7ea61a39ad1b9a3aa70d22f0e2943b21 Mon Sep 17 00:00:00 2001 From: Lena Olson Date: Tue, 18 Jun 2013 16:58:33 -0500 Subject: 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 --- src/mem/protocol/MOESI_CMP_directory-L1cache.sm | 98 ++++++++++++------------- 1 file changed, 49 insertions(+), 49 deletions(-) (limited to 'src/mem/protocol/MOESI_CMP_directory-L1cache.sm') diff --git a/src/mem/protocol/MOESI_CMP_directory-L1cache.sm b/src/mem/protocol/MOESI_CMP_directory-L1cache.sm index c6acd43bf..5b09e220f 100644 --- a/src/mem/protocol/MOESI_CMP_directory-L1cache.sm +++ b/src/mem/protocol/MOESI_CMP_directory-L1cache.sm @@ -116,7 +116,7 @@ machine(L1Cache, "Directory protocol") // TBE fields structure(TBE, desc="...") { - Address Address, desc="Physical address for this TBE"; + Address Addr, desc="Physical address for this TBE"; State TBEState, desc="Transient state"; DataBlock DataBlk, desc="data for the block, required for concurrent writebacks"; bool Dirty, desc="Is the data dirty (different than memory)?"; @@ -263,8 +263,8 @@ machine(L1Cache, "Directory protocol") if (triggerQueue_in.isReady()) { peek(triggerQueue_in, TriggerMsg) { if (in_msg.Type == TriggerType:ALL_ACKS) { - trigger(Event:All_acks, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:All_acks, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else { error("Unexpected message"); } @@ -277,36 +277,36 @@ machine(L1Cache, "Directory protocol") // Request Network in_port(requestNetwork_in, RequestMsg, requestToL1Cache) { if (requestNetwork_in.isReady()) { - peek(requestNetwork_in, RequestMsg, block_on="Address") { + peek(requestNetwork_in, RequestMsg, block_on="Addr") { assert(in_msg.Destination.isElement(machineID)); DPRINTF(RubySlicc, "L1 received: %s\n", in_msg.Type); if (in_msg.Type == CoherenceRequestType:GETX || in_msg.Type == CoherenceRequestType:DMA_WRITE) { if (in_msg.Requestor == machineID && in_msg.RequestorMachine == MachineType:L1Cache) { - trigger(Event:Own_GETX, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Own_GETX, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else { - trigger(Event:Fwd_GETX, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Fwd_GETX, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } } else if (in_msg.Type == CoherenceRequestType:GETS) { - trigger(Event:Fwd_GETS, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Fwd_GETS, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceRequestType:DMA_READ) { - trigger(Event:Fwd_DMA, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Fwd_DMA, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceRequestType:WB_ACK) { - trigger(Event:Writeback_Ack, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Writeback_Ack, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceRequestType:WB_ACK_DATA) { - trigger(Event:Writeback_Ack_Data, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Writeback_Ack_Data, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceRequestType:WB_NACK) { - trigger(Event:Writeback_Nack, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Writeback_Nack, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceRequestType:INV) { - trigger(Event:Inv, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Inv, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else { error("Unexpected message"); } @@ -317,16 +317,16 @@ machine(L1Cache, "Directory protocol") // Response Network in_port(responseToL1Cache_in, ResponseMsg, responseToL1Cache) { if (responseToL1Cache_in.isReady()) { - peek(responseToL1Cache_in, ResponseMsg, block_on="Address") { + peek(responseToL1Cache_in, ResponseMsg, block_on="Addr") { if (in_msg.Type == CoherenceResponseType:ACK) { - trigger(Event:Ack, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Ack, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceResponseType:DATA) { - trigger(Event:Data, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Data, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else if (in_msg.Type == CoherenceResponseType:DATA_EXCLUSIVE) { - trigger(Event:Exclusive_Data, in_msg.Address, - getCacheEntry(in_msg.Address), TBEs[in_msg.Address]); + trigger(Event:Exclusive_Data, in_msg.Addr, + getCacheEntry(in_msg.Addr), TBEs[in_msg.Addr]); } else { error("Unexpected message"); } @@ -415,7 +415,7 @@ machine(L1Cache, "Directory protocol") action(a_issueGETS, "a", desc="Issue GETS") { peek(mandatoryQueue_in, RubyRequest) { enqueue(requestNetwork_out, RequestMsg, latency= request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceRequestType:GETS; out_msg.Requestor := machineID; out_msg.RequestorMachine := MachineType:L1Cache; @@ -431,7 +431,7 @@ machine(L1Cache, "Directory protocol") action(b_issueGETX, "b", desc="Issue GETX") { peek(mandatoryQueue_in, RubyRequest) { enqueue(requestNetwork_out, RequestMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceRequestType:GETX; out_msg.Requestor := machineID; out_msg.RequestorMachine := MachineType:L1Cache; @@ -447,7 +447,7 @@ machine(L1Cache, "Directory protocol") action(d_issuePUTX, "d", desc="Issue PUTX") { // enqueue(writebackNetwork_out, RequestMsg, latency=request_latency) { enqueue(requestNetwork_out, RequestMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceRequestType:PUTX; out_msg.Requestor := machineID; out_msg.RequestorMachine := MachineType:L1Cache; @@ -460,7 +460,7 @@ machine(L1Cache, "Directory protocol") action(dd_issuePUTO, "\d", desc="Issue PUTO") { // enqueue(writebackNetwork_out, RequestMsg, latency=request_latency) { enqueue(requestNetwork_out, RequestMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceRequestType:PUTO; out_msg.Requestor := machineID; out_msg.RequestorMachine := MachineType:L1Cache; @@ -473,7 +473,7 @@ machine(L1Cache, "Directory protocol") action(dd_issuePUTS, "\ds", desc="Issue PUTS") { // enqueue(writebackNetwork_out, RequestMsg, latency=request_latency) { enqueue(requestNetwork_out, RequestMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceRequestType:PUTS; out_msg.Requestor := machineID; out_msg.RequestorMachine := MachineType:L1Cache; @@ -488,7 +488,7 @@ machine(L1Cache, "Directory protocol") assert(is_valid(cache_entry)); if (in_msg.RequestorMachine == MachineType:L2Cache) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -500,11 +500,11 @@ machine(L1Cache, "Directory protocol") out_msg.Acks := in_msg.Acks; out_msg.MessageSize := MessageSizeType:Response_Data; } - DPRINTF(RubySlicc, "Sending data to L2: %s\n", in_msg.Address); + DPRINTF(RubySlicc, "Sending data to L2: %s\n", in_msg.Addr); } else { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -523,7 +523,7 @@ machine(L1Cache, "Directory protocol") action(e_sendDataToL2, "ee", desc="Send data from cache to requestor") { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { assert(is_valid(cache_entry)); - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -541,7 +541,7 @@ machine(L1Cache, "Directory protocol") assert(is_valid(cache_entry)); if (in_msg.RequestorMachine == MachineType:L2Cache) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -556,7 +556,7 @@ machine(L1Cache, "Directory protocol") } else { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -575,7 +575,7 @@ machine(L1Cache, "Directory protocol") peek(requestNetwork_in, RequestMsg) { if (in_msg.RequestorMachine == MachineType:L1Cache) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:ACK; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -586,7 +586,7 @@ machine(L1Cache, "Directory protocol") } else { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:ACK; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -601,7 +601,7 @@ machine(L1Cache, "Directory protocol") action(g_sendUnblock, "g", desc="Send unblock to memory") { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:UNBLOCK; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -613,7 +613,7 @@ machine(L1Cache, "Directory protocol") action(gg_sendUnblockExclusive, "\g", desc="Send unblock exclusive to memory") { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:UNBLOCK_EXCLUSIVE; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -684,7 +684,7 @@ machine(L1Cache, "Directory protocol") assert(is_valid(tbe)); if (tbe.NumPendingMsgs == 0) { enqueue(triggerQueue_out, TriggerMsg) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := TriggerType:ALL_ACKS; } } @@ -697,7 +697,7 @@ machine(L1Cache, "Directory protocol") action(ub_dmaUnblockL2Cache, "ub", desc="Send dma ack to l2 cache") { peek(requestNetwork_in, RequestMsg) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DMA_ACK; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -716,7 +716,7 @@ machine(L1Cache, "Directory protocol") if (in_msg.RequestorMachine == MachineType:L1Cache || in_msg.RequestorMachine == MachineType:DMA) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -730,7 +730,7 @@ machine(L1Cache, "Directory protocol") } else { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -751,7 +751,7 @@ machine(L1Cache, "Directory protocol") assert(is_valid(tbe)); if (in_msg.RequestorMachine == MachineType:L1Cache) { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -764,7 +764,7 @@ machine(L1Cache, "Directory protocol") } else { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { - out_msg.Address := address; + out_msg.Addr := address; out_msg.Type := CoherenceResponseType:DATA_EXCLUSIVE; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; @@ -783,7 +783,7 @@ machine(L1Cache, "Directory protocol") action(qq_sendWBDataFromTBEToL2, "\q", desc="Send data from TBE to L2") { enqueue(responseNetwork_out, ResponseMsg, latency=request_latency) { assert(is_valid(tbe)); - out_msg.Address := address; + out_msg.Addr := address; out_msg.Sender := machineID; out_msg.SenderMachine := MachineType:L1Cache; out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, -- cgit v1.2.3