diff options
author | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-01-26 10:57:44 +0000 |
---|---|---|
committer | Andreas Sandberg <andreas.sandberg@arm.com> | 2019-02-26 10:28:00 +0000 |
commit | 32bbddf2362421021b016d995f5e27b2bceea3a2 (patch) | |
tree | 500971374192fb73f41ee41a4e419a61bfca03b9 /configs/example/se.py | |
parent | c38a6523ab4df2b57337be0b2446bd9d30be94b4 (diff) | |
download | gem5-32bbddf2362421021b016d995f5e27b2bceea3a2.tar.xz |
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>
Diffstat (limited to 'configs/example/se.py')
-rw-r--r-- | configs/example/se.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/configs/example/se.py b/configs/example/se.py index fa9e89745..59af888e0 100644 --- a/configs/example/se.py +++ b/configs/example/se.py @@ -171,7 +171,7 @@ if options.smt and options.num_cpus > 1: fatal("You cannot use SMT with multiple CPUs!") np = options.num_cpus -system = System(cpu = [CPUClass(cpu_id=i) for i in xrange(np)], +system = System(cpu = [CPUClass(cpu_id=i) for i in range(np)], mem_mode = test_mem_mode, mem_ranges = [AddrRange(options.mem_size)], cache_line_size = options.cacheline_size) @@ -220,7 +220,7 @@ if options.simpoint_profile: if np > 1: fatal("SimPoint generation not supported with more than one CPUs") -for i in xrange(np): +for i in range(np): if options.smt: system.cpu[i].workload = multiprocesses elif len(multiprocesses) == 1: @@ -246,7 +246,7 @@ if options.ruby: system.ruby.clk_domain = SrcClockDomain(clock = options.ruby_clock, voltage_domain = system.voltage_domain) - for i in xrange(np): + for i in range(np): ruby_port = system.ruby._cpu_ports[i] # Create the interrupt controller and connect its ports to Ruby |