diff options
author | Nilay Vaish <nilay@cs.wisc.edu> | 2013-12-20 20:34:03 -0600 |
---|---|---|
committer | Nilay Vaish <nilay@cs.wisc.edu> | 2013-12-20 20:34:03 -0600 |
commit | f5b52a265afe9d4bd0144b0e2d7a0d9fcdbcbd3f (patch) | |
tree | 5ff88c6c47dc2ce1eb3c4d1492ae0090c1431f4d /src/mem/protocol | |
parent | 50d250f514f7031e7e544e69141fad7a1b000257 (diff) | |
download | gem5-f5b52a265afe9d4bd0144b0e2d7a0d9fcdbcbd3f.tar.xz |
ruby: mesi: remove owner and sharer fields from directory tags
The directory controller should not have the sharer field since there is
only one level 2 cache. Anyway the field was not in use. The owner field
was being used to track the l2 cache version (in case of distributed l2) that
has the cache block under consideration. The information is not required
since the version of the level 2 cache can be obtained from a subset of the
address bits.
Diffstat (limited to 'src/mem/protocol')
-rw-r--r-- | src/mem/protocol/MESI_CMP_directory-dir.sm | 50 |
1 files changed, 11 insertions, 39 deletions
diff --git a/src/mem/protocol/MESI_CMP_directory-dir.sm b/src/mem/protocol/MESI_CMP_directory-dir.sm index 26a5c38df..eb87b8c9b 100644 --- a/src/mem/protocol/MESI_CMP_directory-dir.sm +++ b/src/mem/protocol/MESI_CMP_directory-dir.sm @@ -38,14 +38,15 @@ machine(Directory, "MESI_CMP_filter_directory protocol") : DirectoryMemory * directory, MemoryControl * memBuffer, Cycles to_mem_ctrl_latency = 1, - Cycles directory_latency = 6 + Cycles directory_latency = 6, + int l2_select_num_bits { - - MessageBuffer requestToDir, network="From", virtual_network="0", ordered="false", vnet_type="request"; - MessageBuffer responseToDir, network="From", virtual_network="1", ordered="false", vnet_type="response"; - - MessageBuffer requestFromDir, network="To", virtual_network="0", ordered="false", vnet_type="request"; - MessageBuffer responseFromDir, network="To", virtual_network="1", ordered="false", vnet_type="response"; + MessageBuffer requestToDir, network="From", virtual_network="0", + ordered="false", vnet_type="request"; + MessageBuffer responseToDir, network="From", virtual_network="1", + ordered="false", vnet_type="response"; + MessageBuffer responseFromDir, network="To", virtual_network="1", + ordered="false", vnet_type="response"; // STATES state_declaration(State, desc="Directory states", default="Directory_State_I") { @@ -82,8 +83,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") structure(Entry, desc="...", interface="AbstractEntry") { State DirectoryState, desc="Directory state"; DataBlock DataBlk, desc="data for the block"; - NetDest Sharers, desc="Sharers for this block"; - NetDest Owner, desc="Owner of this block"; } // TBE entries for DMA requests @@ -104,6 +103,7 @@ machine(Directory, "MESI_CMP_filter_directory protocol") // ** OBJECTS ** + int l2_select_low_bit, default="RubySystem::getBlockSizeBits()"; TBETable TBEs, template="<Directory_TBE>", constructor="m_number_of_TBEs"; void set_tbe(TBE tbe); @@ -133,21 +133,11 @@ machine(Directory, "MESI_CMP_filter_directory protocol") } void setState(TBE tbe, Address addr, State state) { - if (is_valid(tbe)) { tbe.TBEState := state; } if (directory.isPresent(addr)) { - - if (state == State:I) { - assert(getDirectoryEntry(addr).Owner.count() == 0); - assert(getDirectoryEntry(addr).Sharers.count() == 0); - } else if (state == State:M) { - assert(getDirectoryEntry(addr).Owner.count() == 1); - assert(getDirectoryEntry(addr).Sharers.count() == 0); - } - getDirectoryEntry(addr).DirectoryState := state; } } @@ -416,22 +406,14 @@ machine(Directory, "MESI_CMP_filter_directory protocol") requestNetwork_in.recycle(); } - - action(e_ownerIsRequestor, "e", desc="The owner is now the requestor") { - peek(requestNetwork_in, RequestMsg) { - getDirectoryEntry(address).Owner.clear(); - getDirectoryEntry(address).Owner.add(in_msg.Requestor); - } - } - - action(inv_sendCacheInvalidate, "inv", desc="Invalidate a cache block") { peek(requestNetwork_in, RequestMsg) { enqueue(responseNetwork_out, ResponseMsg, latency=directory_latency) { out_msg.Addr := address; out_msg.Type := CoherenceResponseType:INV; out_msg.Sender := machineID; - out_msg.Destination := getDirectoryEntry(address).Owner; + out_msg.Destination.add(mapAddressToRange(address, MachineType:L2Cache, + l2_select_low_bit, l2_select_num_bits)); out_msg.MessageSize := MessageSizeType:Response_Control; } } @@ -450,10 +432,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") } } - action(c_clearOwner, "c", desc="Clear the owner field") { - getDirectoryEntry(address).Owner.clear(); - } - action(v_allocateTBE, "v", desc="Allocate TBE") { peek(requestNetwork_in, RequestMsg) { TBEs.allocate(address); @@ -500,10 +478,8 @@ machine(Directory, "MESI_CMP_filter_directory protocol") // TRANSITIONS - transition(I, Fetch, IM) { qf_queueMemoryFetchRequest; - e_ownerIsRequestor; j_popIncomingRequestQueue; } @@ -514,7 +490,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") } //added by SS transition(M, CleanReplacement, I) { - c_clearOwner; a_sendAck; k_popIncomingResponseQueue; } @@ -526,7 +501,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") } transition(MI, Memory_Ack, I) { - c_clearOwner; aa_sendAck; l_popMemQueue; kd_wakeUpDependents; @@ -580,7 +554,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") transition(M_DRDI, Memory_Ack, I) { aa_sendAck; - c_clearOwner; l_popMemQueue; kd_wakeUpDependents; } @@ -600,7 +573,6 @@ machine(Directory, "MESI_CMP_filter_directory protocol") transition(M_DWRI, Memory_Ack, I) { dwt_writeDMADataFromTBE; aa_sendAck; - c_clearOwner; da_sendDMAAck; w_deallocateTBE; l_popMemQueue; |