summaryrefslogtreecommitdiff
path: root/configs/example
diff options
context:
space:
mode:
authorSteve Reinhardt <stever@eecs.umich.edu>2007-07-15 14:07:31 -0700
committerSteve Reinhardt <stever@eecs.umich.edu>2007-07-15 14:07:31 -0700
commitb1bdc3b3d9de40387a209777aa972f96792c8d6a (patch)
tree9c1b6573004c265169ac6714cc422d1030731ac5 /configs/example
parentad560a6642fbb752e608c02048fc2103e60093b3 (diff)
downloadgem5-b1bdc3b3d9de40387a209777aa972f96792c8d6a.tar.xz
Punt on old -n/-c memtest args.
Also added comments to document treespec format. --HG-- extra : convert_revision : fa9e8f66b68b96a4efca8a7fe6e7c37367382d9d
Diffstat (limited to 'configs/example')
-rw-r--r--configs/example/memtest.py51
1 files changed, 30 insertions, 21 deletions
diff --git a/configs/example/memtest.py b/configs/example/memtest.py
index c9149865a..e7f39d8bd 100644
--- a/configs/example/memtest.py
+++ b/configs/example/memtest.py
@@ -33,24 +33,38 @@ m5.AddToPath('../common')
parser = optparse.OptionParser()
-parser.add_option("-c", "--cache-levels", type="int", default=2,
- metavar="LEVELS",
- help="Number of cache levels [default: %default]")
parser.add_option("-a", "--atomic", action="store_true",
help="Use atomic (non-timing) mode")
parser.add_option("-b", "--blocking", action="store_true",
help="Use blocking caches")
-parser.add_option("-l", "--maxloads", default="1G", metavar="N",
- help="Stop after N loads [default: %default]")
+parser.add_option("-l", "--maxloads", metavar="N",
+ help="Stop after N loads")
parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
metavar="T",
help="Stop after T ticks")
-parser.add_option("-n", "--numtesters", type="int", default=8,
- metavar="N",
- help="Number of tester pseudo-CPUs [default: %default]")
-parser.add_option("-t", "--treespec", type="string",
- help="Colon-separated multilevel tree specification")
+#
+# The "tree" specification is a colon-separated list of one or more
+# integers. The first integer is the number of caches/testers
+# connected directly to main memory. The last integer in the list is
+# the number of testers associated with the uppermost level of memory
+# (L1 cache, if there are caches, or main memory if no caches). Thus
+# if there is only one integer, there are no caches, and the integer
+# specifies the number of testers connected directly to main memory.
+# The other integers (if any) specify the number of caches at each
+# level of the hierarchy between.
+#
+# Examples:
+#
+# "2:1" Two caches connected to memory with a single tester behind each
+# (single-level hierarchy, two testers total)
+#
+# "2:2:1" Two-level hierarchy, 2 L1s behind each of 2 L2s, 4 testers total
+#
+parser.add_option("-t", "--treespec", type="string", default="8:1",
+ help="Colon-separated multilevel tree specification, "
+ "see script comments for details "
+ "[default: %default]")
parser.add_option("--force-bus", action="store_true",
help="Use bus between levels even with single cache")
@@ -77,17 +91,12 @@ if args:
block_size = 64
-if not options.treespec:
- # convert simple cache_levels option to treespec
- treespec = [options.numtesters, 1]
- numtesters = options.numtesters
-else:
- try:
- treespec = [int(x) for x in options.treespec.split(':')]
- numtesters = reduce(lambda x,y: x*y, treespec)
- except:
- print "Error parsing treespec option"
- sys.exit(1)
+try:
+ treespec = [int(x) for x in options.treespec.split(':')]
+ numtesters = reduce(lambda x,y: x*y, treespec)
+except:
+ print "Error parsing treespec option"
+ sys.exit(1)
if numtesters > block_size:
print "Error: Number of testers limited to %s because of false sharing" \