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
This commit is contained in:
@ -7,7 +7,7 @@ FailGem5Device::FailGem5Device(Params *p)
|
|||||||
: BasicPioDevice(p)
|
: BasicPioDevice(p)
|
||||||
{
|
{
|
||||||
pioSize = 0x60;
|
pioSize = 0x60;
|
||||||
DPRINTF(Fail, "Fail startup()\n");
|
|
||||||
fail::simulator.startup();
|
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
|
} // end-of-namespace: fail
|
||||||
|
|||||||
@ -11,6 +11,8 @@ extern int interrupt_to_fire;
|
|||||||
|
|
||||||
class Gem5Controller : public SimulatorController {
|
class Gem5Controller : public SimulatorController {
|
||||||
public:
|
public:
|
||||||
|
void onBreakpoint(address_t instrPtr, address_t address_space);
|
||||||
|
|
||||||
virtual void save(const std::string &path);
|
virtual void save(const std::string &path);
|
||||||
virtual void restore(const std::string &path);
|
virtual void restore(const std::string &path);
|
||||||
virtual void reboot();
|
virtual void reboot();
|
||||||
|
|||||||
Reference in New Issue
Block a user