ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Static Public Member Functions | List of all members
etiss::fault::Stressor Class Reference

#include <Stressor.h>

Static Public Member Functions

static bool loadXML (const std::string &file, const int coreID=0)
 extracts faults out of the given xml file. More...
 
static bool addFault (const Fault &f)
 adds a fault to a static map that can be accessed by static std::map<int32_t,Fault> & faults(). More...
 
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. More...
 
static void clear ()
 clears the fault map. More...
 

Detailed Description

Definition at line 68 of file Stressor.h.

Member Function Documentation

◆ addFault()

bool etiss::fault::Stressor::addFault ( const Fault f)
static

adds a fault to a static map that can be accessed by static std::map<int32_t,Fault> & faults().

Parameters
fthe fault for adding to the map.
Returns
false if fault already exists in map.

TODO signal error and roll back

Definition at line 138 of file Stressor.cpp.

References etiss::fault::Injector::addTrigger(), etiss::ERROR, etiss::fault::faults(), etiss::fault::Fault::id_, etiss::INFO, etiss::log(), etiss::fault::Fault::toString(), and etiss::fault::Fault::triggers.

Referenced by firedTrigger(), and loadXML().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

void etiss::fault::Stressor::clear ( )
static

clears the fault map.

Definition at line 274 of file Stressor.cpp.

References etiss::fault::faults().

Referenced by etiss::shutdown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ firedTrigger()

bool etiss::fault::Stressor::firedTrigger ( const Trigger firedTrigger,
int32_t  fault_id,
Injector injector,
uint64_t  time_ps 
)
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

Parameters
firedTriggerthe Trigger which was called.
fault_idthe id of the fault to which the trigger corresponds.
injectorinjector which called this function.
time_pscpu time.
Returns
true if the fired trigger expired.

TODO for time relative triggers resolve time must be called!

TODO: when returning true here. the next action will not be applied!

Definition at line 198 of file Stressor.cpp.

References addFault(), etiss::ERROR, etiss::fault::faults(), etiss::fault::Action::INJECTION, etiss::log(), etiss::VERBOSE, and etiss::WARNING.

Referenced by etiss::fault::Injector::cycleAccurateCallback().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadXML()

bool etiss::fault::Stressor::loadXML ( const std::string &  file,
const int  coreID = 0 
)
static

extracts faults out of the given xml file.

Parameters
filethe xmlfile with fault triggers.
Returns
true if XML file could be loaded.

Definition at line 80 of file Stressor.cpp.

References addFault(), etiss::fault::coreIDActuallXML, etiss::ERROR, etiss::fault::faults(), etiss::INFO, and etiss::log().

Referenced by etiss_initialize().

Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: