summaryrefslogtreecommitdiff
path: root/configs/example/fs.py
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2006-10-17 23:30:11 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2006-10-17 23:30:11 -0700
commit0128b73d0588ecdf66fcb482fddad2853216edce (patch)
tree6d80f198aa05add4e09fc3abb5cd7441b99f9a4d /configs/example/fs.py
parentf735399b3903c69845fb03427449e868cf8dc816 (diff)
downloadgem5-0128b73d0588ecdf66fcb482fddad2853216edce.tar.xz
Add --caches option to add caches to server CPUs.
--HG-- extra : convert_revision : 6aa97dcc807e175215e73c638faf73be926d4cd4
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r--configs/example/fs.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/configs/example/fs.py b/configs/example/fs.py
index bab6a7229..f0e32e97f 100644
--- a/configs/example/fs.py
+++ b/configs/example/fs.py
@@ -43,6 +43,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("--caches", action="store_true")
parser.add_option("-m", "--maxtick", type="int")
parser.add_option("--maxtime", type="float")
parser.add_option("--dual", action="store_true",
@@ -65,6 +66,13 @@ if args:
print "Error: script doesn't take any positional arguments"
sys.exit(1)
+class MyCache(BaseCache):
+ assoc = 2
+ block_size = 64
+ latency = 1
+ mshrs = 10
+ tgts_per_mshr = 5
+
# client system CPU is always simple... note this is an assignment of
# a class, not an instance.
ClientCPUClass = AtomicSimpleCPU
@@ -100,6 +108,9 @@ server_sys = makeLinuxAlphaSystem(server_mem_mode, bm[0])
np = options.num_cpus
server_sys.cpu = [ServerCPUClass(cpu_id=i) for i in xrange(np)]
for i in xrange(np):
+ if options.caches:
+ server_sys.cpu[i].addPrivateSplitL1Caches(MyCache(size = '32kB'),
+ MyCache(size = '64kB'))
server_sys.cpu[i].connectMemPorts(server_sys.membus)
server_sys.cpu[i].mem = server_sys.physmem