configs: Specify cache, dir, and mem cntrl interleaving
[gem5.git] / configs / common / Benchmarks.py
1 # Copyright (c) 2006-2007 The Regents of The University of Michigan
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
9 # notice, this list of conditions and the following disclaimer in the
10 # documentation and/or other materials provided with the distribution;
11 # neither the name of the copyright holders nor the names of its
12 # contributors may be used to endorse or promote products derived from
13 # this software without specific prior written permission.
14 #
15 # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
16 # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
17 # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
18 # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
19 # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
20 # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
21 # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
22 # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
27 from __future__ import print_function
28 from __future__ import absolute_import
29
30 from common.SysPaths import script, disk, binary
31 from os import environ as env
32 from m5.defines import buildEnv
33
34 class SysConfig:
35 def __init__(self, script=None, mem=None, disks=None, rootdev=None,
36 os_type='linux'):
37 self.scriptname = script
38 self.disknames = disks
39 self.memsize = mem
40 self.root = rootdev
41 self.ostype = os_type
42
43 def script(self):
44 if self.scriptname:
45 return script(self.scriptname)
46 else:
47 return ''
48
49 def mem(self):
50 if self.memsize:
51 return self.memsize
52 else:
53 return '128MB'
54
55 def disks(self):
56 if self.disknames:
57 return [disk(diskname) for diskname in self.disknames]
58 else:
59 return []
60
61 def rootdev(self):
62 if self.root:
63 return self.root
64 else:
65 return '/dev/sda1'
66
67 def os_type(self):
68 return self.ostype
69
70 # Benchmarks are defined as a key in a dict which is a list of SysConfigs
71 # The first defined machine is the test system, the others are driving systems
72
73 Benchmarks = {
74 'PovrayBench': [SysConfig('povray-bench.rcS', '512MB', ['povray.img'])],
75 'PovrayAutumn': [SysConfig('povray-autumn.rcS', '512MB', ['povray.img'])],
76
77 'NetperfStream': [SysConfig('netperf-stream-client.rcS'),
78 SysConfig('netperf-server.rcS')],
79 'NetperfStreamUdp': [SysConfig('netperf-stream-udp-client.rcS'),
80 SysConfig('netperf-server.rcS')],
81 'NetperfUdpLocal': [SysConfig('netperf-stream-udp-local.rcS')],
82 'NetperfStreamNT': [SysConfig('netperf-stream-nt-client.rcS'),
83 SysConfig('netperf-server.rcS')],
84 'NetperfMaerts': [SysConfig('netperf-maerts-client.rcS'),
85 SysConfig('netperf-server.rcS')],
86 'SurgeStandard': [SysConfig('surge-server.rcS', '512MB'),
87 SysConfig('surge-client.rcS', '256MB')],
88 'SurgeSpecweb': [SysConfig('spec-surge-server.rcS', '512MB'),
89 SysConfig('spec-surge-client.rcS', '256MB')],
90 'Nhfsstone': [SysConfig('nfs-server-nhfsstone.rcS', '512MB'),
91 SysConfig('nfs-client-nhfsstone.rcS')],
92 'Nfs': [SysConfig('nfs-server.rcS', '900MB'),
93 SysConfig('nfs-client-dbench.rcS')],
94 'NfsTcp': [SysConfig('nfs-server.rcS', '900MB'),
95 SysConfig('nfs-client-tcp.rcS')],
96 'IScsiInitiator': [SysConfig('iscsi-client.rcS', '512MB'),
97 SysConfig('iscsi-server.rcS', '512MB')],
98 'IScsiTarget': [SysConfig('iscsi-server.rcS', '512MB'),
99 SysConfig('iscsi-client.rcS', '512MB')],
100 'Validation': [SysConfig('iscsi-server.rcS', '512MB'),
101 SysConfig('iscsi-client.rcS', '512MB')],
102 'Ping': [SysConfig('ping-server.rcS',),
103 SysConfig('ping-client.rcS')],
104
105 'ValAccDelay': [SysConfig('devtime.rcS', '512MB')],
106 'ValAccDelay2': [SysConfig('devtimewmr.rcS', '512MB')],
107 'ValMemLat': [SysConfig('micro_memlat.rcS', '512MB')],
108 'ValMemLat2MB': [SysConfig('micro_memlat2mb.rcS', '512MB')],
109 'ValMemLat8MB': [SysConfig('micro_memlat8mb.rcS', '512MB')],
110 'ValMemLat': [SysConfig('micro_memlat8.rcS', '512MB')],
111 'ValTlbLat': [SysConfig('micro_tlblat.rcS', '512MB')],
112 'ValSysLat': [SysConfig('micro_syscall.rcS', '512MB')],
113 'ValCtxLat': [SysConfig('micro_ctx.rcS', '512MB')],
114 'ValStream': [SysConfig('micro_stream.rcS', '512MB')],
115 'ValStreamScale': [SysConfig('micro_streamscale.rcS', '512MB')],
116 'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')],
117
118 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')],
119 'ArmAndroid-GB': [SysConfig('null.rcS', '256MB',
120 ['ARMv7a-Gingerbread-Android.SMP.mouse.nolock.clean.img'],
121 None, 'android-gingerbread')],
122 'bbench-gb': [SysConfig('bbench-gb.rcS', '256MB',
123 ['ARMv7a-Gingerbread-Android.SMP.mouse.nolock.img'],
124 None, 'android-gingerbread')],
125 'ArmAndroid-ICS': [SysConfig('null.rcS', '256MB',
126 ['ARMv7a-ICS-Android.SMP.nolock.clean.img'],
127 None, 'android-ics')],
128 'bbench-ics': [SysConfig('bbench-ics.rcS', '256MB',
129 ['ARMv7a-ICS-Android.SMP.nolock.img'],
130 None, 'android-ics')]
131 }
132
133 benchs = list(Benchmarks.keys())
134 benchs.sort()
135 DefinedBenchmarks = ", ".join(benchs)