python: Fix param -> int conversion issues
authorAndreas Sandberg <andreas.sandberg@arm.com>
Sun, 27 Jan 2019 09:31:31 +0000 (09:31 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Fri, 22 Feb 2019 15:26:41 +0000 (15:26 +0000)
commit5de8626abc9aca4dbae5b81b819475945a2736c8
tree968a645aae1501dafeb50b110477b1d85974e9e4
parent397d322b9952d264a99f025b026936aa7c2ed9cc
python: Fix param -> int conversion issues

Python 3 doesn't convert params to integers automatically in
range(). Add __index__ to CheckedInt to enable implicit conversions
again. Add explicit conversions where necessary.

Change-Id: I2de6c9906d3bb7616f12ada6728b9e4b1928511c
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16000
Reviewed-by: Nikos Nikoleris <nikos.nikoleris@arm.com>
Reviewed-by: Jason Lowe-Power <jason@lowepower.com>
Maintainer: Jason Lowe-Power <jason@lowepower.com>
src/cpu/BaseCPU.py
src/python/m5/params.py