Corrected several bugs in RATFlip

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1728 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
This commit is contained in:
unzner
2012-10-07 19:36:31 +00:00
parent 301dc22494
commit ba2c0bb83f
3 changed files with 82 additions and 67 deletions

View File

@ -60,13 +60,12 @@ std::string L4SysCampaign::output_register(L4SysProtoMsg_RegisterType res) {
bool L4SysCampaign::run() {
Logger log("L4SysCampaign");
#if 0
ifstream test(results_csv);
if (test.is_open()) {
log << results_csv << " already exists" << endl;
return false;
}
#endif
ofstream results(results_csv);
if (!results.is_open()) {
log << "failed to open " << results_csv << endl;
@ -78,7 +77,7 @@ bool L4SysCampaign::run() {
int count = 0;
srand(time(NULL));
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 20000; ++i) {
L4SysExperimentData *d = new L4SysExperimentData;
d->msg.set_exp_type(d->msg.GPRFLIP);
// affect a random register
@ -95,7 +94,7 @@ bool L4SysCampaign::run() {
campaignmanager.addParam(d);
++count;
}
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 20000; ++i) {
L4SysExperimentData *d = new L4SysExperimentData;
d->msg.set_exp_type(d->msg.ALUINSTR);
// modify for a random instruction
@ -107,7 +106,7 @@ bool L4SysCampaign::run() {
campaignmanager.addParam(d);
++count;
}
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 20000; ++i) {
L4SysExperimentData *d = new L4SysExperimentData;
d->msg.set_exp_type(d->msg.IDCFLIP);
// modify for a random instruction
@ -120,7 +119,7 @@ bool L4SysCampaign::run() {
campaignmanager.addParam(d);
++count;
}
for (int i = 0; i < 1000; ++i) {
for (int i = 0; i < 20000; ++i) {
L4SysExperimentData *d = new L4SysExperimentData;
d->msg.set_exp_type(d->msg.RATFLIP);
// modify for a random instruction