fs.py (8919:c1366a30d5eb) fs.py (8920:99083b5b7ed4)
1# Copyright (c) 2010-2011 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Ali Saidi
40
41import optparse
1# Copyright (c) 2010-2011 ARM Limited
2# All rights reserved.
3#
4# The license below extends only to copyright in the software and shall
5# not be construed as granting a license to any other intellectual
6# property including but not limited to intellectual property relating
7# to a hardware implementation of the functionality of the software
8# licensed hereunder. You may use the software subject to the license

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

34# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
35# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
36# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
37# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
38#
39# Authors: Ali Saidi
40
41import optparse
42import os
43import sys
44
45import m5
46from m5.defines import buildEnv
47from m5.objects import *
48from m5.util import addToPath, fatal
49
50addToPath('../common')
51
52from FSConfig import *
53from SysPaths import *
54from Benchmarks import *
55import Simulation
56import CacheConfig
57from Caches import *
42import sys
43
44import m5
45from m5.defines import buildEnv
46from m5.objects import *
47from m5.util import addToPath, fatal
48
49addToPath('../common')
50
51from FSConfig import *
52from SysPaths import *
53from Benchmarks import *
54import Simulation
55import CacheConfig
56from Caches import *
57import Options
58
58
59# Get paths we might need. It's expected this file is in m5/configs/example.
60config_path = os.path.dirname(os.path.abspath(__file__))
61config_root = os.path.dirname(config_path)
62
63parser = optparse.OptionParser()
59parser = optparse.OptionParser()
60Options.addCommonOptions(parser)
61Options.addFSOptions(parser)
64
62
65# Simulation options
66parser.add_option("--timesync", action="store_true",
67 help="Prevent simulated time from getting ahead of real time")
68
69# System options
70parser.add_option("--kernel", action="store", type="string")
71parser.add_option("--script", action="store", type="string")
72parser.add_option("--frame-capture", action="store_true",
73 help="Stores changed frame buffers from the VNC server to compressed "\
74 "files in the gem5 output directory")
75
76if buildEnv['TARGET_ISA'] == "arm":
77 parser.add_option("--bare-metal", action="store_true",
78 help="Provide the raw system without the linux specific bits")
79 parser.add_option("--machine-type", action="store", type="choice",
80 choices=ArmMachineType.map.keys(), default="RealView_PBX")
81# Benchmark options
82parser.add_option("--dual", action="store_true",
83 help="Simulate two systems attached with an ethernet link")
84parser.add_option("-b", "--benchmark", action="store", type="string",
85 dest="benchmark",
86 help="Specify the benchmark to run. Available benchmarks: %s"\
87 % DefinedBenchmarks)
88
89# Metafile options
90parser.add_option("--etherdump", action="store", type="string", dest="etherdump",
91 help="Specify the filename to dump a pcap capture of the" \
92 "ethernet traffic")
93
94execfile(os.path.join(config_root, "common", "Options.py"))
95
96(options, args) = parser.parse_args()
97
98if args:
99 print "Error: script doesn't take any positional arguments"
100 sys.exit(1)
101
102# driver system CPU is always simple... note this is an assignment of
103# a class, not an instance.

--- 115 unchanged lines hidden ---
63(options, args) = parser.parse_args()
64
65if args:
66 print "Error: script doesn't take any positional arguments"
67 sys.exit(1)
68
69# driver system CPU is always simple... note this is an assignment of
70# a class, not an instance.

--- 115 unchanged lines hidden ---