summaryrefslogtreecommitdiff
path: root/configs
diff options
context:
space:
mode:
authorAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:48:17 -0400
committerAli Saidi <saidi@eecs.umich.edu>2006-07-13 15:48:17 -0400
commitc368ff0bd8d36ba001f523bd03f56f99d9ecd452 (patch)
tree0cd7ccb7fb5846745e86d2d8f332acf79b73a0fa /configs
parent2bc9229ea7195b307222bad6de966ea4a27a3f6b (diff)
downloadgem5-c368ff0bd8d36ba001f523bd03f56f99d9ecd452.tar.xz
add system.mem_mode = ['timing', 'atomic']
update scripts acordingly configs/test/SysPaths.py: new syspaths from nate, this one allows you to set script, binary, and disk paths like system.dir = 'aouaou' in your script configs/test/fs.py: update for system mem_mode Put small checkpoint example Make clock 1THz configs/test/test.py: src/arch/alpha/freebsd/system.cc: src/arch/alpha/linux/system.cc: src/arch/alpha/system.cc: src/arch/alpha/tru64/system.cc: src/arch/sparc/system.cc: src/python/m5/objects/System.py: src/sim/system.cc: src/sim/system.hh: update for system mem_mode src/dev/io_device.cc: Use time returned from sendAtomic to delay --HG-- extra : convert_revision : 67eedb3c84ab2584613faf88a534e793926fc92f
Diffstat (limited to 'configs')
-rw-r--r--configs/test/SysPaths.py54
-rw-r--r--configs/test/fs.py14
-rw-r--r--configs/test/test.py5
3 files changed, 44 insertions, 29 deletions
diff --git a/configs/test/SysPaths.py b/configs/test/SysPaths.py
index e458d5225..3f96a546f 100644
--- a/configs/test/SysPaths.py
+++ b/configs/test/SysPaths.py
@@ -2,41 +2,39 @@ import os, sys
from os.path import isdir, join as joinpath
from os import environ as env
-systemdir = None
-bindir = None
-diskdir = None
-scriptdir = None
+def disk(file):
+ system()
+ return joinpath(disk.dir, file)
+
+def binary(file):
+ system()
+ return joinpath(binary.dir, file)
-def load_defaults():
- global systemdir, bindir, diskdir, scriptdir
- if not systemdir:
+def script(file):
+ system()
+ return joinpath(script.dir, file)
+
+def system():
+ if not system.dir:
try:
path = env['M5_PATH'].split(':')
except KeyError:
path = [ '/dist/m5/system', '/n/poolfs/z/dist/m5/system' ]
- for systemdir in path:
- if os.path.isdir(systemdir):
+ for system.dir in path:
+ if os.path.isdir(system.dir):
break
else:
raise ImportError, "Can't find a path to system files."
- if not bindir:
- bindir = joinpath(systemdir, 'binaries')
- if not diskdir:
- diskdir = joinpath(systemdir, 'disks')
- if not scriptdir:
- scriptdir = joinpath(systemdir, 'boot')
-
-def disk(file):
- load_defaults()
- return joinpath(diskdir, file)
-
-def binary(file):
- load_defaults()
- return joinpath(bindir, file)
-
-def script(file):
- load_defaults()
- return joinpath(scriptdir, file)
-
+ if not binary.dir:
+ binary.dir = joinpath(system.dir, 'binaries')
+ if not disk.dir:
+ disk.dir = joinpath(system.dir, 'disks')
+ if not script.dir:
+ script.dir = joinpath(system.dir, 'boot')
+
+system.dir = None
+binary.dir = None
+disk.dir = None
+script.dir = None
diff --git a/configs/test/fs.py b/configs/test/fs.py
index d191f7055..41c3f8cc0 100644
--- a/configs/test/fs.py
+++ b/configs/test/fs.py
@@ -17,6 +17,8 @@ if args:
# Base for tests is directory containing this file.
test_base = os.path.dirname(__file__)
+script.dir = '/z/saidi/work/m5.newmem/configs/boot'
+
linux_image = env.get('LINUX_IMAGE', disk('linux-latest.img'))
class IdeControllerPciData(PciConfigData):
@@ -187,6 +189,7 @@ class MyLinuxAlphaSystem(LinuxAlphaSystem):
intrctrl = IntrControl()
if options.timing:
cpu = TimingSimpleCPU()
+ mem_mode = 'timing'
else:
cpu = AtomicSimpleCPU()
cpu.mem = magicbus2
@@ -194,6 +197,7 @@ class MyLinuxAlphaSystem(LinuxAlphaSystem):
cpu.dcache_port = magicbus2.port
cpu.itb = AlphaITB()
cpu.dtb = AlphaDTB()
+ cpu.clock = '2GHz'
sim_console = SimConsole(listener=ConsoleListener(port=3456))
kernel = binary('vmlinux')
pal = binary('ts_osfpal')
@@ -216,7 +220,7 @@ def DualRoot(clientSystem, serverSystem):
self.etherlink = EtherLink(int1 = Parent.client.tsunami.etherint[0],
int2 = Parent.server.tsunami.etherint[0],
dump = Parent.etherdump)
- self.clock = '5GHz'
+ self.clock = '1THz'
return self
root = DualRoot(
@@ -225,6 +229,14 @@ root = DualRoot(
m5.instantiate(root)
+#exit_event = m5.simulate(2600000000000)
+#if exit_event.getCause() != "user interrupt received":
+# m5.checkpoint(root, 'cpt')
+# exit_event = m5.simulate(300000000000)
+# if exit_event.getCause() != "user interrupt received":
+# m5.checkpoint(root, 'cptA')
+
+
exit_event = m5.simulate()
print 'Exiting @ cycle', m5.curTick(), 'because', exit_event.getCause()
diff --git a/configs/test/test.py b/configs/test/test.py
index a2c9f8bb0..feb44e2d1 100644
--- a/configs/test/test.py
+++ b/configs/test/test.py
@@ -79,6 +79,11 @@ cpu.icache_port=magicbus.port
cpu.dcache_port=magicbus.port
system = System(physmem = mem, cpu = cpu)
+
+if options.timing or options.detailed:
+ system.mem_mode = 'timing'
+
+
mem.port = magicbus.port
root = Root(system = system)