summaryrefslogtreecommitdiff
path: root/configs/example/memtest.py
diff options
context:
space:
mode:
authorSteve Reinhardt <steve.reinhardt@amd.com>2010-08-25 21:55:42 -0700
committerSteve Reinhardt <steve.reinhardt@amd.com>2010-08-25 21:55:42 -0700
commit6d9fc4175e84eaddf68907191aba88b8fc9617de (patch)
treea928d0027199f1a253be63de9328a4d13bd7342d /configs/example/memtest.py
parent546eaa6109849879c248822efe89eb4db7126b7d (diff)
downloadgem5-6d9fc4175e84eaddf68907191aba88b8fc9617de.tar.xz
memtest: scale associativity and mshrs according to config
Use the actual fanouts in the tree specification to scale cache associativity and mshrs instead of dumb constants.
Diffstat (limited to 'configs/example/memtest.py')
-rw-r--r--configs/example/memtest.py9
1 files changed, 5 insertions, 4 deletions
diff --git a/configs/example/memtest.py b/configs/example/memtest.py
index 0713dd241..24a49a9b3 100644
--- a/configs/example/memtest.py
+++ b/configs/example/memtest.py
@@ -115,7 +115,7 @@ proto_l1 = BaseCache(size = '32kB', assoc = 4, block_size = block_size,
if options.blocking:
proto_l1.mshrs = 1
else:
- proto_l1.mshrs = 8
+ proto_l1.mshrs = 4
# build a list of prototypes, one for each level of treespec, starting
# at the end (last entry is tester objects)
@@ -129,13 +129,14 @@ if len(treespec) > 1:
prototypes.insert(0, proto_l1)
# now add additional cache levels (if any) by scaling L1 params
-while len(prototypes) < len(treespec):
+for scale in treespec[:-2]:
# clone previous level and update params
prev = prototypes[0]
next = prev()
- next.size = prev.size * 4
+ next.size = prev.size * scale
next.latency = prev.latency * 10
- next.assoc = prev.assoc * 2
+ next.assoc = prev.assoc * scale
+ next.mshrs = prev.mshrs * scale
prototypes.insert(0, next)
# system simulated