git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1013 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
52 lines
1.1 KiB
C++
52 lines
1.1 KiB
C++
#include <iostream>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include "experiment.hpp"
|
|
#include "SAL/SALInst.hpp"
|
|
#include "SAL/bochs/BochsRegister.hpp"
|
|
#include "controller/Event.hpp"
|
|
#include "util/Logger.hpp"
|
|
#include "config/AspectConfig.hpp"
|
|
|
|
// Check if configuration dependencies are satisfied:
|
|
#if !defined(CONFIG_EVENT_BREAKPOINTS) || !defined(CONFIG_SR_RESTORE) || !defined(CONFIG_SR_SAVE)
|
|
#error This experiment needs: breakpoints, save, and restore. Enable these in the configuration.
|
|
#endif
|
|
|
|
using std::endl;
|
|
|
|
bool hscsimpleExperiment::run()
|
|
{
|
|
Logger log("HSC", false);
|
|
log << "experiment start" << endl;
|
|
|
|
// do funny things here...
|
|
#if 1
|
|
// STEP 1
|
|
//sal::simulator.dbgEnableInstrPtrOutput(500);
|
|
while(1){
|
|
int j = 0;
|
|
for(j=0 ; j<=50 ; j++){
|
|
cout << "durch" << endl;
|
|
fi::BPEvent mainbp(0x1045f5);
|
|
//fi::BPEvent mainbp(0x105bfa);
|
|
sal::simulator.addEventAndWait(&mainbp);
|
|
}
|
|
|
|
int i;
|
|
for(i=0 ; i<= 0 ; i++){
|
|
cout << "Interrupt wird ausgeloest" << endl;
|
|
//sleep(1);
|
|
sal::simulator.fireInterrupt(9);
|
|
}
|
|
}
|
|
#elif 1
|
|
// STEP 2
|
|
sal::simulator.dbgEnableInstrPtrOutput(500);
|
|
|
|
#endif
|
|
|
|
return true;
|
|
}
|