Ruby FS: Add the options for kernel and simulation script
These options were missing from the script ruby_fs.py. This patch adds these options to the script.
This commit is contained in:
parent
706323fa21
commit
9344480480
1 changed files with 13 additions and 5 deletions
|
@ -30,18 +30,18 @@
|
||||||
# Full system configuraiton for ruby
|
# Full system configuraiton for ruby
|
||||||
#
|
#
|
||||||
|
|
||||||
import os
|
|
||||||
import optparse
|
import optparse
|
||||||
|
import os
|
||||||
import sys
|
import sys
|
||||||
from os.path import join as joinpath
|
from os.path import join as joinpath
|
||||||
|
|
||||||
import m5
|
import m5
|
||||||
from m5.defines import buildEnv
|
from m5.defines import buildEnv
|
||||||
from m5.objects import *
|
from m5.objects import *
|
||||||
from m5.util import addToPath, panic
|
from m5.util import addToPath, fatal
|
||||||
|
|
||||||
if not buildEnv['FULL_SYSTEM']:
|
if not buildEnv['FULL_SYSTEM']:
|
||||||
panic("This script requires full-system mode (*_FS).")
|
fatal("This script requires full-system mode (*_FS).")
|
||||||
|
|
||||||
addToPath('../common')
|
addToPath('../common')
|
||||||
addToPath('../ruby')
|
addToPath('../ruby')
|
||||||
|
@ -60,7 +60,9 @@ config_root = os.path.dirname(config_path)
|
||||||
m5_root = os.path.dirname(config_root)
|
m5_root = os.path.dirname(config_root)
|
||||||
|
|
||||||
parser = optparse.OptionParser()
|
parser = optparse.OptionParser()
|
||||||
|
# System options
|
||||||
|
parser.add_option("--kernel", action="store", type="string")
|
||||||
|
parser.add_option("--script", action="store", type="string")
|
||||||
# Benchmark options
|
# Benchmark options
|
||||||
parser.add_option("-b", "--benchmark", action="store", type="string",
|
parser.add_option("-b", "--benchmark", action="store", type="string",
|
||||||
dest="benchmark",
|
dest="benchmark",
|
||||||
|
@ -117,9 +119,15 @@ elif buildEnv['TARGET_ISA'] == "x86":
|
||||||
else:
|
else:
|
||||||
fatal("incapable of building non-alpha or non-x86 full system!")
|
fatal("incapable of building non-alpha or non-x86 full system!")
|
||||||
|
|
||||||
Ruby.create_system(options, system, system.piobus, system._dma_devices)
|
if options.kernel is not None:
|
||||||
|
system.kernel = binary(options.kernel)
|
||||||
|
|
||||||
|
if options.script is not None:
|
||||||
|
system.readfile = options.script
|
||||||
|
|
||||||
system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
|
system.cpu = [CPUClass(cpu_id=i) for i in xrange(options.num_cpus)]
|
||||||
|
Ruby.create_system(options, system, system.piobus, system._dma_devices)
|
||||||
|
|
||||||
|
|
||||||
for (i, cpu) in enumerate(system.cpu):
|
for (i, cpu) in enumerate(system.cpu):
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in a new issue