cpu2000.py (12564:2778478ca882) cpu2000.py (13731:67cd980cb20f)
1# Copyright (c) 2006-2008 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

--- 79 unchanged lines hidden (view full) ---

88 self.output = '%s.out' % self.name
89
90 if not hasattr(self.__class__, 'simpoint'):
91 self.simpoint = None
92
93 try:
94 func = getattr(self.__class__, input_set)
95 except AttributeError:
1# Copyright (c) 2006-2008 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

--- 79 unchanged lines hidden (view full) ---

88 self.output = '%s.out' % self.name
89
90 if not hasattr(self.__class__, 'simpoint'):
91 self.simpoint = None
92
93 try:
94 func = getattr(self.__class__, input_set)
95 except AttributeError:
96 raise AttributeError, \
97 'The benchmark %s does not have the %s input set' % \
98 (self.name, input_set)
96 raise AttributeError(
97 'The benchmark %s does not have the %s input set' % \
98 (self.name, input_set))
99
100 executable = joinpath(spec_dist, 'binaries', isa, os, self.binary)
101 if not isfile(executable):
99
100 executable = joinpath(spec_dist, 'binaries', isa, os, self.binary)
101 if not isfile(executable):
102 raise AttributeError, '%s not found' % executable
102 raise AttributeError('%s not found' % executable)
103 self.executable = executable
104
105 # root of tree for input & output data files
106 data_dir = joinpath(spec_dist, 'data', self.name)
107 # optional subtree with files shared across input sets
108 all_dir = joinpath(data_dir, 'all')
109 # dirs for input & output files for this input set
110 inputs_dir = joinpath(data_dir, input_set, 'input')
111 outputs_dir = joinpath(data_dir, input_set, 'output')
112 # keep around which input set was specified
113 self.input_set = input_set
114
115 if not isdir(inputs_dir):
103 self.executable = executable
104
105 # root of tree for input & output data files
106 data_dir = joinpath(spec_dist, 'data', self.name)
107 # optional subtree with files shared across input sets
108 all_dir = joinpath(data_dir, 'all')
109 # dirs for input & output files for this input set
110 inputs_dir = joinpath(data_dir, input_set, 'input')
111 outputs_dir = joinpath(data_dir, input_set, 'output')
112 # keep around which input set was specified
113 self.input_set = input_set
114
115 if not isdir(inputs_dir):
116 raise AttributeError, '%s not found' % inputs_dir
116 raise AttributeError('%s not found' % inputs_dir)
117
118 self.inputs_dir = [ inputs_dir ]
119 if isdir(all_dir):
120 self.inputs_dir += [ joinpath(all_dir, 'input') ]
121 if isdir(outputs_dir):
122 self.outputs_dir = outputs_dir
123
124 if not hasattr(self.__class__, 'stdin'):

--- 540 unchanged lines hidden (view full) ---

665 stdin = None
666
667 def __init__(self, isa, os, input_set):
668 if (isa in ('alpha', 'arm', 'thumb', 'aarch64')):
669 self.endian = 'lendian'
670 elif (isa == 'sparc' or isa == 'sparc32'):
671 self.endian = 'bendian'
672 else:
117
118 self.inputs_dir = [ inputs_dir ]
119 if isdir(all_dir):
120 self.inputs_dir += [ joinpath(all_dir, 'input') ]
121 if isdir(outputs_dir):
122 self.outputs_dir = outputs_dir
123
124 if not hasattr(self.__class__, 'stdin'):

--- 540 unchanged lines hidden (view full) ---

665 stdin = None
666
667 def __init__(self, isa, os, input_set):
668 if (isa in ('alpha', 'arm', 'thumb', 'aarch64')):
669 self.endian = 'lendian'
670 elif (isa == 'sparc' or isa == 'sparc32'):
671 self.endian = 'bendian'
672 else:
673 raise AttributeError, "unknown ISA %s" % isa
673 raise AttributeError("unknown ISA %s" % isa)
674
675 super(vortex, self).__init__(isa, os, input_set)
676
677 def test(self, isa, os):
678 self.args = [ '%s.raw' % self.endian ]
679 self.output = 'vortex.out'
680
681 def train(self, isa, os):

--- 75 unchanged lines hidden ---
674
675 super(vortex, self).__init__(isa, os, input_set)
676
677 def test(self, isa, os):
678 self.args = [ '%s.raw' % self.endian ]
679 self.output = 'vortex.out'
680
681 def train(self, isa, os):

--- 75 unchanged lines hidden ---