diff options
Diffstat (limited to 'configs/example/fs.py')
-rw-r--r-- | configs/example/fs.py | 11 |
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 |