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 <gabeblack@google.com>
Maintainer: Gabe Black <gabeblack@google.com>
This commit is contained in:
Srikant Bharadwaj
2018-11-16 14:24:43 -05:00
parent 4fa4b9bfef
commit cb9fa24403

View File

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