summaryrefslogtreecommitdiff
path: root/configs/test
diff options
context:
space:
mode:
authorKevin Lim <ktlim@umich.edu>2006-07-14 17:54:43 -0400
committerKevin Lim <ktlim@umich.edu>2006-07-14 17:54:43 -0400
commit31ac8e733765ee37411d92ea3b7c308affef087a (patch)
treef2b677c660d83978d9a9a83ca934c3d9bb1215ba /configs/test
parent138a4faf2894ff7d22585b8398ae87f8e6aad9a1 (diff)
parent07186de5a1b1df55a31329b2ca9c53ad168438ff (diff)
downloadgem5-31ac8e733765ee37411d92ea3b7c308affef087a.tar.xz
Merge ktlim@zizzer:/bk/newmem
into zamp.eecs.umich.edu:/z/ktlim2/clean/newmem-merge configs/test/fs.py: configs/test/test.py: SCCS merged --HG-- extra : convert_revision : 7b2dbcd5881fac01dec38001c4131e73b5be52b5
Diffstat (limited to 'configs/test')
-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 55fed7234..f4c50fc23 100644
--- a/configs/test/fs.py
+++ b/configs/test/fs.py
@@ -22,6 +22,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 CowIdeDisk(IdeDisk):
@@ -65,6 +67,7 @@ class MyLinuxAlphaSystem(LinuxAlphaSystem):
cpu = DetailedO3CPU()
elif options.timing:
cpu = TimingSimpleCPU()
+ mem_mode = 'timing'
else:
cpu = AtomicSimpleCPU()
cpu.mem = membus
@@ -72,6 +75,7 @@ class MyLinuxAlphaSystem(LinuxAlphaSystem):
cpu.dcache_port = membus.port
cpu.itb = AlphaITB()
cpu.dtb = AlphaDTB()
+ cpu.clock = '2GHz'
sim_console = SimConsole(listener=ConsoleListener(port=3456))
kernel = binary('vmlinux')
pal = binary('ts_osfpal')
@@ -90,7 +94,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
if options.dual:
@@ -102,6 +106,14 @@ else:
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')
+
+
if options.maxtick:
exit_event = m5.simulate(options.maxtick)
else:
diff --git a/configs/test/test.py b/configs/test/test.py
index 79b271c3f..e1b75f4bc 100644
--- a/configs/test/test.py
+++ b/configs/test/test.py
@@ -38,6 +38,11 @@ if options.detailed:
cpu.workload = process
+if options.timing or options.detailed:
+ system.mem_mode = 'timing'
+
+
+
# instantiate configuration
m5.instantiate(root)