test.py (13850:2fe3f3dff0d7) | test.py (14142:e732d3191b7c) |
---|---|
1# Copyright (c) 2018 The Regents of the University of California 2# All Rights Reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 28 unchanged lines hidden (view full) --- 37 38valid_isas = { 39 'x86': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), 40 'arm': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), 41 'riscv': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), 42} 43 44 | 1# Copyright (c) 2018 The Regents of the University of California 2# All Rights Reserved. 3# 4# Redistribution and use in source and binary forms, with or without 5# modification, are permitted provided that the following conditions are 6# met: redistributions of source code must retain the above copyright 7# notice, this list of conditions and the following disclaimer; 8# redistributions in binary form must reproduce the above copyright --- 28 unchanged lines hidden (view full) --- 37 38valid_isas = { 39 'x86': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'DerivO3CPU'), 40 'arm': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), 41 'riscv': ('AtomicSimpleCPU', 'TimingSimpleCPU', 'MinorCPU', 'DerivO3CPU'), 42} 43 44 |
45base_path = joinpath(absdirpath(__file__), 'benchmarks', 'bin') 46base_url = 'http://gem5.org/dist/current/gem5/cpu_tests/benchmarks/bin/' |
|
45for isa in valid_isas: | 47for isa in valid_isas: |
46 bm_dir = joinpath('gem5/cpu_tests/benchmarks/bin/', isa) | 48 path = joinpath(base_path, isa) |
47 for workload in workloads: 48 ref_path = joinpath(getcwd(), 'ref', workload) 49 verifiers = ( 50 verifier.MatchStdout(ref_path), 51 ) 52 | 49 for workload in workloads: 50 ref_path = joinpath(getcwd(), 'ref', workload) 51 verifiers = ( 52 verifier.MatchStdout(ref_path), 53 ) 54 |
53 workload_binary = DownloadedProgram(bm_dir, workload) 54 workload_path = workload_binary.path | 55 url = base_url + isa + '/' + workload 56 workload_binary = DownloadedProgram(url, path, workload) 57 binary = joinpath(workload_binary.path, workload) |
55 56 for cpu in valid_isas[isa]: 57 gem5_verify_config( 58 name='cpu_test_{}_{}'.format(cpu,workload), 59 verifiers=verifiers, 60 config=joinpath(getcwd(), 'run.py'), | 58 59 for cpu in valid_isas[isa]: 60 gem5_verify_config( 61 name='cpu_test_{}_{}'.format(cpu,workload), 62 verifiers=verifiers, 63 config=joinpath(getcwd(), 'run.py'), |
61 config_args=['--cpu={}'.format(cpu), workload_path], | 64 config_args=['--cpu={}'.format(cpu), binary], |
62 valid_isas=(isa.upper(),), 63 fixtures=[workload_binary] 64 ) | 65 valid_isas=(isa.upper(),), 66 fixtures=[workload_binary] 67 ) |