From: Jason Lowe-Power Date: Tue, 20 Jun 2017 16:01:08 +0000 (-0500) Subject: sim: Updated ClockedObject power state warning X-Git-Tag: v19.0.0.0~2730 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9cdfcf93470ca11c12eeac50aea9536ef914790f;p=gem5.git sim: Updated ClockedObject power state warning To prevent this warning from printing for *every* simulation, this patch adds a check to only print the warning if we are not at the beginning of simulation. Change-Id: I7f6154f0ca26bef6280f909f799aa1c7936b624a Signed-off-by: Jason Lowe-Power Reviewed-on: https://gem5-review.googlesource.com/3840 Reviewed-by: Andreas Sandberg Maintainer: Andreas Sandberg --- diff --git a/src/sim/clocked_object.cc b/src/sim/clocked_object.cc index f0b176509..ddf9e0f4d 100644 --- a/src/sim/clocked_object.cc +++ b/src/sim/clocked_object.cc @@ -90,7 +90,7 @@ ClockedObject::pwrState(Enums::PwrState p) // same tick if other conditions are not met elsewhere. // Any state change related stats would have been recorded on previous call // to the pwrState() function. - if (prvEvalTick == curTick()) { + if (prvEvalTick == curTick() && curTick() != 0) { warn("ClockedObject: More than one power state change request "\ "encountered within the same simulation tick"); _currPwrState = p;