From 432c54f05128b500d2fdcba1b93bf4d5686fa5de Mon Sep 17 00:00:00 2001 From: "Bobby R. Bruce" Date: Tue, 27 Oct 2020 15:47:01 -0700 Subject: [PATCH] mem,scons: Changed assert to panic_if in MessageBuffer The variable 'm_allow_zero_latency' was only used in an assert message in `src/mem/ruby/network/MessageBuffer.cc`. This assert is stripped when compiling to gem5.fast, resulting in the compilation failing with an unused variable error. This assert is better as a panic_if, which will not be stripped out during the .fast compilation. Change-Id: I5de74982fa42b3291899ddcf73f7140079e1ec3f Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/36697 Maintainer: Bobby R. Bruce Tested-by: kokoro Reviewed-by: Jason Lowe-Power --- src/mem/ruby/network/MessageBuffer.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/mem/ruby/network/MessageBuffer.cc b/src/mem/ruby/network/MessageBuffer.cc index fad1fcaa0..2eec1107b 100644 --- a/src/mem/ruby/network/MessageBuffer.cc +++ b/src/mem/ruby/network/MessageBuffer.cc @@ -173,7 +173,8 @@ MessageBuffer::enqueue(MsgPtr message, Tick current_time, Tick delta) // Calculate the arrival time of the message, that is, the first // cycle the message can be dequeued. - assert((delta > 0) || m_allow_zero_latency); + panic_if((delta == 0) && !m_allow_zero_latency, + "Delta equals zero and allow_zero_latency is false during enqueue"); Tick arrival_time = 0; // random delays are inserted if the RubySystem level randomization flag -- 2.30.2