Before this change, running:
./build/NULL/gem5.opt configs/example/ruby_mem_test.py -m
20000000 \
--functional 10
would only print warning for memory errors such as:
warn: Read access failed at 0x107a00
and there was no way to make the simulation fail.
This commit makes those warnings into errors such as:
panic: Read access failed at 0x107a00
unless --suppress-func-errors is given.
This will be used to automate MemTest testing in later commits.
Change-Id: I1840c1ed1853f1a71ec73bd50cadaac095794f91
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/26804
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
parser.add_option("--num-dmas", type="int", default=0, help="# of dma testers")
parser.add_option("--functional", type="int", default=0,
help="percentage of accesses that should be functional")
-parser.add_option("--suppress-func-warnings", action="store_true",
- help="suppress warnings when functional accesses fail")
+parser.add_option("--suppress-func-errors", action="store_true",
+ help="suppress panic when functional accesses fail")
#
# Add the ruby specific and protocol specific options
percent_functional = options.functional,
percent_uncacheable = 0,
progress_interval = options.progress,
- suppress_func_warnings = options.suppress_func_warnings) \
+ suppress_func_errors = options.suppress_func_errors) \
for i in range(options.num_cpus) ]
system = System(cpu = cpus,
percent_functional = 0,
percent_uncacheable = 0,
progress_interval = options.progress,
- suppress_func_warnings =
- not options.suppress_func_warnings) \
+ suppress_func_errors =
+ not options.suppress_func_errors) \
for i in range(options.num_dmas) ]
system.dma_devices = dmas
else:
# Add the ability to supress error responses on functional
# accesses as Ruby needs this
- suppress_func_warnings = Param.Bool(False, "Suppress warnings when "\
+ suppress_func_errors = Param.Bool(False, "Suppress panic when "\
"functional accesses fail.")
nextProgressMessage(p->progress_interval),
maxLoads(p->max_loads),
atomic(p->system->isAtomicMode()),
- suppressFuncWarnings(p->suppress_func_warnings)
+ suppressFuncErrors(p->suppress_func_errors)
{
id = TESTER_ALLOCATOR++;
fatal_if(id >= blockSize, "Too many testers, only %d allowed\n",
const uint8_t *pkt_data = pkt->getConstPtr<uint8_t>();
if (pkt->isError()) {
- if (!functional || !suppressFuncWarnings) {
- warn("%s access failed at %#x\n",
- pkt->isWrite() ? "Write" : "Read", req->getPaddr());
- }
+ if (!functional || !suppressFuncErrors)
+ panic( "%s access failed at %#x\n",
+ pkt->isWrite() ? "Write" : "Read", req->getPaddr());
} else {
if (pkt->isRead()) {
uint8_t ref_data = referenceData[req->getPaddr()];
const bool atomic;
- const bool suppressFuncWarnings;
+ const bool suppressFuncErrors;
Stats::Scalar numReadsStat;
Stats::Scalar numWritesStat;
# ruby does not support atomic, functional, or uncacheable accesses
cpus = [ MemTest(percent_functional=50,
- percent_uncacheable=0, suppress_func_warnings=True) \
+ percent_uncacheable=0, suppress_func_errors=True) \
for i in range(nb_cores) ]
# overwrite options.num_cpus with the nb_cores value