summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--configs/example/fs.py9
-rw-r--r--src/python/m5/objects/AlphaConsole.py2
-rw-r--r--src/python/m5/objects/IntrControl.py2
-rw-r--r--tests/configs/tsunami-simple-atomic-dual.py3
-rw-r--r--tests/configs/tsunami-simple-timing-dual.py3
5 files changed, 8 insertions, 11 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index 200b0b522..bab6a7229 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -42,6 +42,7 @@ parser = optparse.OptionParser()
parser.add_option("-d", "--detailed", action="store_true")
parser.add_option("-t", "--timing", action="store_true")
+parser.add_option("-n", "--num_cpus", type="int", default=1)
parser.add_option("-m", "--maxtick", type="int")
parser.add_option("--maxtime", type="float")
parser.add_option("--dual", action="store_true",
@@ -96,9 +97,11 @@ else:
bm = [SysConfig()]
server_sys = makeLinuxAlphaSystem(server_mem_mode, bm[0])
-server_sys.cpu = ServerCPUClass(cpu_id=0)
-server_sys.cpu.connectMemPorts(server_sys.membus)
-server_sys.cpu.mem = server_sys.physmem
+np = options.num_cpus
+server_sys.cpu = [ServerCPUClass(cpu_id=i) for i in xrange(np)]
+for i in xrange(np):
+ server_sys.cpu[i].connectMemPorts(server_sys.membus)
+ server_sys.cpu[i].mem = server_sys.physmem
if len(bm) == 2:
client_sys = makeLinuxAlphaSystem(client_mem_mode, bm[1])
diff --git a/src/python/m5/objects/AlphaConsole.py b/src/python/m5/objects/AlphaConsole.py
index 1c71493b1..f968aaa40 100644
--- a/src/python/m5/objects/AlphaConsole.py
+++ b/src/python/m5/objects/AlphaConsole.py
@@ -4,7 +4,7 @@ from Device import BasicPioDevice
class AlphaConsole(BasicPioDevice):
type = 'AlphaConsole'
- cpu = Param.BaseCPU(Parent.any, "Processor")
+ cpu = Param.BaseCPU(Parent.cpu[0], "Processor")
disk = Param.SimpleDisk("Simple Disk")
sim_console = Param.SimConsole(Parent.any, "The Simulator Console")
system = Param.AlphaSystem(Parent.any, "system object")
diff --git a/src/python/m5/objects/IntrControl.py b/src/python/m5/objects/IntrControl.py
index 95be0f4df..a7cf5cc84 100644
--- a/src/python/m5/objects/IntrControl.py
+++ b/src/python/m5/objects/IntrControl.py
@@ -3,4 +3,4 @@ from m5.params import *
from m5.proxy import *
class IntrControl(SimObject):
type = 'IntrControl'
- cpu = Param.BaseCPU(Parent.any, "the cpu")
+ cpu = Param.BaseCPU(Parent.cpu[0], "the cpu")
diff --git a/tests/configs/tsunami-simple-atomic-dual.py b/tests/configs/tsunami-simple-atomic-dual.py
index f798213db..1e6c10243 100644
--- a/tests/configs/tsunami-simple-atomic-dual.py
+++ b/tests/configs/tsunami-simple-atomic-dual.py
@@ -31,9 +31,6 @@ from m5.objects import *
m5.AddToPath('../configs/common')
import FSConfig
-AlphaConsole.cpu = Parent.cpu[0]
-IntrControl.cpu = Parent.cpu[0]
-
cpus = [ AtomicSimpleCPU(cpu_id=i) for i in xrange(2) ]
system = FSConfig.makeLinuxAlphaSystem('atomic')
system.cpu = cpus
diff --git a/tests/configs/tsunami-simple-timing-dual.py b/tests/configs/tsunami-simple-timing-dual.py
index bf94214fd..516495d18 100644
--- a/tests/configs/tsunami-simple-timing-dual.py
+++ b/tests/configs/tsunami-simple-timing-dual.py
@@ -31,9 +31,6 @@ from m5.objects import *
m5.AddToPath('../configs/common')
import FSConfig
-AlphaConsole.cpu = Parent.cpu[0]
-IntrControl.cpu = Parent.cpu[0]
-
cpus = [ TimingSimpleCPU(cpu_id=i) for i in xrange(2) ]
system = FSConfig.makeLinuxAlphaSystem('timing')
system.cpu = cpus