From: Bobby R. Bruce Date: Tue, 27 Oct 2020 22:47:01 +0000 (-0700) Subject: mem,scons: Changed assert to panic_if in MessageBuffer X-Git-Tag: develop-gem5-snapshot~503 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=432c54f05128b500d2fdcba1b93bf4d5686fa5de;p=gem5.git 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 --- 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