configs: cache: add cache line size option
[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 # Authors: Ali Saidi
28
29 from SysPaths import *
30 from m5.defines import buildEnv
31
32 class SysConfig:
33 def __init__(self, script=None, mem=None, disk=None):
34 self.scriptname = script
35 self.diskname = disk
36 self.memsize = mem
37
38 def script(self):
39 if self.scriptname:
40 return script(self.scriptname)
41 else:
42 return ''
43
44 def mem(self):
45 if self.memsize:
46 return self.memsize
47 else:
48 return '128MB'
49
50 def disk(self):
51 if self.diskname:
52 return disk(self.diskname)
53 elif buildEnv['TARGET_ISA'] == 'alpha':
54 return env.get('LINUX_IMAGE', disk('linux-latest.img'))
55 elif buildEnv['TARGET_ISA'] == 'x86':
56 return env.get('LINUX_IMAGE', disk('x86root.img'))
57 else:
58 print "Don't know what default disk image to use for ISA %s" % \
59 buildEnv['TARGET_ISA']
60 sys.exit(1)
61
62 # Benchmarks are defined as a key in a dict which is a list of SysConfigs
63 # The first defined machine is the test system, the others are driving systems
64
65 Benchmarks = {
66 'PovrayBench': [SysConfig('povray-bench.rcS', '512MB', 'povray.img')],
67 'PovrayAutumn': [SysConfig('povray-autumn.rcS', '512MB', 'povray.img')],
68
69 'NetperfStream': [SysConfig('netperf-stream-client.rcS'),
70 SysConfig('netperf-server.rcS')],
71 'NetperfStreamUdp': [SysConfig('netperf-stream-udp-client.rcS'),
72 SysConfig('netperf-server.rcS')],
73 'NetperfUdpLocal': [SysConfig('netperf-stream-udp-local.rcS')],
74 'NetperfStreamNT': [SysConfig('netperf-stream-nt-client.rcS'),
75 SysConfig('netperf-server.rcS')],
76 'NetperfMaerts': [SysConfig('netperf-maerts-client.rcS'),
77 SysConfig('netperf-server.rcS')],
78 'SurgeStandard': [SysConfig('surge-server.rcS', '512MB'),
79 SysConfig('surge-client.rcS', '256MB')],
80 'SurgeSpecweb': [SysConfig('spec-surge-server.rcS', '512MB'),
81 SysConfig('spec-surge-client.rcS', '256MB')],
82 'Nhfsstone': [SysConfig('nfs-server-nhfsstone.rcS', '512MB'),
83 SysConfig('nfs-client-nhfsstone.rcS')],
84 'Nfs': [SysConfig('nfs-server.rcS', '900MB'),
85 SysConfig('nfs-client-dbench.rcS')],
86 'NfsTcp': [SysConfig('nfs-server.rcS', '900MB'),
87 SysConfig('nfs-client-tcp.rcS')],
88 'IScsiInitiator': [SysConfig('iscsi-client.rcS', '512MB'),
89 SysConfig('iscsi-server.rcS', '512MB')],
90 'IScsiTarget': [SysConfig('iscsi-server.rcS', '512MB'),
91 SysConfig('iscsi-client.rcS', '512MB')],
92 'Validation': [SysConfig('iscsi-server.rcS', '512MB'),
93 SysConfig('iscsi-client.rcS', '512MB')],
94 'Ping': [SysConfig('ping-server.rcS',),
95 SysConfig('ping-client.rcS')],
96
97 'ValAccDelay': [SysConfig('devtime.rcS', '512MB')],
98 'ValAccDelay2': [SysConfig('devtimewmr.rcS', '512MB')],
99 'ValMemLat': [SysConfig('micro_memlat.rcS', '512MB')],
100 'ValMemLat2MB': [SysConfig('micro_memlat2mb.rcS', '512MB')],
101 'ValMemLat8MB': [SysConfig('micro_memlat8mb.rcS', '512MB')],
102 'ValMemLat': [SysConfig('micro_memlat8.rcS', '512MB')],
103 'ValTlbLat': [SysConfig('micro_tlblat.rcS', '512MB')],
104 'ValSysLat': [SysConfig('micro_syscall.rcS', '512MB')],
105 'ValCtxLat': [SysConfig('micro_ctx.rcS', '512MB')],
106 'ValStream': [SysConfig('micro_stream.rcS', '512MB')],
107 'ValStreamScale': [SysConfig('micro_streamscale.rcS', '512MB')],
108 'ValStreamCopy': [SysConfig('micro_streamcopy.rcS', '512MB')],
109
110 'MutexTest': [SysConfig('mutex-test.rcS', '128MB')],
111
112 'bnAn': [SysConfig('/z/saidi/work/m5.newmem.head/configs/boot/bn-app.rcS',
113 '128MB', '/z/saidi/work/bottleneck/bnimg.img')]
114 }
115
116 benchs = Benchmarks.keys()
117 benchs.sort()
118 DefinedBenchmarks = ", ".join(benchs)