summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/AbstractController.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-01-04 00:03:31 -0600
committerNilay Vaish <nilay@cs.wisc.edu>2014-01-04 00:03:31 -0600
commit5b1804e3bdb88aea7a198ff25617bb671cd34769 (patch)
tree38c8644bb17caaa708e6c678f0f495d7db5f74dc /src/mem/ruby/slicc_interface/AbstractController.hh
parent9853ef6651e76883615595bf76f983ed43234f96 (diff)
downloadgem5-5b1804e3bdb88aea7a198ff25617bb671cd34769.tar.xz
ruby: add support for clusters
A cluster over here means a set of controllers that can be accessed only by a certain set of cores. For example, consider a two level hierarchy. Assume there are 4 L1 controllers (private) and 2 L2 controllers. We can have two different hierarchies here: a. the address space is partitioned between the two L2 controllers. Each L1 controller accesses both the L2 controllers. In this case, each L1 controller is a cluster initself. b. both the L2 controllers can cache any address. An L1 controller has access to only one of the L2 controllers. In this case, each L2 controller along with the L1 controllers that access it, form a cluster. This patch allows for each controller to have a cluster ID, which is 0 by default. By setting the cluster ID properly, one can instantiate hierarchies with clusters. Note that the coherence protocol might have to be changed as well.
Diffstat (limited to 'src/mem/ruby/slicc_interface/AbstractController.hh')
-rw-r--r--src/mem/ruby/slicc_interface/AbstractController.hh12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh
index 3bf331c62..345eefa0a 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.hh
+++ b/src/mem/ruby/slicc_interface/AbstractController.hh
@@ -56,7 +56,7 @@ class AbstractController : public ClockedObject, public Consumer
void init();
const Params *params() const { return (const Params *)_params; }
- const int & getVersion() const { return m_version; }
+ const NodeID getVersion() const { return m_version; }
void initNetworkPtr(Network* net_ptr) { m_net_ptr = net_ptr; }
// return instance name
@@ -133,13 +133,12 @@ class AbstractController : public ClockedObject, public Consumer
void wakeUpAllBuffers();
protected:
- int m_transitions_per_cycle;
- int m_buffer_size;
- Cycles m_recycle_latency;
std::string m_name;
NodeID m_version;
- Network* m_net_ptr;
MachineID m_machineID;
+ NodeID m_clusterID;
+
+ Network* m_net_ptr;
bool m_is_blocking;
std::map<Address, MessageBuffer*> m_block_map;
typedef std::vector<MessageBuffer*> MsgVecType;
@@ -148,6 +147,9 @@ class AbstractController : public ClockedObject, public Consumer
unsigned int m_in_ports;
unsigned int m_cur_in_port;
int m_number_of_TBEs;
+ int m_transitions_per_cycle;
+ int m_buffer_size;
+ Cycles m_recycle_latency;
//! Map from physical network number to the Message Buffer.
std::map<uint32_t, MessageBuffer*> peerQueueMap;