Xianwei Zhang has submitted this change and it was merged. (
https://gem5-review.googlesource.com/c/public/gem5/+/12784 )
Change subject: mem-ruby: Fix a bug in MessageBuffer randomization
......................................................................
mem-ruby: Fix a bug in MessageBuffer randomization
In the previous implementation, messages are randomly inserted with
delays only if both RubySystem and MessageBuffer randomization flags
are set true. However, to find race conditions and cover more slicc
transitions, ruby random testers rely on setting RubySystem flag to
turn on randomization on all message buffers.
As a fix, this patch enables a message buffer to have randomization
when either RubySystem or its own flag is set.
Change-Id: I1e076908ff07e5846ebad4f4fc1c8f28d40bbfd4
Reviewed-on: https://gem5-review.googlesource.com/12784
Reviewed-by: Jason Lowe-Power <[email protected]>
Maintainer: Jason Lowe-Power <[email protected]>
---
M src/mem/ruby/network/MessageBuffer.cc
M src/mem/ruby/network/MessageBuffer.py
M src/mem/ruby/system/RubySystem.py
3 files changed, 10 insertions(+), 3 deletions(-)
Approvals:
Jason Lowe-Power: Looks good to me, approved; Looks good to me, approved
diff --git a/src/mem/ruby/network/MessageBuffer.cc
b/src/mem/ruby/network/MessageBuffer.cc
index f4eca3b..560b69c 100644
--- a/src/mem/ruby/network/MessageBuffer.cc
+++ b/src/mem/ruby/network/MessageBuffer.cc
@@ -156,7 +156,9 @@
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 d8a0285..b8a44ba 100644
--- a/src/mem/ruby/network/MessageBuffer.py
+++ b/src/mem/ruby/network/MessageBuffer.py
@@ -37,7 +37,10 @@
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 358f4df..5dcfe2f 100644
--- a/src/mem/ruby/system/RubySystem.py
+++ b/src/mem/ruby/system/RubySystem.py
@@ -35,7 +35,9 @@
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,
--
To view, visit https://gem5-review.googlesource.com/c/public/gem5/+/12784
To unsubscribe, or for help writing mail filters, visit
https://gem5-review.googlesource.com/settings
Gerrit-Project: public/gem5
Gerrit-Branch: master
Gerrit-Change-Id: I1e076908ff07e5846ebad4f4fc1c8f28d40bbfd4
Gerrit-Change-Number: 12784
Gerrit-PatchSet: 4
Gerrit-Owner: Xianwei Zhang <[email protected]>
Gerrit-Reviewer: Anthony Gutierrez <[email protected]>
Gerrit-Reviewer: Bradford Beckmann <[email protected]>
Gerrit-Reviewer: Jason Lowe-Power <[email protected]>
Gerrit-Reviewer: Tuan Ta <[email protected]>
Gerrit-Reviewer: Xianwei Zhang <[email protected]>
Gerrit-MessageType: merged
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev