sim: Fix data type of ticks per second before passing it to C++
authorSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Fri, 16 Nov 2018 19:24:43 +0000 (14:24 -0500)
committerSrikant Bharadwaj <srikant.bharadwaj@amd.com>
Fri, 16 Nov 2018 22:04:15 +0000 (22:04 +0000)
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>

src/python/m5/ticks.py

index fe258421e296502c9b9295147eb86ccb1758b392..e4b5eac7ebe81873cfe98d424030d6a7bc2f43f1 100644 (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%