From: Srikant Bharadwaj Date: Fri, 16 Nov 2018 19:24:43 +0000 (-0500) Subject: sim: Fix data type of ticks per second before passing it to C++ X-Git-Tag: v19.0.0.0~1388 X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cb9fa244036772fc1d2c73fa2f4b10e98cd6e17a;p=gem5.git sim: Fix data type of ticks per second before passing it to C++ Casts ticks per second value to int before passing it to C++. Python throws an error because of incompatible type because of the recent change. Change-Id: Ibcaf8c327f1be0dba38763975d389584addd8373 Reviewed-on: https://gem5-review.googlesource.com/c/14375 Reviewed-by: Gabe Black Maintainer: Gabe Black --- diff --git a/src/python/m5/ticks.py b/src/python/m5/ticks.py index fe258421e..e4b5eac7e 100644 --- a/src/python/m5/ticks.py +++ b/src/python/m5/ticks.py @@ -49,7 +49,7 @@ def setGlobalFrequency(ticksPerSecond): else: raise TypeError, \ "wrong type '%s' for ticksPerSecond" % type(ticksPerSecond) - _m5.core.setClockFrequency(tps) + _m5.core.setClockFrequency(int(tps)) # how big does a rounding error need to be before we warn about it? frequency_tolerance = 0.001 # 0.1%