fs.py (9539:0ac00d9a8aaf) fs.py (9653:5307d06e1d0e)
1# Copyright (c) 2010-2012 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

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

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.
71DriveCPUClass = AtomicSimpleCPU
72drive_mem_mode = 'atomic'
73
1# Copyright (c) 2010-2012 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

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

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.
71DriveCPUClass = AtomicSimpleCPU
72drive_mem_mode = 'atomic'
73
74# Check if KVM support has been enabled, we might need to do VM
75# configuration if that's the case.
76have_kvm_support = 'BaseKvmCPU' in globals()
77def is_kvm_cpu(cpu_class):
78 return have_kvm_support and cpu_class != None and \
79 issubclass(cpu_class, BaseKvmCPU)
80
74# system under test can be any CPU
75(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
76
77TestCPUClass.clock = options.clock
78DriveCPUClass.clock = options.clock
79
80if options.benchmark:
81 try:

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

111
112if options.script is not None:
113 test_sys.readfile = options.script
114
115test_sys.init_param = options.init_param
116
117test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)]
118
81# system under test can be any CPU
82(TestCPUClass, test_mem_mode, FutureClass) = Simulation.setCPUClass(options)
83
84TestCPUClass.clock = options.clock
85DriveCPUClass.clock = options.clock
86
87if options.benchmark:
88 try:

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

118
119if options.script is not None:
120 test_sys.readfile = options.script
121
122test_sys.init_param = options.init_param
123
124test_sys.cpu = [TestCPUClass(cpu_id=i) for i in xrange(np)]
125
126if is_kvm_cpu(TestCPUClass) or is_kvm_cpu(FutureClass):
127 test_sys.vm = KvmVM()
128
119if options.caches or options.l2cache:
120 test_sys.iocache = IOCache(clock = '1GHz',
121 addr_ranges = test_sys.mem_ranges)
122 test_sys.iocache.cpu_side = test_sys.iobus.master
123 test_sys.iocache.mem_side = test_sys.membus.slave
124else:
125 test_sys.iobridge = Bridge(delay='50ns', ranges = test_sys.mem_ranges)
126 test_sys.iobridge.slave = test_sys.iobus.master

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

158 drive_sys.cpu.createThreads()
159 drive_sys.cpu.createInterruptController()
160 drive_sys.cpu.connectAllPorts(drive_sys.membus)
161 if options.fastmem:
162 drive_sys.cpu.fastmem = True
163 if options.kernel is not None:
164 drive_sys.kernel = binary(options.kernel)
165
129if options.caches or options.l2cache:
130 test_sys.iocache = IOCache(clock = '1GHz',
131 addr_ranges = test_sys.mem_ranges)
132 test_sys.iocache.cpu_side = test_sys.iobus.master
133 test_sys.iocache.mem_side = test_sys.membus.slave
134else:
135 test_sys.iobridge = Bridge(delay='50ns', ranges = test_sys.mem_ranges)
136 test_sys.iobridge.slave = test_sys.iobus.master

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

168 drive_sys.cpu.createThreads()
169 drive_sys.cpu.createInterruptController()
170 drive_sys.cpu.connectAllPorts(drive_sys.membus)
171 if options.fastmem:
172 drive_sys.cpu.fastmem = True
173 if options.kernel is not None:
174 drive_sys.kernel = binary(options.kernel)
175
176 if is_kvm_cpu(DriveCPUClass):
177 drive_sys.vm = KvmVM()
178
166 drive_sys.iobridge = Bridge(delay='50ns',
167 ranges = drive_sys.mem_ranges)
168 drive_sys.iobridge.slave = drive_sys.iobus.master
169 drive_sys.iobridge.master = drive_sys.membus.slave
170
171 drive_sys.init_param = options.init_param
172 root = makeDualRoot(True, test_sys, drive_sys, options.etherdump)
173elif len(bm) == 1:

--- 13 unchanged lines hidden ---
179 drive_sys.iobridge = Bridge(delay='50ns',
180 ranges = drive_sys.mem_ranges)
181 drive_sys.iobridge.slave = drive_sys.iobus.master
182 drive_sys.iobridge.master = drive_sys.membus.slave
183
184 drive_sys.init_param = options.init_param
185 root = makeDualRoot(True, test_sys, drive_sys, options.etherdump)
186elif len(bm) == 1:

--- 13 unchanged lines hidden ---