diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-10-17 21:15:11 -0700 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-10-17 21:15:11 -0700 |
commit | 05c487ef3ce6eb015bc8716df7e9caeedfe520da (patch) | |
tree | c07416ce66140f08c2e250e640b49cd3d89a6660 /configs/example/fs.py | |
parent | e51b075a2706180bdc262cbcbdd5bafe5896ba12 (diff) | |
download | gem5-05c487ef3ce6eb015bc8716df7e9caeedfe520da.tar.xz |
Enable MP systems via cmd-line flag in fs.py.
configs/example/fs.py:
Add flag for MP server systems.
src/python/m5/objects/AlphaConsole.py:
src/python/m5/objects/IntrControl.py:
Change CPU from 'any' to 'cpu[0]' to work better with MP sytems.
tests/configs/tsunami-simple-atomic-dual.py:
tests/configs/tsunami-simple-timing-dual.py:
Don't need to set console & intrcontrol cpu
params anymore (default is fixed now).
--HG--
extra : convert_revision : 9417b12b1b395ff7d6a9f2894e4123923c754daf
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r-- | configs/example/fs.py | 9 |
1 files changed, 6 insertions, 3 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]) |