From 6b52f828cc886cd5d84dfb76a61140869c6add23 Mon Sep 17 00:00:00 2001 From: Brad Beckmann Date: Mon, 20 Jul 2015 09:15:18 -0500 Subject: [PATCH] ruby: improved stall and wait debugging Added dprintfs and asserts for identifying stall and wait bugs. --- src/mem/ruby/network/MessageBuffer.cc | 2 +- src/mem/ruby/slicc_interface/AbstractController.cc | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mem/ruby/network/MessageBuffer.cc b/src/mem/ruby/network/MessageBuffer.cc index d823c0a1f..484d2876b 100644 --- a/src/mem/ruby/network/MessageBuffer.cc +++ b/src/mem/ruby/network/MessageBuffer.cc @@ -295,7 +295,7 @@ MessageBuffer::reanalyzeList(list <, Tick schdTick) void MessageBuffer::reanalyzeMessages(const Address& addr) { - DPRINTF(RubyQueue, "ReanalyzeMessages\n"); + DPRINTF(RubyQueue, "ReanalyzeMessages %s\n", addr); assert(m_stall_msg_map.count(addr) > 0); Tick curTick = m_receiver->clockEdge(); diff --git a/src/mem/ruby/slicc_interface/AbstractController.cc b/src/mem/ruby/slicc_interface/AbstractController.cc index 1ac99c882..dfcd61ab2 100644 --- a/src/mem/ruby/slicc_interface/AbstractController.cc +++ b/src/mem/ruby/slicc_interface/AbstractController.cc @@ -26,8 +26,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include "mem/protocol/MemoryMsg.hh" #include "mem/ruby/slicc_interface/AbstractController.hh" + +#include "debug/RubyQueue.hh" +#include "mem/protocol/MemoryMsg.hh" #include "mem/ruby/system/Sequencer.hh" #include "mem/ruby/system/System.hh" #include "sim/system.hh" @@ -103,6 +105,9 @@ AbstractController::stallBuffer(MessageBuffer* buf, Address addr) msgVec->resize(m_in_ports, NULL); m_waiting_buffers[addr] = msgVec; } + DPRINTF(RubyQueue, "stalling %s port %d addr %s\n", buf, m_cur_in_port, + addr); + assert(m_in_ports > m_cur_in_port); (*(m_waiting_buffers[addr]))[m_cur_in_port] = buf; } -- 2.30.2