ruby: Added default names to message buffers
Added default names to message buffers created by the simple network.
This commit is contained in:
parent
ed54ecf1c8
commit
8b0f970084
3 changed files with 10 additions and 26 deletions
|
@ -34,27 +34,8 @@
|
|||
#include "mem/ruby/buffers/MessageBuffer.hh"
|
||||
#include "mem/ruby/system/System.hh"
|
||||
|
||||
MessageBuffer::MessageBuffer()
|
||||
{
|
||||
m_msg_counter = 0;
|
||||
m_consumer_ptr = NULL;
|
||||
m_ordering_set = false;
|
||||
m_strict_fifo = true;
|
||||
m_size = 0;
|
||||
m_max_size = -1;
|
||||
m_last_arrival_time = 0;
|
||||
m_randomization = true;
|
||||
m_size_last_time_size_checked = 0;
|
||||
m_time_last_time_size_checked = 0;
|
||||
m_time_last_time_enqueue = 0;
|
||||
m_time_last_time_pop = 0;
|
||||
m_size_at_cycle_start = 0;
|
||||
m_msgs_this_cycle = 0;
|
||||
m_not_avail_count = 0;
|
||||
m_priority_rank = 0;
|
||||
}
|
||||
|
||||
MessageBuffer::MessageBuffer(const Chip* chip_ptr) // The chip_ptr is ignored, but could be used for extra debugging
|
||||
MessageBuffer::MessageBuffer(const Chip* chip_ptr,
|
||||
const string &name)
|
||||
{
|
||||
m_msg_counter = 0;
|
||||
m_consumer_ptr = NULL;
|
||||
|
@ -72,6 +53,7 @@ MessageBuffer::MessageBuffer(const Chip* chip_ptr) // The chip_ptr is ignored,
|
|||
m_msgs_this_cycle = 0;
|
||||
m_not_avail_count = 0;
|
||||
m_priority_rank = 0;
|
||||
m_name = name;
|
||||
}
|
||||
|
||||
int MessageBuffer::getSize()
|
||||
|
|
|
@ -51,10 +51,10 @@ class Chip;
|
|||
class MessageBuffer {
|
||||
public:
|
||||
// Constructors
|
||||
MessageBuffer();
|
||||
MessageBuffer(const Chip* chip_ptr); // The chip_ptr is ignored, but could be used for extra debugging
|
||||
// The chip_ptr is ignored, but could be used for extra debugging
|
||||
MessageBuffer(const Chip* chip_ptr = NULL,
|
||||
const string &name = "");
|
||||
|
||||
// Use Default Destructor
|
||||
// ~MessageBuffer()
|
||||
|
||||
// Public Methods
|
||||
|
|
|
@ -87,8 +87,10 @@ void SimpleNetwork::init(const vector<string> & argv)
|
|||
m_toNetQueues[node].setSize(m_virtual_networks);
|
||||
m_fromNetQueues[node].setSize(m_virtual_networks);
|
||||
for (int j = 0; j < m_virtual_networks; j++) {
|
||||
m_toNetQueues[node][j] = new MessageBuffer;
|
||||
m_fromNetQueues[node][j] = new MessageBuffer;
|
||||
m_toNetQueues[node][j] = new MessageBuffer(NULL,
|
||||
"toNet node "+int_to_string(node)+" j "+int_to_string(j));
|
||||
m_fromNetQueues[node][j] = new MessageBuffer(NULL,
|
||||
"fromNet node "+int_to_string(node)+" j "+int_to_string(j));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue