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>
warn("Platform not found for device tree generation; " \
"system or multiple CPUs may not start")
- freq = round(self.clk_domain.unproxy(self).clock[0].frequency)
+ freq = int(self.clk_domain.unproxy(self).clock[0].frequency)
node.append(FdtPropertyWords("clock-frequency", freq))
# Unique key for this CPU
self.__init__(value)
return value
+ def __index__(self):
+ return int(self.value)
+
@classmethod
def cxx_predecls(cls, code):
# most derived types require this, so we just do it here once