summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/AbstractController.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:47 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2014-09-01 16:55:47 -0500
commit7a0d5aafe4b845a2d1cff6210d7c6ee66e8aba61 (patch)
tree6ef6157a33d226688f2909998b71936976ee755b /src/mem/ruby/slicc_interface/AbstractController.hh
parent00286fc5cbb7b8635d56eb335fed11d1499e2552 (diff)
downloadgem5-7a0d5aafe4b845a2d1cff6210d7c6ee66e8aba61.tar.xz
ruby: message buffers: significant changes
This patch is the final patch in a series of patches. The aim of the series is to make ruby more configurable than it was. More specifically, the connections between controllers are not at all possible (unless one is ready to make significant changes to the coherence protocol). Moreover the buffers themselves are magically connected to the network inside the slicc code. These connections are not part of the configuration file. This patch makes changes so that these connections will now be made in the python configuration files associated with the protocols. This requires each state machine to expose the message buffers it uses for input and output. So, the patch makes these buffers configurable members of the machines. The patch drops the slicc code that usd to connect these buffers to the network. Now these buffers are exposed to the python configuration system as Master and Slave ports. In the configuration files, any master port can be connected any slave port. The file pyobject.cc has been modified to take care of allocating the actual message buffer. This is inline with how other port connections work.
Diffstat (limited to 'src/mem/ruby/slicc_interface/AbstractController.hh')
-rw-r--r--src/mem/ruby/slicc_interface/AbstractController.hh19
1 files changed, 3 insertions, 16 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh
index 36b4665c3..42d158653 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.hh
+++ b/src/mem/ruby/slicc_interface/AbstractController.hh
@@ -96,6 +96,9 @@ class AbstractController : public ClockedObject, public Consumer
virtual void collateStats()
{fatal("collateStats() should be overridden!");}
+ //! Set the message buffer with given name.
+ virtual void setNetQueue(const std::string& name, MessageBuffer *b) = 0;
+
public:
MachineID getMachineID() const { return m_machineID; }
@@ -103,25 +106,12 @@ class AbstractController : public ClockedObject, public Consumer
Stats::Histogram& getDelayVCHist(uint32_t index)
{ return *(m_delayVCHistogram[index]); }
- MessageBuffer *getPeerQueue(uint32_t pid)
- {
- std::map<uint32_t, MessageBuffer *>::iterator it =
- peerQueueMap.find(pid);
- assert(it != peerQueueMap.end());
- return (*it).second;
- }
-
protected:
//! Profiles original cache requests including PUTs
void profileRequest(const std::string &request);
//! Profiles the delay associated with messages.
void profileMsgDelay(uint32_t virtualNetwork, Cycles delay);
- //! Function for connecting peer controllers
- void connectWithPeer(AbstractController *);
- virtual void getQueuesFromPeer(AbstractController *)
- { fatal("getQueuesFromPeer() should be called only if implemented!"); }
-
void stallBuffer(MessageBuffer* buf, Address addr);
void wakeUpBuffers(Address addr);
void wakeUpAllBuffers(Address addr);
@@ -147,9 +137,6 @@ class AbstractController : public ClockedObject, public Consumer
unsigned int m_buffer_size;
Cycles m_recycle_latency;
- //! Map from physical network number to the Message Buffer.
- std::map<uint32_t, MessageBuffer*> peerQueueMap;
-
//! Counter for the number of cycles when the transitions carried out
//! were equal to the maximum allowed
Stats::Scalar m_fully_busy_cycles;