|
ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
|
Register error injection class. More...
#include <Plugin.h>


Classes | |
| class | Error |
Public Member Functions | |
| BlockAccurateHandler () | |
| ~BlockAccurateHandler () | |
| void | add (etiss::uint64 time_ps, unsigned errorid, std::string register_, etiss::uintMax xor_, etiss::uintMax and_=(etiss::uintMax)(etiss::intMax) -1, etiss::uintMax or_=0) |
| schedule an error | |
| virtual etiss::int32 | execute () |
| call to apply errors | |
| void | parseFile (std::string filename, std::string reg) |
| reads a file and adds the errors. | |
| virtual std::string | _getPluginName () const |
| virtual void | init (ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch) |
| this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute). | |
| virtual void | cleanup () |
| this function is called after cpu execution loop (etiss::CPUCore::execute) finished. | |
Public Member Functions inherited from etiss::CoroutinePlugin | |
| CoroutinePlugin () | |
| virtual | ~CoroutinePlugin () |
| virtual void | executionEnd (int32_t code) |
| called when the simulation ends but before any deinitialization is done | |
| virtual bool | isActive () |
| indicates if the plugin will do something in execution loop. | |
Public Member Functions inherited from etiss::Plugin | |
| virtual | ~Plugin () |
| unsigned | getType () |
| InterruptListenerPlugin * | getInterruptListenerPlugin () |
| CoroutinePlugin * | getCoroutinePlugin () |
| SystemWrapperPlugin * | getSystemWrapperPlugin () |
| RegisterDevicePlugin * | getRegisterDevicePlugin () |
| TranslationPlugin * | getTranslationPlugin () |
| std::string | getPluginName () const |
| const std::string & | getLastAssignedCoreName () |
| std::string | toString () const |
Public Member Functions inherited from etiss::ToString | |
| ToString () | |
| virtual | ~ToString () |
Private Attributes | |
| ETISS_CPU * | cpu |
| ETISS_System * | system |
| CPUArch * | arch |
| std::list< Error > | errors_ |
| etiss::uint64 | last_time_ps |
| etiss::uint64 | next_time_ps |
Additional Inherited Members | |
Static Public Attributes inherited from etiss::Plugin | |
| static const unsigned | INTERRUPTLISTENER = 1 << 0 |
| access to translated code | |
| static const unsigned | COROUTINE = 1 << 1 |
| callback after execution of each translated block | |
| static const unsigned | SYSTEMWRAPPER = 1 << 2 |
| can wrap/change ETISS_System structure at execution start | |
| static const unsigned | REGISTERDEVICE |
| gets noticed of changes to special registers (e.g. mmu register etc. [depends on architecture]) | |
| static const unsigned | TRANSLATION |
| access to translated code during translation phase or when instruction tree is built | |
Protected Member Functions inherited from etiss::Plugin | |
| Plugin (unsigned type=0) | |
| void | setCorrespondingCPUCoreName (std::string name) |
| virtual void | addedToCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been added to its CPUCore. | |
| virtual void | removedFromCPUCore (etiss::CPUCore *core) |
| called as soon a plugin has been removed from its CPUCore. | |
Protected Attributes inherited from etiss::Plugin | |
| ETISS_CPU * | plugin_cpu_ |
| holds a pointer to the cpu structure. will be set before init call and after cleanup call | |
| ETISS_System * | plugin_system_ |
| holds a pointer to the system structure. | |
| CPUArch * | plugin_arch_ |
| holds a pointer to the CPUArch instance. will be set before init call and after cleanup call | |
| CPUCore * | plugin_core_ |
| holds a pointer to the associated CPUCore instance. | |
Register error injection class.
errors may be injected after blocks.
if needed BlockAccurateHandler::execute may be called from within the cpu thread at any time to apply errors
| BlockAccurateHandler::BlockAccurateHandler | ( | ) |
Definition at line 28 of file Plugin.cpp.
References last_time_ps, and next_time_ps.
| BlockAccurateHandler::~BlockAccurateHandler | ( | ) |
Definition at line 33 of file Plugin.cpp.
|
virtual |
Implements etiss::Plugin.
Definition at line 201 of file Plugin.cpp.
| void BlockAccurateHandler::add | ( | etiss::uint64 | time_ps, |
| unsigned | errorid, | ||
| std::string | register_, | ||
| etiss::uintMax | xor_, | ||
| etiss::uintMax | and_ = (etiss::uintMax)(etiss::intMax)-1, |
||
| etiss::uintMax | or_ = 0 |
||
| ) |
schedule an error
| time_ps | time of activation in picoseconds |
| errorid | some usedefined id |
| register | a register name that is defined by the used etiss::CPUArch |
Definition at line 40 of file Plugin.cpp.
References errors_, etiss_BlockAccurateHandler_cmp(), and next_time_ps.

|
virtual |
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Only the SystemWrapperPlugin::unwrap function is called AFTER Plugin::cleanup
Reimplemented from etiss::Plugin.
Definition at line 212 of file Plugin.cpp.
|
virtual |
call to apply errors
Implements etiss::CoroutinePlugin.
Definition at line 55 of file Plugin.cpp.
References cpu, ETISS_CPU::cpuTime_ps, etiss::ERROR, errors_, etiss::CPUCore::getStruct(), etiss::INFO, last_time_ps, etiss::log(), next_time_ps, and etiss::Plugin::plugin_core_.

|
virtual |
this function is called before the plugin is used in the cpu execution loop (etiss::CPUCore::execute).
Only exception is the SystemWrapperPlugin whose SystemWrapperPlugin::wrap function is called BEFORE Plugin::init
Reimplemented from etiss::Plugin.
Definition at line 206 of file Plugin.cpp.
| void BlockAccurateHandler::parseFile | ( | std::string | filename, |
| std::string | reg | ||
| ) |
reads a file and adds the errors.
Syntax:
TIME_IN_NANOSECONDS;AFFECTED_BIT[;ERROR_ID]
NOTE: the ";ERROR_ID" part is optional. No spaces may exist inbetween the values
Example:
1000;3
2000;0;1234
above example schedules an error at time:
1000 ns: bit number 3 will be flipped e.g. @999ns: 0x00000000 @1001ns: 0x00000008
2000 ns: bit number 0 will be flipped e.g. @1999ns: 0x00000008 @2100ns: 0x00000009
NOTE: due to the infrequent execution of this plugin (usually only after a block)
there may be a large delay between scheduled time and application of the error
Definition at line 121 of file Plugin.cpp.
References c, errors_, etiss_BlockAccurateHandler_cmp(), next_time_ps, and printf().
Referenced by ETISSINCLUDED_createPlugin().


|
private |
|
private |
|
private |
Definition at line 105 of file Plugin.h.
Referenced by add(), execute(), and parseFile().
|
private |
Definition at line 106 of file Plugin.h.
Referenced by BlockAccurateHandler(), and execute().
|
private |
Definition at line 107 of file Plugin.h.
Referenced by add(), BlockAccurateHandler(), execute(), and parseFile().
|
private |