constants.isa_tag_type = 'isa'
constants.x86_tag = 'X86'
+ constants.gcn3_x86_tag = 'GCN3_X86'
constants.sparc_tag = 'SPARC'
constants.riscv_tag = 'RISCV'
constants.arm_tag = 'ARM'
constants.supported_tags = {
constants.isa_tag_type : (
constants.x86_tag,
+ constants.gcn3_x86_tag,
constants.sparc_tag,
constants.riscv_tag,
constants.arm_tag,
constants.target_host = {
constants.arm_tag : (constants.host_arm_tag,),
constants.x86_tag : (constants.host_x86_64_tag,),
+ constants.gcn3_x86_tag : (constants.host_x86_64_tag,),
constants.sparc_tag : (constants.host_x86_64_tag,),
constants.riscv_tag : (constants.host_x86_64_tag,),
constants.mips_tag : (constants.host_x86_64_tag,),
workloads = ('Bubblesort','FloatMM')
valid_isas = {
- constants.x86_tag : ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'),
+ constants.gcn3_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/'
+
+isa_url = {
+ constants.gcn3_x86_tag : base_url + "x86"
+ constants.arm_tag : base_url + "arm"
+ constants.riscv_tag : base_url + "riscv"
+}
+
for isa in valid_isas:
path = joinpath(base_path, isa.lower())
for workload in workloads:
verifier.MatchStdout(ref_path),
)
- url = base_url + isa.lower() + '/' + workload
+ url = isa_url[isa] + '/' + workload
workload_binary = DownloadedProgram(url, path, workload)
binary = joinpath(workload_binary.path, workload)
from testlib import *
static_progs = {
- constants.x86_tag : ('hello64-static', 'hello32-static'),
+ constants.gcn3_x86_tag : ('hello64-static', 'hello32-static'),
constants.arm_tag : ('hello64-static', 'hello32-static'),
constants.mips_tag : ('hello',),
constants.riscv_tag : ('hello',),
}
dynamic_progs = {
- constants.x86_tag : ('hello64-dynamic',)
+ constants.gcn3_x86_tag : ('hello64-dynamic',)
}
cpu_types = {
- constants.x86_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
+ constants.gcn3_x86_tag :
+ ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
constants.arm_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU','DerivO3CPU'),
constants.mips_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU', 'DerivO3CPU'),
constants.riscv_tag :
constants.sparc_tag : ('TimingSimpleCPU', 'AtomicSimpleCPU')
}
-supported_os = {
- 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 = {
- constants.x86_tag : constants.quick_tag,
+ constants.gcn3_x86_tag : constants.quick_tag,
constants.arm_tag : constants.quick_tag,
constants.mips_tag : constants.long_tag,
constants.riscv_tag : constants.quick_tag,
urlbase = config.resource_url + '/test-progs/hello/bin/'
+isa_urls = {
+ constants.gcn3_x86_tag : urlbase + "x86/linux",
+ constants.arm_tag : urlbase + "arm/linux",
+ constants.mips_tag : urlbase + "mips/linux",
+ constants.riscv_tag : urlbase + "riscv/linux",
+ constants.sparc_tag : urlbase + "sparc/linux",
+}
+
ref_path = joinpath(getcwd(), 'ref')
verifiers = (
verifier.MatchStdoutNoPerf(joinpath(ref_path, 'simout')),
)
-def verify_config(isa, binary, operating_s, cpu, hosts):
- url = urlbase + isa.lower() + '/' + operating_s + '/' + binary
- path = joinpath(base_path, isa.lower(), operating_s)
+def verify_config(isa, binary, cpu, hosts):
+ url = isa_urls[isa] + '/' + binary
+ path = joinpath(base_path, isa.lower())
hello_program = DownloadedProgram(url, path, binary)
gem5_verify_config(
- name='test-' + binary + '-' + operating_s + "-" + cpu,
+ name='test-' + binary + '-' + cpu,
fixtures=(hello_program,),
verifiers=verifiers,
config=joinpath(config.base_dir, 'configs', 'example','se.py'),
# Run statically linked hello worlds
for isa in static_progs:
for binary in static_progs[isa]:
- for operating_s in supported_os[isa]:
- for cpu in cpu_types[isa]:
- verify_config(isa, binary, operating_s, cpu,
- constants.supported_hosts)
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, cpu, constants.supported_hosts)
# Run dynamically linked hello worlds
for isa in dynamic_progs:
for binary in dynamic_progs[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])
+ for cpu in cpu_types[isa]:
+ verify_config(isa, binary, cpu, constants.target_host[isa])
config=joinpath(config_path, 'simple.py'),
config_args = [],
length = constants.quick_tag,
- valid_isas=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
+ valid_isas=(
+ constants.gcn3_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=(constants.x86_tag, constants.riscv_tag, constants.arm_tag),
+ valid_isas=(
+ constants.gcn3_x86_tag,
+ constants.riscv_tag,
+ constants.arm_tag
+ ),
)
config=joinpath(config_path, 'simple_memobj.py'),
config_args = [],
# note: by default the above script uses x86
- valid_isas=(constants.x86_tag,),
+ valid_isas=(constants.gcn3_x86_tag,),
)
gem5_verify_config(
config=joinpath(config_path, 'simple_cache.py'),
config_args = [],
# note: by default the above script uses x86
- valid_isas=(constants.x86_tag,),
+ valid_isas=(constants.gcn3_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=(constants.x86_tag,), # Currently only x86 has the threads test
- valid_hosts=constants.target_host[constants.x86_tag], # dynamically linked
+ # Currently only x86 has the threads test
+ valid_isas=(constants.gcn3_x86_tag,),
+ # dynamically linked
+ valid_hosts=constants.target_host[constants.gcn3_x86_tag],
)
gem5_verify_config(
config=joinpath(config_path, 'ruby_test.py'),
config_args = [],
protocol = 'MSI',
- valid_isas=(constants.x86_tag,), # Currently only x86 has the threads test
+ # Currently only x86 has the threads test
+ valid_isas=(constants.gcn3_x86_tag,),
)
fixtures=(test_program,),
config=os.path.join(config.base_dir, 'configs', 'example','se.py'),
config_args=['--cmd', joinpath(test_program.path, filename)],
- valid_isas=(constants.x86_tag,)
+ valid_isas=(constants.gcn3_x86_tag,)
)
import os
from testlib import *
-common_isas = [constants.x86_tag, constants.arm_tag, constants.riscv_tag]
+common_isas = [constants.gcn3_x86_tag, constants.arm_tag, constants.riscv_tag]
for isa in constants.supported_isas:
if isa is constants.null_tag: continue
'--num-cpus', num_cpus,
'--boot-type', boot_type,
],
- valid_isas = (constants.x86_tag,),
+ valid_isas = (constants.gcn3_x86_tag,),
valid_hosts = host,
length = constants.long_tag,
)