summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface/Message.hh
diff options
context:
space:
mode:
authorNilay Vaish <nilay@cs.wisc.edu>2012-10-15 17:51:57 -0500
committerNilay Vaish <nilay@cs.wisc.edu>2012-10-15 17:51:57 -0500
commit5ffc16593997b35f4f1abbd149e01169e6bbcff5 (patch)
tree647411a3d027f2bdfaf750f65107affb6d9c002d /src/mem/ruby/slicc_interface/Message.hh
parent07ce90f7aa28a507493da905ba1881972250bb3a (diff)
downloadgem5-5ffc16593997b35f4f1abbd149e01169e6bbcff5.tar.xz
ruby: improved support for functional accesses
This patch adds support to different entities in the ruby memory system for more reliable functional read/write accesses. Only the simple network has been augmented as of now. Later on Garnet will also support functional accesses. The patch adds functional access code to all the different types of messages that protocols can send around. These messages are functionally accessed by going through the buffers maintained by the network entities. The patch also rectifies some of the bugs found in coherence protocols while testing the patch. With this patch applied, functional writes always succeed. But functional reads can still fail.
Diffstat (limited to 'src/mem/ruby/slicc_interface/Message.hh')
-rw-r--r--src/mem/ruby/slicc_interface/Message.hh12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/Message.hh b/src/mem/ruby/slicc_interface/Message.hh
index 48156a99a..7b94a01e2 100644
--- a/src/mem/ruby/slicc_interface/Message.hh
+++ b/src/mem/ruby/slicc_interface/Message.hh
@@ -61,6 +61,18 @@ class Message : public RefCounted
virtual void setIncomingLink(int) {}
virtual void setVnet(int) {}
+ /**
+ * The two functions below are used for reading / writing the message
+ * functionally. The methods return true if the address in the packet
+ * matches the address / address range in the message. Each message
+ * class that can be potentially searched for the address needs to
+ * implement these methods.
+ */
+ virtual bool functionalRead(Packet *pkt) = 0;
+ //{ fatal("Read functional access not implemented!"); }
+ virtual bool functionalWrite(Packet *pkt) = 0;
+ //{ fatal("Write functional access not implemented!"); }
+
void setDelayedCycles(const int& cycles) { m_DelayedCycles = cycles; }
const int& getDelayedCycles() const {return m_DelayedCycles;}
int& getDelayedCycles() {return m_DelayedCycles;}