gem5_args = gem5_args,
config = config_file,
config_args = config_args,
- valid_isas = ('RISCV',),
+ valid_isas = (constants.riscv_tag,),
valid_hosts = constants.supported_hosts
)
workloads = ('Bubblesort','FloatMM')
valid_isas = {
- 'x86': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'),
- 'arm': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
- 'riscv': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
+ constants.x86_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'),
+ constants.arm_tag:
+ ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
+ constants.riscv_tag:
+ ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'),
}
base_path = joinpath(config.bin_path, 'cpu_tests')
base_url = config.resource_url + '/gem5/cpu_tests/benchmarks/bin/'
for isa in valid_isas:
- path = joinpath(base_path, isa)
+ path = joinpath(base_path, isa.lower())
for workload in workloads:
ref_path = joinpath(getcwd(), 'ref', workload)
verifiers = (
verifier.MatchStdout(ref_path),
)
- url = base_url + isa + '/' + workload
+ url = base_url + isa.lower() + '/' + workload
workload_binary = DownloadedProgram(url, path, workload)
binary = joinpath(workload_binary.path, workload)
verifiers=verifiers,
config=joinpath(getcwd(), 'run.py'),
config_args=['--cpu={}'.format(cpu), binary],
- valid_isas=(isa.upper(),),
+ valid_isas=(isa,),
fixtures=[workload_binary]
)
verifiers=verifiers,
config=joinpath(config.base_dir, 'configs', 'dram','low_power_sweep.py'),
config_args=['-p', 'close_adaptive', '-r', '2'],
- valid_isas=('NULL',),
+ valid_isas=(constants.null_tag,),
valid_hosts=constants.supported_hosts,
)
verifiers=verifiers,
config=joinpath(config.base_dir, 'configs', 'dram','low_power_sweep.py'),
config_args=['-p', 'open_adaptive', '-r', '2'],
- valid_isas=('NULL',),
+ valid_isas=(constants.null_tag,),
valid_hosts=constants.supported_hosts,
)
from testlib import *
static_progs = {
- 'x86': ('hello64-static', 'hello32-static'),
- 'arm': ('hello64-static', 'hello32-static'),
- 'mips': ('hello',),
- 'riscv': ('hello',),
- 'sparc': ('hello',)
+ constants.x86_tag : ('hello64-static', 'hello32-static'),
+ constants.arm_tag : ('hello64-static', 'hello32-static'),
+ constants.mips_tag : ('hello',),
+ constants.riscv_tag : ('hello',),
+ constants.sparc_tag : ('hello',)
}
dynamic_progs = {
- 'x86': ('hello64-dynamic',)
+ constants.x86_tag : ('hello64-dynamic',)
}
cpu_types = {
- 'x86': ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
- 'arm' : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'),
- 'mips' : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
- 'riscv' : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU', 'MinorCPU'),
- 'sparc' : ('TimingSimpleCPU', 'AtomicSimpleCPU')
+ constants.x86_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ constants.arm_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'),
+ constants.mips_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ constants.riscv_tag :
+ ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU', 'MinorCPU'),
+ constants.sparc_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU')
}
supported_os = {
- 'x86': ('linux',),
- 'arm' : ('linux',),
- 'mips' : ('linux',),
- 'riscv' : ('linux',),
- 'sparc' : ('linux',)
+ constants.x86_tag : ('linux',),
+ constants.arm_tag : ('linux',),
+ constants.mips_tag : ('linux',),
+ constants.riscv_tag : ('linux',),
+ constants.sparc_tag : ('linux',)
}
# We only want to test x86, arm, and riscv on quick. Mips and sparc will be
# left for long.
os_length = {
- 'x86': constants.quick_tag,
- 'arm' : constants.quick_tag,
- 'mips' : constants.long_tag,
- 'riscv' : constants.quick_tag,
- 'sparc' : constants.long_tag,
+ constants.x86_tag : constants.quick_tag,
+ constants.arm_tag : constants.quick_tag,
+ constants.mips_tag : constants.long_tag,
+ constants.riscv_tag : constants.quick_tag,
+ constants.sparc_tag : constants.long_tag,
}
base_path = joinpath(config.bin_path, 'hello')
)
def verify_config(isa, binary, operating_s, cpu, hosts):
- url = urlbase + isa + '/' + operating_s + '/' + binary
- path = joinpath(base_path, isa, operating_s)
+ url = urlbase + isa.lower() + '/' + operating_s + '/' + binary
+ path = joinpath(base_path, isa.lower(), operating_s)
hello_program = DownloadedProgram(url, path, binary)
gem5_verify_config(
config=joinpath(config.base_dir, 'configs', 'example','se.py'),
config_args=['--cmd', joinpath(path, binary), '--cpu-type', cpu,
'--caches'],
- valid_isas=(isa.upper(),),
+ valid_isas=(isa,),
valid_hosts=hosts,
length = os_length[isa],
)
for operating_s in supported_os[isa]:
for cpu in cpu_types[isa]:
verify_config(isa, binary, operating_s, cpu,
- constants.target_host[isa.upper()])
+ constants.target_host[isa])
from testlib import *
test_progs = {
- 'sparc': ('insttest',)
+ constants.sparc_tag : ('insttest',)
}
cpu_types = {
- 'sparc' : ('AtomicSimpleCPU', 'TimingSimpleCPU')
+ constants.sparc_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU')
}
supported_os = {
- 'sparc' : ('linux',)
+ constants.sparc_tag : ('linux',)
}
base_path = joinpath(config.bin_path, 'insttest')
for binary in test_progs[isa]:
for operating_s in supported_os[isa]:
import os
- url = urlbase + isa + '/' + operating_s + '/' + binary
- path = joinpath(base_path, isa, operating_s, binary)
+ url = urlbase + isa.lower() + '/' + operating_s + '/' + binary
+ path = joinpath(base_path, isa.lower(), operating_s, binary)
try:
program = DownloadedProgram(url, path, binary)
except:
continue
- ref_path = joinpath(getcwd(), 'ref', isa, operating_s, binary)
+ ref_path = joinpath(
+ getcwd(), 'ref', isa.lower(), operating_s, binary
+ )
verifiers = (
verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
)
'example','se.py'),
config_args=['--cmd', joinpath(path, binary),
'--cpu-type', cpu, '--caches'],
- valid_isas=(isa.upper(),),
+ valid_isas=(isa,),
length = constants.long_tag,
)
config=joinpath(config_path, 'simple.py'),
config_args = [],
length = constants.quick_tag,
- valid_isas=('X86', 'RISCV', 'ARM'),
+ valid_isas=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
)
# The "quick" two level tests.
config=joinpath(config_path, 'two_level.py'),
config_args = [],
length = constants.quick_tag,
- valid_isas=('X86', 'RISCV', 'ARM'),
+ valid_isas=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
)
verifiers = (get_verifier('simple'),),
config=joinpath(config_path, 'run_simple.py'),
config_args = [],
- valid_isas=("NULL",),
+ valid_isas=(constants.null_tag,),
)
gem5_verify_config(
verifiers =(get_verifier('hello_goodbye'),),
config=joinpath(config_path, 'hello_goodbye.py'),
config_args = [],
- valid_isas=("NULL",),
+ valid_isas=(constants.null_tag,),
)
gem5_verify_config(
verifiers =(verifier.MatchStdoutNoPerf(joinpath(ref_path, 'hello')),),
config=joinpath(config_path, 'simple_memobj.py'),
config_args = [],
- valid_isas=("X86",), # note: by default the above script uses x86
+ # note: by default the above script uses x86
+ valid_isas=(constants.x86_tag,),
)
gem5_verify_config(
verifiers =(verifier.MatchStdoutNoPerf(joinpath(ref_path, 'hello')),),
config=joinpath(config_path, 'simple_cache.py'),
config_args = [],
- valid_isas=("X86",), # note: by default the above script uses x86
+ # note: by default the above script uses x86
+ valid_isas=(constants.x86_tag,),
)
# Note: for simple memobj and simple cache I want to use the traffic generator
config=joinpath(config_path, 'simple_ruby.py'),
config_args = [],
protocol = 'MSI',
- valid_isas=("X86",), # Currently only x86 has the threads test
- valid_hosts=constants.target_host["X86"], # dynamically linked
+ valid_isas=(constants.x86_tag,), # Currently only x86 has the threads test
+ valid_hosts=constants.target_host[constants.x86_tag], # dynamically linked
)
gem5_verify_config(
config=joinpath(config_path, 'ruby_test.py'),
config_args = [],
protocol = 'MSI',
- valid_isas=("X86",), # Currently only x86 has the threads test
+ valid_isas=(constants.x86_tag,), # Currently only x86 has the threads test
)
fixtures=(test_program,),
config=os.path.join(config.base_dir, 'configs', 'example','se.py'),
config_args=['--cmd', joinpath(test_program.path, filename)],
- valid_isas=('X86',)
+ valid_isas=(constants.x86_tag,)
)
config_args=['--cpu-type', cpu,
'--num-cores', '8',
'--cmd', joinpath(base_path, binary)],
- valid_isas=('SPARC',),
+ valid_isas=(constants.sparc_tag,),
valid_hosts=constants.supported_hosts,
length = constants.long_tag,
)
config=joinpath(config.base_dir, 'configs',
'example', basename_noext + '.py'),
config_args=args,
- valid_isas=('NULL',),
+ valid_isas=(constants.null_tag,),
valid_hosts=constants.supported_hosts,
)
'--num-cpus', num_cpus,
'--boot-type', boot_type,
],
- valid_isas = ('X86',),
+ valid_isas = (constants.x86_tag,),
valid_hosts = host,
length = constants.long_tag,
)