Fix problem with unset max_loads in memtest.
Also make default 0, and make that mean run forever. --HG-- extra : convert_revision : 3e60a52b1c5e334a9ef3d744cf7ee1d851ba4aa9
This commit is contained in:
parent
b1bdc3b3d9
commit
9172876dd7
3 changed files with 11 additions and 7 deletions
|
@ -37,7 +37,7 @@ parser.add_option("-a", "--atomic", action="store_true",
|
||||||
help="Use atomic (non-timing) mode")
|
help="Use atomic (non-timing) mode")
|
||||||
parser.add_option("-b", "--blocking", action="store_true",
|
parser.add_option("-b", "--blocking", action="store_true",
|
||||||
help="Use blocking caches")
|
help="Use blocking caches")
|
||||||
parser.add_option("-l", "--maxloads", metavar="N",
|
parser.add_option("-l", "--maxloads", metavar="N", default=0,
|
||||||
help="Stop after N loads")
|
help="Stop after N loads")
|
||||||
parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
|
parser.add_option("-m", "--maxtick", type="int", default=m5.MaxTick,
|
||||||
metavar="T",
|
metavar="T",
|
||||||
|
@ -116,14 +116,18 @@ if options.blocking:
|
||||||
else:
|
else:
|
||||||
proto_l1.mshrs = 8
|
proto_l1.mshrs = 8
|
||||||
|
|
||||||
# build a list of prototypes, one for each cache level (L1 is at end,
|
# build a list of prototypes, one for each level of treespec, starting
|
||||||
# followed by the tester pseudo-cpu objects)
|
# at the end (last entry is tester objects)
|
||||||
prototypes = [ proto_l1,
|
prototypes = [ MemTest(atomic=options.atomic, max_loads=options.maxloads,
|
||||||
MemTest(atomic=options.atomic, max_loads=options.maxloads,
|
|
||||||
percent_functional=options.functional,
|
percent_functional=options.functional,
|
||||||
percent_uncacheable=options.uncacheable,
|
percent_uncacheable=options.uncacheable,
|
||||||
progress_interval=options.progress) ]
|
progress_interval=options.progress) ]
|
||||||
|
|
||||||
|
# next comes L1 cache, if any
|
||||||
|
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):
|
while len(prototypes) < len(treespec):
|
||||||
# clone previous level and update params
|
# clone previous level and update params
|
||||||
prev = prototypes[0]
|
prev = prototypes[0]
|
||||||
|
|
|
@ -33,7 +33,7 @@ from m5 import build_env
|
||||||
|
|
||||||
class MemTest(SimObject):
|
class MemTest(SimObject):
|
||||||
type = 'MemTest'
|
type = 'MemTest'
|
||||||
max_loads = Param.Counter("number of loads to execute")
|
max_loads = Param.Counter(0, "number of loads to execute")
|
||||||
atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n")
|
atomic = Param.Bool(False, "Execute tester in atomic mode? (or timing)\n")
|
||||||
memory_size = Param.Int(65536, "memory size")
|
memory_size = Param.Int(65536, "memory size")
|
||||||
percent_dest_unaligned = Param.Percent(50,
|
percent_dest_unaligned = Param.Percent(50,
|
||||||
|
|
|
@ -232,7 +232,7 @@ MemTest::completeRequest(PacketPtr pkt)
|
||||||
nextProgressMessage += progressInterval;
|
nextProgressMessage += progressInterval;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (numReads >= maxLoads)
|
if (maxLoads != 0 && numReads >= maxLoads)
|
||||||
exitSimLoop("maximum number of loads reached");
|
exitSimLoop("maximum number of loads reached");
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue