From 206038912c932ffe6a277aabe0687a5b76babc61 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Thu, 21 Jan 2021 16:45:59 +0000 Subject: [PATCH] configs: Remove Python 2 compatibility code in Arm configs Remove uses of six and imports from __future__ and use native Python 3 functionality instead. Change-Id: If37718ba99def2d6f176604e20d4ebeda75474ad Signed-off-by: Andreas Sandberg Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/39581 Reviewed-by: Giacomo Travaglini Reviewed-by: Richard Cooper Maintainer: Giacomo Travaglini Tested-by: kokoro --- configs/example/arm/baremetal.py | 3 --- configs/example/arm/devices.py | 10 +--------- configs/example/arm/dist_bigLITTLE.py | 3 --- configs/example/arm/fs_bigLITTLE.py | 4 ---- configs/example/arm/fs_power.py | 3 --- configs/example/arm/starter_fs.py | 3 --- configs/example/arm/starter_se.py | 3 --- configs/example/arm/workloads.py | 3 --- 8 files changed, 1 insertion(+), 31 deletions(-) diff --git a/configs/example/arm/baremetal.py b/configs/example/arm/baremetal.py index 04f60a19b..011883b40 100644 --- a/configs/example/arm/baremetal.py +++ b/configs/example/arm/baremetal.py @@ -39,9 +39,6 @@ Research Starter Kit on System Modeling. More information can be found at: http://www.arm.com/ResearchEnablement/SystemModeling """ -from __future__ import print_function -from __future__ import absolute_import - import os import m5 from m5.util import addToPath diff --git a/configs/example/arm/devices.py b/configs/example/arm/devices.py index e3cee1e72..52613c699 100644 --- a/configs/example/arm/devices.py +++ b/configs/example/arm/devices.py @@ -35,20 +35,12 @@ # System components used by the bigLITTLE.py configuration script -from __future__ import print_function -from __future__ import absolute_import - -import six - import m5 from m5.objects import * m5.util.addToPath('../../') from common.Caches import * from common import ObjectList -if six.PY3: - long = int - have_kvm = "ArmV8KvmCPU" in ObjectList.cpu_list.get_names() have_fastmodel = "FastModelCortexA76" in ObjectList.cpu_list.get_names() @@ -320,7 +312,7 @@ def simpleSystem(BaseSystem, caches, mem_size, platform=None, **kwargs): self.iobridge = Bridge(delay='50ns') # Device DMA -> MEM mem_range = self.realview._mem_regions[0] - assert long(mem_range.size()) >= long(Addr(mem_size)) + assert int(mem_range.size()) >= int(Addr(mem_size)) self.mem_ranges = [ AddrRange(start=mem_range.start, size=mem_size) ] diff --git a/configs/example/arm/dist_bigLITTLE.py b/configs/example/arm/dist_bigLITTLE.py index 1d8266684..6d35e5377 100644 --- a/configs/example/arm/dist_bigLITTLE.py +++ b/configs/example/arm/dist_bigLITTLE.py @@ -36,9 +36,6 @@ # This configuration file extends the example ARM big.LITTLE(tm) # configuration to enabe dist-gem5 siulations of big.LITTLE systems. -from __future__ import print_function -from __future__ import absolute_import - import argparse import os diff --git a/configs/example/arm/fs_bigLITTLE.py b/configs/example/arm/fs_bigLITTLE.py index 090e07170..85213ee43 100644 --- a/configs/example/arm/fs_bigLITTLE.py +++ b/configs/example/arm/fs_bigLITTLE.py @@ -36,10 +36,6 @@ # This is an example configuration script for full system simulation of # a generic ARM bigLITTLE system. - -from __future__ import print_function -from __future__ import absolute_import - import argparse import os import sys diff --git a/configs/example/arm/fs_power.py b/configs/example/arm/fs_power.py index 72c62920c..1c7b6b752 100644 --- a/configs/example/arm/fs_power.py +++ b/configs/example/arm/fs_power.py @@ -36,9 +36,6 @@ # This configuration file extends the example ARM big.LITTLE(tm) # with example power models. -from __future__ import print_function -from __future__ import absolute_import - import argparse import os diff --git a/configs/example/arm/starter_fs.py b/configs/example/arm/starter_fs.py index 8dee13777..9d0f0d26b 100644 --- a/configs/example/arm/starter_fs.py +++ b/configs/example/arm/starter_fs.py @@ -38,9 +38,6 @@ Research Starter Kit on System Modeling. More information can be found at: http://www.arm.com/ResearchEnablement/SystemModeling """ -from __future__ import print_function -from __future__ import absolute_import - import os import m5 from m5.util import addToPath diff --git a/configs/example/arm/starter_se.py b/configs/example/arm/starter_se.py index 8b1dbd2a0..23da8e791 100644 --- a/configs/example/arm/starter_se.py +++ b/configs/example/arm/starter_se.py @@ -38,9 +38,6 @@ Research Starter Kit on System Modeling. More information can be found at: http://www.arm.com/ResearchEnablement/SystemModeling """ -from __future__ import print_function -from __future__ import absolute_import - import os import m5 from m5.util import addToPath diff --git a/configs/example/arm/workloads.py b/configs/example/arm/workloads.py index ce48cdd7c..1fb9d0020 100644 --- a/configs/example/arm/workloads.py +++ b/configs/example/arm/workloads.py @@ -34,9 +34,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # -from __future__ import print_function -from __future__ import absolute_import - import inspect import m5 from m5.objects import * -- 2.30.2