14107SN/A# Copyright (c) 2006-2007 The Regents of The University of Michigan
23294SN/A# All rights reserved.
33294SN/A#
43294SN/A# Redistribution and use in source and binary forms, with or without
53294SN/A# modification, are permitted provided that the following conditions are
63294SN/A# met: redistributions of source code must retain the above copyright
73294SN/A# notice, this list of conditions and the following disclaimer;
83294SN/A# redistributions in binary form must reproduce the above copyright
93294SN/A# notice, this list of conditions and the following disclaimer in the
103294SN/A# documentation and/or other materials provided with the distribution;
113294SN/A# neither the name of the copyright holders nor the names of its
123294SN/A# contributors may be used to endorse or promote products derived from
133294SN/A# this software without specific prior written permission.
143294SN/A#
153294SN/A# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
163294SN/A# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
173294SN/A# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
183294SN/A# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
193294SN/A# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
203294SN/A# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
213294SN/A# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
223294SN/A# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
233294SN/A# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
243294SN/A# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
253294SN/A# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
263294SN/A#
273294SN/A# Authors: Korey Sewell
283294SN/A
2912575Sgiacomo.travaglini@arm.comfrom __future__ import print_function
3012575Sgiacomo.travaglini@arm.com
316654SN/Am5.util.addToPath('../configs/common')
323671SN/Afrom cpu2000 import twolf
334107SN/Aimport os
343671SN/A
354227SN/Aworkload = twolf(isa, opsys, 'smred')
3611851Sbrandon.potter@amd.comroot.system.cpu[0].workload = workload.makeProcess()
379792Sandreas.hansson@arm.comcwd = root.system.cpu[0].workload[0].cwd
384107SN/A
394107SN/A#Remove two files who's presence or absence affects execution
404107SN/Asav_file = os.path.join(cwd, workload.input_set + '.sav')
414107SN/Asv2_file = os.path.join(cwd, workload.input_set + '.sv2')
424199SN/Atry:
434199SN/A    os.unlink(sav_file)
444199SN/Aexcept:
4512575Sgiacomo.travaglini@arm.com    print("Couldn't unlink ", sav_file)
464199SN/Atry:
474199SN/A    os.unlink(sv2_file)
484199SN/Aexcept:
4912575Sgiacomo.travaglini@arm.com    print("Couldn't unlink ", sv2_file)
50