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 --- 16 unchanged lines hidden (view full) --- 25# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26# 27# Authors: Steve Reinhardt 28 29# Simple test script 30# 31# "m5 test.py" 32 |
33import os 34import optparse 35import sys 36from os.path import join as joinpath 37 |
38import m5 |
39from m5.defines import buildEnv 40from m5.objects import * 41from m5.util import addToPath, fatal |
42 |
43if buildEnv['FULL_SYSTEM']: 44 fatal("This script requires syscall emulation mode (*_SE).") |
45 |
46addToPath('../common') 47 |
48import Simulation 49from Caches import * 50from cpu2000 import * 51 52# Get paths we might need. It's expected this file is in m5/configs/example. 53config_path = os.path.dirname(os.path.abspath(__file__)) 54config_root = os.path.dirname(config_path) 55m5_root = os.path.dirname(config_root) --- 15 unchanged lines hidden (view full) --- 71(options, args) = parser.parse_args() 72 73if args: 74 print "Error: script doesn't take any positional arguments" 75 sys.exit(1) 76 77if options.bench: 78 try: |
79 if buildEnv['TARGET_ISA'] != 'alpha': |
80 print >>sys.stderr, "Simpoints code only works for Alpha ISA at this time" 81 sys.exit(1) 82 exec("workload = %s('alpha', 'tru64', 'ref')" % options.bench) 83 process = workload.makeLiveProcess() 84 except: 85 print >>sys.stderr, "Unable to find workload for %s" % options.bench 86 sys.exit(1) 87else: --- 83 unchanged lines hidden --- |