From 32bbddf2362421021b016d995f5e27b2bceea3a2 Mon Sep 17 00:00:00 2001 From: Andreas Sandberg Date: Sat, 26 Jan 2019 10:57:44 +0000 Subject: 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 Reviewed-on: https://gem5-review.googlesource.com/c/16002 Reviewed-by: Gabe Black --- configs/ruby/MOESI_CMP_token.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'configs/ruby/MOESI_CMP_token.py') diff --git a/configs/ruby/MOESI_CMP_token.py b/configs/ruby/MOESI_CMP_token.py index 94a518b2a..817d6f96c 100644 --- a/configs/ruby/MOESI_CMP_token.py +++ b/configs/ruby/MOESI_CMP_token.py @@ -80,7 +80,7 @@ def create_system(options, full_system, system, dma_ports, bootmem, l2_bits = int(math.log(options.num_l2caches, 2)) block_size_bits = int(math.log(options.cacheline_size, 2)) - for i in xrange(options.num_cpus): + for i in range(options.num_cpus): # # First create the Ruby objects associated with this cpu # @@ -149,7 +149,7 @@ def create_system(options, full_system, system, dma_ports, bootmem, l2_index_start = block_size_bits + l2_bits - for i in xrange(options.num_l2caches): + for i in range(options.num_l2caches): # # First create the Ruby objects associated with this cpu # -- cgit v1.2.3