From 6d9fc4175e84eaddf68907191aba88b8fc9617de Mon Sep 17 00:00:00 2001 From: Steve Reinhardt Date: Wed, 25 Aug 2010 21:55:42 -0700 Subject: [PATCH] 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. --- configs/example/memtest.py | 9 +++++---- 1 file 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