|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
#include <Stressor.h>

Public Types | |
| enum | Event { TERMINATE = (1 << 0) , ETISS_FLUSH_TRANSLATION_CACHE = (1 << 1) , ETISS_RELOAD_TRANSLATION_BLOCK = (1 << 2) } |
Static Public Member Functions | |
| static etiss::int32 | get_event (void) |
| static void | set_event (etiss::int32 code) |
| static void | reset_event (void) |
| static bool | loadXML (const std::string &file, const int coreID=0) |
| extracts faults out of the given xml file. | |
| static bool | addFaultDefinition (const Fault &f) |
| adds a fault to a static map that can be accessed by static std::map<int32_t,Fault> & faults(). | |
| static bool | addFault (const Fault &f, bool injected_fault=false) |
| activates a fault's triggers in their injectors | |
| static bool | removeFault (const Fault &f, bool injected_fault=false) |
| removes a fault's active triggers from their injectors, thus, deactivating the fault. | |
| static bool | firedTrigger (const Trigger &firedTrigger, int32_t fault_id, Injector *injector, uint64_t time_ps) |
| Checks if the given trigger is valid and calls applyAction. | |
| static void | clear () |
| clears the fault map. | |
| static std::map< int32_t, Fault > & | faults () |
| static map with all referencable faults. | |
Static Private Attributes | |
| static etiss::int32 | event_code_ |
Definition at line 35 of file Stressor.h.
| Enumerator | |
|---|---|
| TERMINATE | |
| ETISS_FLUSH_TRANSLATION_CACHE | |
| ETISS_RELOAD_TRANSLATION_BLOCK | |
Definition at line 38 of file Stressor.h.
activates a fault's triggers in their injectors
| f | the fault to activate |
TODO signal error and roll back
Definition at line 198 of file Stressor.cpp.
References etiss::fault::Fault::actions, etiss::fault::Injector::addTrigger(), etiss::ERROR, faults(), etiss::fault::Fault::id_, etiss::INFO, etiss::log(), etiss::fault::Fault::toString(), etiss::fault::Fault::triggers, etiss::fault::Injector::update_field_access_rights(), and etiss::WARNING.
Referenced by firedTrigger(), and loadXML().


adds a fault to a static map that can be accessed by static std::map<int32_t,Fault> & faults().
| f | the fault for adding to the map. |
Definition at line 167 of file Stressor.cpp.
References etiss::ERROR, faults(), etiss::fault::Fault::id_, etiss::INFO, etiss::log(), and etiss::fault::Fault::toString().
Referenced by loadXML().


|
static |
clears the fault map.
Definition at line 471 of file Stressor.cpp.
References faults().
Referenced by etiss::shutdown().


static map with all referencable faults.
Definition at line 48 of file Stressor.cpp.
Referenced by addFault(), addFaultDefinition(), clear(), firedTrigger(), removeFault(), and etiss::fault::FaultRef::resolve_reference().

|
static |
Checks if the given trigger is valid and calls applyAction.
Is called by a VirtualStruct e.g. OR1KVCPU::vcoreState. The VirtualStruct inherits the Injector so it can call Injector::cycleAccurateCallback, which calls this function
| firedTrigger | the Trigger which was called. |
| fault_id | the id of the fault to which the trigger corresponds. |
| injector | injector which called this function. |
| time_ps | cpu time. |
Definition at line 353 of file Stressor.cpp.
References addFault(), etiss::ERROR, faults(), etiss::log(), removeFault(), set_event(), and etiss::VERBOSE.

|
inlinestatic |
Definition at line 54 of file Stressor.h.
References event_code_.
Referenced by etiss::plugin::InstructionAccurateCallback::call_on_entry().

extracts faults out of the given xml file.
| file | the xmlfile with fault triggers. |
Definition at line 60 of file Stressor.cpp.
References addFault(), addFaultDefinition(), etiss::fault::coreIDActuallXML, etiss::ERROR, etiss::INFO, etiss::log(), and etiss::fault::parseXML().
Referenced by etiss::initialize_virtualstruct().


removes a fault's active triggers from their injectors, thus, deactivating the fault.
| f | the fault for adding to the map. |
TODO signal error and roll back
Definition at line 282 of file Stressor.cpp.
References etiss::ERROR, faults(), etiss::fault::Fault::id_, etiss::INFO, etiss::log(), etiss::fault::Injector::removeTrigger(), etiss::fault::Fault::toString(), etiss::fault::Fault::triggers, and etiss::WARNING.
Referenced by firedTrigger().


|
inlinestatic |
Definition at line 65 of file Stressor.h.
References event_code_.
Referenced by etiss::plugin::InstructionAccurateCallback::call_on_entry().

|
inlinestatic |
Definition at line 55 of file Stressor.h.
References event_code_.
Referenced by firedTrigger().

|
staticprivate |
Definition at line 51 of file Stressor.h.
Referenced by get_event(), reset_event(), and set_event().