Skip to content
Snippets Groups Projects
Commit 1403fa38 authored by Tobias Friemel's avatar Tobias Friemel
Browse files

Step 1 from experiment hsc-simple is now working with gem5

git-svn-id: https://www4.informatik.uni-erlangen.de/i4svn/danceos/trunk/devel/fail@1604 8c4709b5-6ec9-48aa-a5cd-a96041d1645a
parent 402ca4ec
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@ FailGem5Device::FailGem5Device(Params *p)
: BasicPioDevice(p)
{
pioSize = 0x60;
DPRINTF(Fail, "Fail startup()\n");
fail::simulator.startup();
}
......
......@@ -34,4 +34,29 @@ void Gem5Controller::reboot()
}
void Gem5Controller::onBreakpoint(address_t instrPtr, address_t address_space)
{
/*bp_cache_t &buffer_cache = m_LstList.getBPBuffer();
bp_cache_t::iterator it = buffer_cache.begin();
for (stringvector::iterator it = strings.begin(); it != strings.end(); it++)*/
bool do_fire = false;
// Check for active breakpoint-events:
bp_cache_t &buffer_cache = m_LstList.getBPBuffer();
for(bp_cache_t::iterator it = buffer_cache.begin(); it != buffer_cache.end(); it++)
{
BPListener* pEvBreakpt = *it;
if(pEvBreakpt->isMatching(instrPtr, address_space)) {
pEvBreakpt->setTriggerInstructionPointer(instrPtr);
it = buffer_cache.makeActive(m_LstList, it);
do_fire = true;
// "it" has already been set to the next element (by calling
// makeActive()):
continue; // -> skip iterator increment
}
}
if (do_fire)
m_LstList.triggerActiveListeners();
}
} // end-of-namespace: fail
......@@ -11,6 +11,8 @@ extern int interrupt_to_fire;
class Gem5Controller : public SimulatorController {
public:
void onBreakpoint(address_t instrPtr, address_t address_space);
virtual void save(const std::string &path);
virtual void restore(const std::string &path);
virtual void reboot();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment