response_latency = 20,
tgts_per_mshr = 8)
for r in system.mem_ranges]
- for i in xrange(len(system.physmem)):
+ for i in range(len(system.physmem)):
system.physmem[i].port = system.llc[i].mem_side
system.llc[i].cpu_side = system.membus.master
# List of compute units; one GPU can have multiple compute units
compute_units = []
-for i in xrange(n_cu):
+for i in range(n_cu):
compute_units.append(ComputeUnit(cu_id = i, perLaneTLB = per_lane,
num_SIMDs = options.simds_per_cu,
wfSize = options.wf_size,
options.ldsBankConflictPenalty)))
wavefronts = []
vrfs = []
- for j in xrange(options.simds_per_cu):
- for k in xrange(shader.n_wf):
+ for j in range(options.simds_per_cu):
+ for k in range(int(shader.n_wf)):
wavefronts.append(Wavefront(simdId = j, wf_slot_id = k))
vrfs.append(VectorRegisterFile(simd_id=j,
num_regs_per_simd=options.vreg_file_size))
gpu_port_idx = gpu_port_idx - options.num_cp * 2
wavefront_size = options.wf_size
-for i in xrange(n_cu):
+for i in range(n_cu):
# The pipeline issues wavefront_size number of uncoalesced requests
# in one GPU issue cycle. Hence wavefront_size mem ports.
- for j in xrange(wavefront_size):
+ for j in range(wavefront_size):
system.cpu[shader_idx].CUs[i].memory_port[j] = \
system.ruby._cpu_ports[gpu_port_idx].slave[j]
gpu_port_idx += 1
-for i in xrange(n_cu):
+for i in range(n_cu):
if i > 0 and not i % options.cu_per_sqc:
gpu_port_idx += 1
system.cpu[shader_idx].CUs[i].sqc_port = \
#MAX CORES IS 8 with the fals sharing method
nb_cores = 8
-cpus = [ MemTest() for i in xrange(nb_cores) ]
+cpus = [ MemTest() for i in range(nb_cores) ]
# system simulated
system = System(cpu = cpus,
# ruby does not support atomic, functional, or uncacheable accesses
cpus = [ MemTest(percent_functional=50,
percent_uncacheable=0, suppress_func_warnings=True) \
- for i in xrange(nb_cores) ]
+ for i in range(nb_cores) ]
# overwrite options.num_cpus with the nb_cores value
options.num_cpus = nb_cores
#MAX CORES IS 8 with the fals sharing method
nb_cores = 8
-cpus = [ MemTest() for i in xrange(nb_cores) ]
+cpus = [ MemTest() for i in range(nb_cores) ]
# system simulated
system = System(cpu = cpus,
from m5.objects import *
nb_cores = 4
-cpus = [ DerivO3CPU(cpu_id=i) for i in xrange(nb_cores) ]
+cpus = [ DerivO3CPU(cpu_id=i) for i in range(nb_cores) ]
import ruby_config
ruby_memory = ruby_config.generate("TwoLevel_SplitL1UnifiedL2.rb", nb_cores)
system.cpu_clk_domain = SrcClockDomain(clock = '2GHz',
voltage_domain = system.voltage_domain)
system.cpu = [TimingSimpleCPU(cpu_id=i, clk_domain = system.cpu_clk_domain)
- for i in xrange(options.num_cpus)]
+ for i in range(options.num_cpus)]
Ruby.create_system(options, True, system, system.iobus, system._dma_ports)
from m5.objects import *
nb_cores = 4
-cpus = [ AtomicSimpleCPU(cpu_id=i) for i in xrange(nb_cores) ]
+cpus = [ AtomicSimpleCPU(cpu_id=i) for i in range(nb_cores) ]
import ruby_config
ruby_memory = ruby_config.generate("TwoLevel_SplitL1UnifiedL2.rb", nb_cores)
options.l3_assoc=2
nb_cores = 4
-cpus = [ TimingSimpleCPU(cpu_id=i) for i in xrange(nb_cores) ]
+cpus = [ TimingSimpleCPU(cpu_id=i) for i in range(nb_cores) ]
# overwrite the num_cpus to equal nb_cores
options.num_cpus = nb_cores
# the physmem name to avoid bumping all the reference stats
system.physmem = [SimpleMemory(range = r)
for r in system.mem_ranges]
-for i in xrange(len(system.physmem)):
+for i in range(len(system.physmem)):
system.physmem[i].port = system.membus.master
root = Root(full_system=True, system=system)
executable = args.executable
for config in args.config:
- execfile(config)
+ exec(compile(open(config).read(), config, 'exec'))
# Initialize all CPUs in a system
def initCPUs(sys):
# for ruby configurations, remove the protocol name from the test filename
if re.search('-ruby', test_filename):
test_filename = test_filename.split('-ruby')[0]+'-ruby'
-execfile(joinpath(tests_root, 'configs', test_filename + '.py'))
+exec(compile( \
+ open(joinpath(tests_root, 'configs', test_filename + '.py')).read(), \
+ joinpath(tests_root, 'configs', test_filename + '.py'), 'exec'))
# set default maxtick... script can override
# -1 means run forever
# tweak configuration for specific test
sys.path.append(joinpath(tests_root, category, mode, name))
-execfile(joinpath(tests_root, category, mode, name, 'test.py'))
+exec(compile( \
+ open(joinpath(tests_root, category, mode, name, 'test.py')).read(), \
+ joinpath(tests_root, category, mode, name, 'test.py'), 'exec'))
# Initialize all CPUs in a system
def initCPUs(sys):