diff options
author | Jason Power <powerjg@cs.wisc.edu> | 2013-04-09 16:15:06 -0500 |
---|---|---|
committer | Jason Power <powerjg@cs.wisc.edu> | 2013-04-09 16:15:06 -0500 |
commit | 88d34665d0db85d86b1e62388d0f34e296bf191f (patch) | |
tree | 6ca0f5d263a66672b2c0ec5343c7463f9dab0a68 /src/mem/ruby/buffers/MessageBuffer.hh | |
parent | 19cc9fc6bd4c725a37b3442a03fc7d874d160930 (diff) | |
download | gem5-88d34665d0db85d86b1e62388d0f34e296bf191f.tar.xz |
Ruby: More descriptive message buffer connection fatal
When connecting message buffers between Ruby controllers, it is
easy to mistakenly connect multiple controllers to the same message
buffer. This patch prints a more descriptive fatal message than the
previous assert statement in order to facilitate easier debugging.
Diffstat (limited to 'src/mem/ruby/buffers/MessageBuffer.hh')
-rw-r--r-- | src/mem/ruby/buffers/MessageBuffer.hh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/mem/ruby/buffers/MessageBuffer.hh b/src/mem/ruby/buffers/MessageBuffer.hh index ae1635b69..d45ec6bd9 100644 --- a/src/mem/ruby/buffers/MessageBuffer.hh +++ b/src/mem/ruby/buffers/MessageBuffer.hh @@ -79,7 +79,11 @@ class MessageBuffer void setPriority(int rank) { m_priority_rank = rank; } void setConsumer(Consumer* consumer) { - assert(m_consumer == NULL); + if (m_consumer != NULL) { + fatal("Trying to connect %s to MessageBuffer %s. \ + \n%s already connected. Check the cntrl_id's.\n", + *consumer, *this, *m_consumer); + } m_consumer = consumer; } |