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 <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
This commit is contained in:
Bobby R. Bruce
2020-10-27 15:47:01 -07:00
parent 46125206ec
commit 432c54f051

View File

@@ -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