configs: Fix Python 3 iterator and exec compatibility issues
authorAndreas Sandberg <andreas.sandberg@arm.com>
Sat, 26 Jan 2019 10:57:44 +0000 (10:57 +0000)
committerAndreas Sandberg <andreas.sandberg@arm.com>
Tue, 26 Feb 2019 10:28:00 +0000 (10:28 +0000)
commit32bbddf2362421021b016d995f5e27b2bceea3a2
tree500971374192fb73f41ee41a4e419a61bfca03b9
parentc38a6523ab4df2b57337be0b2446bd9d30be94b4
configs: Fix Python 3 iterator and exec compatibility issues

Python 2.7 used to return lists for operations such as map and range,
this has changed in Python 3. To make the configs Python 3 compliant,
add explicit conversions from iterators to lists where needed, replace
xrange with range, and fix changes to exec syntax.

This change doesn't fix import paths since that might require us to
restructure the configs slightly.

Change-Id: Idcea8482b286779fc98b4e144ca8f54069c08024
Signed-off-by: Andreas Sandberg <andreas.sandberg@arm.com>
Reviewed-on: https://gem5-review.googlesource.com/c/16002
Reviewed-by: Gabe Black <gabeblack@google.com>
48 files changed:
configs/common/BPConfig.py
configs/common/Benchmarks.py
configs/common/CacheConfig.py
configs/common/CpuConfig.py
configs/common/FSConfig.py
configs/common/GPUTLBConfig.py
configs/common/HMC.py
configs/common/MemConfig.py
configs/common/Options.py
configs/common/PlatformConfig.py
configs/common/Simulation.py
configs/common/SysPaths.py
configs/common/cores/arm/HPI.py
configs/common/cpu2000.py
configs/dist/sw.py
configs/dram/lat_mem_rd.py
configs/dram/low_power_sweep.py
configs/example/apu_se.py
configs/example/fs.py
configs/example/garnet_synth_traffic.py
configs/example/hmctest.py
configs/example/memcheck.py
configs/example/memtest.py
configs/example/read_config.py
configs/example/ruby_gpu_random_test.py
configs/example/ruby_mem_test.py
configs/example/ruby_random_test.py
configs/example/se.py
configs/ruby/AMD_Base_Constructor.py
configs/ruby/GPU_RfO.py
configs/ruby/GPU_VIPER.py
configs/ruby/GPU_VIPER_Baseline.py
configs/ruby/GPU_VIPER_Region.py
configs/ruby/Garnet_standalone.py
configs/ruby/MESI_Three_Level.py
configs/ruby/MESI_Two_Level.py
configs/ruby/MI_example.py
configs/ruby/MOESI_AMD_Base.py
configs/ruby/MOESI_CMP_directory.py
configs/ruby/MOESI_CMP_token.py
configs/ruby/MOESI_hammer.py
configs/ruby/Ruby.py
configs/splash2/cluster.py
configs/splash2/run.py
configs/topologies/MeshDirCorners_XY.py
configs/topologies/Mesh_XY.py
configs/topologies/Mesh_westfirst.py
configs/topologies/Pt2Pt.py