se.py (5056:11789c986e14) | se.py (5369:9358355117b0) |
---|---|
1# Copyright (c) 2006-2007 The Regents of The University of Michigan | 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 9# notice, this list of conditions and the following disclaimer in the --- 21 unchanged lines hidden (view full) --- 31# "m5 test.py" 32 33import m5 34from m5.objects import * 35import os, optparse, sys 36m5.AddToPath('../common') 37import Simulation 38from Caches import * | 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 --- 21 unchanged lines hidden (view full) --- 31# "m5 test.py" 32 33import m5 34from m5.objects import * 35import os, optparse, sys 36m5.AddToPath('../common') 37import Simulation 38from Caches import * |
39from cpu2000 import * |
|
39 40# Get paths we might need. It's expected this file is in m5/configs/example. 41config_path = os.path.dirname(os.path.abspath(__file__)) 42config_root = os.path.dirname(config_path) 43m5_root = os.path.dirname(config_root) 44 45parser = optparse.OptionParser() 46 --- 10 unchanged lines hidden (view full) --- 57execfile(os.path.join(config_root, "common", "Options.py")) 58 59(options, args) = parser.parse_args() 60 61if args: 62 print "Error: script doesn't take any positional arguments" 63 sys.exit(1) 64 | 40 41# Get paths we might need. It's expected this file is in m5/configs/example. 42config_path = os.path.dirname(os.path.abspath(__file__)) 43config_root = os.path.dirname(config_path) 44m5_root = os.path.dirname(config_root) 45 46parser = optparse.OptionParser() 47 --- 10 unchanged lines hidden (view full) --- 58execfile(os.path.join(config_root, "common", "Options.py")) 59 60(options, args) = parser.parse_args() 61 62if args: 63 print "Error: script doesn't take any positional arguments" 64 sys.exit(1) 65 |
65process = LiveProcess() 66process.executable = options.cmd 67process.cmd = [options.cmd] + options.options.split() | 66if options.bench: 67 try: 68 if m5.build_env['TARGET_ISA'] != 'alpha': 69 print >>sys.stderr, "Simpoints code only works for Alpha ISA at this time" 70 sys.exit(1) 71 exec("workload = %s('alpha', 'tru64', 'ref')" % options.bench) 72 process = workload.makeLiveProcess() 73 except: 74 print >>sys.stderr, "Unable to find workload for %s" % options.bench 75 sys.exit(1) 76else: 77 process = LiveProcess() 78 process.executable = options.cmd 79 process.cmd = [options.cmd] + options.options.split() 80 81 |
68if options.input != "": 69 process.input = options.input 70 71if options.detailed: 72 #check for SMT workload 73 workloads = options.cmd.split(';') 74 if len(workloads) > 1: 75 process = [] --- 49 unchanged lines hidden --- | 82if options.input != "": 83 process.input = options.input 84 85if options.detailed: 86 #check for SMT workload 87 workloads = options.cmd.split(';') 88 if len(workloads) > 1: 89 process = [] --- 49 unchanged lines hidden --- |