ruby: make the max_size variable of the MessageBuffer unsigned
This commit is contained in:
parent
919baa603d
commit
67cd04b6fe
4 changed files with 8 additions and 7 deletions
|
@ -49,7 +49,7 @@ MessageBuffer::MessageBuffer(const string &name)
|
||||||
|
|
||||||
m_ordering_set = false;
|
m_ordering_set = false;
|
||||||
m_strict_fifo = true;
|
m_strict_fifo = true;
|
||||||
m_max_size = -1;
|
m_max_size = 0;
|
||||||
m_randomization = true;
|
m_randomization = true;
|
||||||
m_size_last_time_size_checked = 0;
|
m_size_last_time_size_checked = 0;
|
||||||
m_size_at_cycle_start = 0;
|
m_size_at_cycle_start = 0;
|
||||||
|
@ -63,7 +63,7 @@ MessageBuffer::MessageBuffer(const string &name)
|
||||||
m_vnet_id = 0;
|
m_vnet_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
int
|
unsigned int
|
||||||
MessageBuffer::getSize()
|
MessageBuffer::getSize()
|
||||||
{
|
{
|
||||||
if (m_time_last_time_size_checked != m_receiver->curCycle()) {
|
if (m_time_last_time_size_checked != m_receiver->curCycle()) {
|
||||||
|
@ -79,7 +79,7 @@ MessageBuffer::areNSlotsAvailable(unsigned int n)
|
||||||
{
|
{
|
||||||
|
|
||||||
// fast path when message buffers have infinite size
|
// fast path when message buffers have infinite size
|
||||||
if (m_max_size == -1) {
|
if (m_max_size == 0) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -134,8 +134,8 @@ class MessageBuffer
|
||||||
m_ordering_set = true;
|
m_ordering_set = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void resize(int size) { m_max_size = size; }
|
void resize(unsigned int size) { m_max_size = size; }
|
||||||
int getSize();
|
unsigned int getSize();
|
||||||
void setRandomization(bool random_flag) { m_randomization = random_flag; }
|
void setRandomization(bool random_flag) { m_randomization = random_flag; }
|
||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
|
@ -146,7 +146,7 @@ class AbstractController : public ClockedObject, public Consumer
|
||||||
unsigned int m_cur_in_port;
|
unsigned int m_cur_in_port;
|
||||||
int m_number_of_TBEs;
|
int m_number_of_TBEs;
|
||||||
int m_transitions_per_cycle;
|
int m_transitions_per_cycle;
|
||||||
int m_buffer_size;
|
unsigned int m_buffer_size;
|
||||||
Cycles m_recycle_latency;
|
Cycles m_recycle_latency;
|
||||||
|
|
||||||
//! Map from physical network number to the Message Buffer.
|
//! Map from physical network number to the Message Buffer.
|
||||||
|
|
|
@ -40,7 +40,8 @@ class RubyController(ClockedObject):
|
||||||
|
|
||||||
transitions_per_cycle = \
|
transitions_per_cycle = \
|
||||||
Param.Int(32, "no. of SLICC state machine transitions per cycle")
|
Param.Int(32, "no. of SLICC state machine transitions per cycle")
|
||||||
buffer_size = Param.Int(0, "max buffer size 0 means infinite")
|
buffer_size = Param.UInt32(0, "max buffer size 0 means infinite")
|
||||||
|
|
||||||
recycle_latency = Param.Cycles(10, "")
|
recycle_latency = Param.Cycles(10, "")
|
||||||
number_of_TBEs = Param.Int(256, "")
|
number_of_TBEs = Param.Int(256, "")
|
||||||
ruby_system = Param.RubySystem("")
|
ruby_system = Param.RubySystem("")
|
||||||
|
|
Loading…
Reference in a new issue