summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSrikant Bharadwaj <srikant.bharadwaj@amd.com>2018-11-16 14:24:43 -0500
committerSrikant Bharadwaj <srikant.bharadwaj@amd.com>2018-11-16 22:04:15 +0000
commitcb9fa244036772fc1d2c73fa2f4b10e98cd6e17a (patch)
tree85e74c2e2d0fe153b0eab0137624854a09f82902
parent4fa4b9bfef3ed8a99f73d8bafb9d6e0a860dd46c (diff)
downloadgem5-cb9fa244036772fc1d2c73fa2f4b10e98cd6e17a.tar.xz
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>
-rw-r--r--src/python/m5/ticks.py2
1 files changed, 1 insertions, 1 deletions
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%