summaryrefslogtreecommitdiff
path: root/src/mem
diff options
context:
space:
mode:
Diffstat (limited to 'src/mem')
-rw-r--r--src/mem/ruby/network/MessageBuffer.cc4
-rw-r--r--src/mem/ruby/network/MessageBuffer.py5
-rw-r--r--src/mem/ruby/system/RubySystem.py4
3 files changed, 10 insertions, 3 deletions
diff --git a/src/mem/ruby/network/MessageBuffer.cc b/src/mem/ruby/network/MessageBuffer.cc
index f4eca3b1e..560b69c63 100644
--- a/src/mem/ruby/network/MessageBuffer.cc
+++ b/src/mem/ruby/network/MessageBuffer.cc
@@ -156,7 +156,9 @@ MessageBuffer::enqueue(MsgPtr message, Tick current_time, Tick delta)
assert(delta > 0);
Tick arrival_time = 0;
- if (!RubySystem::getRandomization() || !m_randomization) {
+ // random delays are inserted if either RubySystem level randomization flag
+ // is turned on, or the buffer level randomization is set
+ if (!RubySystem::getRandomization() && !m_randomization) {
// No randomization
arrival_time = current_time + delta;
} else {
diff --git a/src/mem/ruby/network/MessageBuffer.py b/src/mem/ruby/network/MessageBuffer.py
index d8a028532..b8a44ba91 100644
--- a/src/mem/ruby/network/MessageBuffer.py
+++ b/src/mem/ruby/network/MessageBuffer.py
@@ -37,7 +37,10 @@ class MessageBuffer(SimObject):
ordered = Param.Bool(False, "Whether the buffer is ordered")
buffer_size = Param.Unsigned(0, "Maximum number of entries to buffer \
(0 allows infinite entries)")
- randomization = Param.Bool(False, "")
+ randomization = Param.Bool(False, "Insert random delays on message \
+ enqueue times (enforced to have \
+ random delays if RubySystem \
+ randomization flag is True)")
master = MasterPort("Master port to MessageBuffer receiver")
slave = SlavePort("Slave port from MessageBuffer sender")
diff --git a/src/mem/ruby/system/RubySystem.py b/src/mem/ruby/system/RubySystem.py
index 358f4dfca..5dcfe2f81 100644
--- a/src/mem/ruby/system/RubySystem.py
+++ b/src/mem/ruby/system/RubySystem.py
@@ -35,7 +35,9 @@ class RubySystem(ClockedObject):
type = 'RubySystem'
cxx_header = "mem/ruby/system/RubySystem.hh"
randomization = Param.Bool(False,
- "insert random delays on message enqueue times");
+ "insert random delays on message enqueue times (if True, all message \
+ buffers are enforced to have randomization; otherwise, a message \
+ buffer set its own flag to enable/disable randomization)");
block_size_bytes = Param.UInt32(64,
"default cache block size; must be a power of two");
memory_size_bits = Param.UInt32(64,