se.py (6642:0b72f4f7c814) | se.py (6654:4c84e771cca7) |
---|---|
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 | 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 |
|
33import m5 | 38import m5 |
39from m5.defines import buildEnv 40from m5.objects import * 41from m5.util import addToPath, fatal |
|
34 | 42 |
35if m5.build_env['FULL_SYSTEM']: 36 m5.fatal("This script requires syscall emulation mode (*_SE).") | 43if buildEnv['FULL_SYSTEM']: 44 fatal("This script requires syscall emulation mode (*_SE).") |
37 | 45 |
38from m5.objects import * 39import os, optparse, sys 40from os.path import join as joinpath 41m5.AddToPath('../common') | 46addToPath('../common') 47 |
42import Simulation 43from Caches import * 44from cpu2000 import * 45 46# Get paths we might need. It's expected this file is in m5/configs/example. 47config_path = os.path.dirname(os.path.abspath(__file__)) 48config_root = os.path.dirname(config_path) 49m5_root = os.path.dirname(config_root) --- 15 unchanged lines hidden (view full) --- 65(options, args) = parser.parse_args() 66 67if args: 68 print "Error: script doesn't take any positional arguments" 69 sys.exit(1) 70 71if options.bench: 72 try: | 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: |
73 if m5.build_env['TARGET_ISA'] != 'alpha': | 79 if buildEnv['TARGET_ISA'] != 'alpha': |
74 print >>sys.stderr, "Simpoints code only works for Alpha ISA at this time" 75 sys.exit(1) 76 exec("workload = %s('alpha', 'tru64', 'ref')" % options.bench) 77 process = workload.makeLiveProcess() 78 except: 79 print >>sys.stderr, "Unable to find workload for %s" % options.bench 80 sys.exit(1) 81else: --- 83 unchanged lines hidden --- | 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 --- |