From 6a288d9de3422024b9e99caa8b3717d98e467314 Mon Sep 17 00:00:00 2001 From: David Hashe Date: Mon, 20 Jul 2015 09:15:18 -0500 Subject: 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) { ... } --- src/mem/ruby/slicc_interface/AbstractController.hh | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/mem/ruby') 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 #include #include @@ -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: -- cgit v1.2.3