summaryrefslogtreecommitdiff
path: root/src/mem/ruby/slicc_interface
diff options
context:
space:
mode:
authorDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
committerDavid Hashe <david.hashe@amd.com>2015-07-20 09:15:18 -0500
commit6a288d9de3422024b9e99caa8b3717d98e467314 (patch)
treecf47855e262bccc800de1da1325c4be3f3e1dd9a /src/mem/ruby/slicc_interface
parentb609b032aaa02348884bd66396b39a3ad1a056cc (diff)
downloadgem5-6a288d9de3422024b9e99caa8b3717d98e467314.tar.xz
slicc: support for multiple message types on the same buffer
This patch allows SLICC protocols to use more than one message type with a message buffer. For example, you can declare two in ports as such: in_port(ResponseQueue_in, ResponseMsg, responseFromDir, rank=3) { ... } in_port(tgtResponseQueue_in, TgtResponseMsg, responseFromDir, rank=2) { ... }
Diffstat (limited to 'src/mem/ruby/slicc_interface')
-rw-r--r--src/mem/ruby/slicc_interface/AbstractController.hh8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mem/ruby/slicc_interface/AbstractController.hh b/src/mem/ruby/slicc_interface/AbstractController.hh
index f8970fb59..e01a2a824 100644
--- a/src/mem/ruby/slicc_interface/AbstractController.hh
+++ b/src/mem/ruby/slicc_interface/AbstractController.hh
@@ -29,6 +29,7 @@
#ifndef __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__
#define __MEM_RUBY_SLICC_INTERFACE_ABSTRACTCONTROLLER_HH__
+#include <exception>
#include <iostream>
#include <string>
@@ -49,6 +50,13 @@
class Network;
+// used to communicate that an in_port peeked the wrong message type
+class RejectException: public std::exception
+{
+ virtual const char* what() const throw()
+ { return "Port rejected message based on type"; }
+};
+
class AbstractController : public MemObject, public Consumer
{
public: