checksum-oostubs: allow instr_offset = 0

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1038 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
hsc
2012-04-10 16:44:00 +00:00
parent 499bf7a4cb
commit 084716fd05

View File

@ -121,7 +121,7 @@ bool CoolChecksumExperiment::run()
sal::simulator.terminate(1); sal::simulator.terminate(1);
} }
*/ */
param.msg.set_instr_offset(1); param.msg.set_instr_offset(0);
param.msg.set_mem_addr(1024*1024*8); param.msg.set_mem_addr(1024*1024*8);
param.msg.set_bit_offset(0); param.msg.set_bit_offset(0);
@ -136,6 +136,8 @@ bool CoolChecksumExperiment::run()
sal::simulator.addEvent(&func_finish); sal::simulator.addEvent(&func_finish);
bool finish_reached = false; bool finish_reached = false;
// no need to wait if offset is 0
if (instr_offset > 0) {
// XXX test this with coolchecksum first (or reassure with sanity checks) // XXX test this with coolchecksum first (or reassure with sanity checks)
// XXX could be improved with intermediate states (reducing runtime until injection) // XXX could be improved with intermediate states (reducing runtime until injection)
bp.setWatchInstructionPointer(fi::ANY_ADDR); bp.setWatchInstructionPointer(fi::ANY_ADDR);
@ -150,6 +152,7 @@ bool CoolChecksumExperiment::run()
// wait for bp // wait for bp
sal::simulator.waitAny(); sal::simulator.waitAny();
} }
}
// --- fault injection --- // --- fault injection ---
sal::MemoryManager& mm = sal::simulator.getMemoryManager(); sal::MemoryManager& mm = sal::simulator.getMemoryManager();