ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
|
#include <Trigger.h>
Public Types | |
enum | Type { META_COUNTER , VARIABLEVALUE , TIME , TIMERELATIVE , NOP } |
Public Member Functions | |
Trigger () | |
Type: NOP (no operation) More... | |
Trigger (const Trigger &sub, uint64_t count) | |
This Trigger counts with count how often a sub trigger e.g. VRIABLEVALUE trigger fires. When this sub trigger fires the count 'th time, the META_COUNTER trigger fires itself. More... | |
Trigger (const InjectorAddress &target_injector, const std::string &field, uint64_t value) | |
This Trigger fires when variable field has the value value . More... | |
Trigger (const InjectorAddress &target_injector, uint64_t time_ps, bool relative=false) | |
This Trigger fires when a specific runtime has passed. More... | |
Trigger (const Trigger &cpy) | |
Trigger & | operator= (const Trigger &cpy) |
~Trigger () | |
uint64_t | getTriggerCount () const |
Trigger & | getSubTrigger () |
const Trigger & | getSubTrigger () const |
uint64_t | getTriggerTime () const |
const InjectorAddress & | getInjectorAddress () const |
const Injector_ptr & | getInjector () const |
bool | isNOP () const |
const std::string & | getTriggerField () const |
const uint64_t & | getTriggerFieldValue () const |
Type | getType () const |
bool | fired (uint64_t time_ps, etiss::fault::Injector *target_injector) |
this function checks if the Trigger has just fired. More... | |
void | resolveTime (uint64_t time) |
this function calculates in case of a TIMERELATIVE Trigger a constant TIME trigger More... | |
bool | isResolved () const |
returns if the translation from TIMERELATIVE to TIME trigger has taken place More... | |
std::string | toString () const |
operator<< can be used. More... | |
Public Member Functions inherited from etiss::ToString | |
ToString () | |
virtual | ~ToString () |
Private Member Functions | |
void | ensure (Type type) const |
Private Attributes | |
Type | type_ |
std::string | field_ |
Trigger * | sub_ |
InjectorAddress | inj_ |
void * | fieldptr_ |
uint64_t | param1_ |
uint64_t | param2_ |
etiss::fault::Trigger::Trigger | ( | ) |
Type: NOP (no operation)
Definition at line 70 of file Trigger.cpp.
References etiss::log(), and etiss::VERBOSE.
Referenced by operator=().
This Trigger counts with count
how often a sub
trigger e.g. VRIABLEVALUE trigger fires. When this sub
trigger fires the count
'th time, the META_COUNTER trigger fires itself.
Definition at line 74 of file Trigger.cpp.
References etiss::log(), and etiss::VERBOSE.
etiss::fault::Trigger::Trigger | ( | const InjectorAddress & | target_injector, |
const std::string & | field, | ||
uint64_t | value | ||
) |
This Trigger fires when variable field
has the value value
.
Definition at line 79 of file Trigger.cpp.
References etiss::log(), and etiss::VERBOSE.
etiss::fault::Trigger::Trigger | ( | const InjectorAddress & | target_injector, |
uint64_t | time_ps, | ||
bool | relative = false |
||
) |
This Trigger fires when a specific runtime has passed.
Definition at line 84 of file Trigger.cpp.
References etiss::log(), and etiss::VERBOSE.
etiss::fault::Trigger::Trigger | ( | const Trigger & | cpy | ) |
Definition at line 91 of file Trigger.cpp.
etiss::fault::Trigger::~Trigger | ( | ) |
Definition at line 144 of file Trigger.cpp.
References fieldptr_, etiss::fault::InjectorAddress::getInjector(), inj_, etiss::fault::InjectorAddress::isResolved(), META_COUNTER, sub_, type_, and VARIABLEVALUE.
|
private |
Definition at line 60 of file Trigger.cpp.
References etiss::FATALERROR, etiss::log(), get_metrics::type, and type_.
Referenced by getSubTrigger(), getTriggerCount(), getTriggerField(), getTriggerFieldValue(), and getTriggerTime().
bool etiss::fault::Trigger::fired | ( | uint64_t | time_ps, |
etiss::fault::Injector * | target_injector | ||
) |
this function checks if the Trigger has just fired.
TODO decide how to handle the case of multiple trigger checks at the same simulation time
Definition at line 157 of file Trigger.cpp.
References etiss::ERROR, etiss::fault::Injector::fastFieldAccessPtr(), field_, fieldptr_, fired(), etiss::fault::InjectorAddress::getInjector(), etiss::fault::InjectorAddress::getInjectorPath(), inj_, etiss::log(), META_COUNTER, NOP, param1_, param2_, resolveTime(), sub_, TIME, TIMERELATIVE, type_, uint64_t, VARIABLEVALUE, etiss::VERBOSE, and etiss::WARNING.
Referenced by fired().
const Injector_ptr & etiss::fault::Trigger::getInjector | ( | ) | const |
Definition at line 305 of file Trigger.cpp.
References etiss::fault::InjectorAddress::getInjector(), getInjector(), inj_, META_COUNTER, sub_, and type_.
Referenced by getInjector().
const InjectorAddress & etiss::fault::Trigger::getInjectorAddress | ( | ) | const |
Definition at line 301 of file Trigger.cpp.
References inj_.
Trigger & etiss::fault::Trigger::getSubTrigger | ( | ) |
Definition at line 275 of file Trigger.cpp.
References ensure(), META_COUNTER, and sub_.
Referenced by getTriggerField(), getTriggerFieldValue(), getTriggerTime(), isResolved(), and resolveTime().
const Trigger & etiss::fault::Trigger::getSubTrigger | ( | ) | const |
Definition at line 280 of file Trigger.cpp.
References ensure(), META_COUNTER, and sub_.
uint64_t etiss::fault::Trigger::getTriggerCount | ( | ) | const |
Definition at line 270 of file Trigger.cpp.
References ensure(), META_COUNTER, and param1_.
const std::string & etiss::fault::Trigger::getTriggerField | ( | ) | const |
Definition at line 327 of file Trigger.cpp.
References ensure(), field_, getSubTrigger(), getTriggerField(), META_COUNTER, type_, and VARIABLEVALUE.
Referenced by getTriggerField().
const uint64_t & etiss::fault::Trigger::getTriggerFieldValue | ( | ) | const |
Definition at line 337 of file Trigger.cpp.
References ensure(), getSubTrigger(), getTriggerFieldValue(), META_COUNTER, param1_, type_, and VARIABLEVALUE.
Referenced by getTriggerFieldValue().
uint64_t etiss::fault::Trigger::getTriggerTime | ( | ) | const |
Definition at line 285 of file Trigger.cpp.
References ensure(), getSubTrigger(), getTriggerTime(), META_COUNTER, param1_, TIME, TIMERELATIVE, and type_.
Referenced by getTriggerTime().
Trigger::Type etiss::fault::Trigger::getType | ( | ) | const |
Definition at line 347 of file Trigger.cpp.
References type_.
bool etiss::fault::Trigger::isNOP | ( | ) | const |
Definition at line 316 of file Trigger.cpp.
References isNOP(), META_COUNTER, NOP, sub_, and type_.
Referenced by isNOP().
bool etiss::fault::Trigger::isResolved | ( | ) | const |
returns if the translation from TIMERELATIVE to TIME trigger has taken place
Definition at line 261 of file Trigger.cpp.
References getSubTrigger(), isResolved(), META_COUNTER, TIMERELATIVE, and type_.
Referenced by isResolved().
Definition at line 95 of file Trigger.cpp.
References field_, fieldptr_, etiss::fault::InjectorAddress::getInjector(), inj_, etiss::fault::InjectorAddress::isResolved(), META_COUNTER, NOP, param1_, param2_, sub_, TIME, TIMERELATIVE, Trigger(), type_, and VARIABLEVALUE.
void etiss::fault::Trigger::resolveTime | ( | uint64_t | time | ) |
this function calculates in case of a TIMERELATIVE Trigger a constant TIME trigger
Definition at line 247 of file Trigger.cpp.
References getSubTrigger(), etiss::log(), META_COUNTER, param1_, resolveTime(), TIME, TIMERELATIVE, type_, and etiss::VERBOSE.
Referenced by fired(), and resolveTime().
std::string etiss::fault::Trigger::toString | ( | ) | const |
operator<< can be used.
Definition at line 352 of file Trigger.cpp.
References field_, META_COUNTER, NOP, param1_, param2_, TIME, TIMERELATIVE, type_, and VARIABLEVALUE.
Referenced by etiss::fault::Injector::acceleratedTrigger(), and etiss::fault::Injector::addTrigger().
|
private |
Definition at line 164 of file Trigger.h.
Referenced by fired(), getTriggerField(), operator=(), and toString().
|
private |
Definition at line 167 of file Trigger.h.
Referenced by fired(), operator=(), and ~Trigger().
|
private |
Definition at line 166 of file Trigger.h.
Referenced by fired(), getInjector(), getInjectorAddress(), operator=(), and ~Trigger().
|
private |
Definition at line 168 of file Trigger.h.
Referenced by fired(), getTriggerCount(), getTriggerFieldValue(), getTriggerTime(), operator=(), resolveTime(), and toString().
|
private |
Definition at line 169 of file Trigger.h.
Referenced by fired(), operator=(), and toString().
|
private |
Definition at line 165 of file Trigger.h.
Referenced by fired(), getInjector(), getSubTrigger(), isNOP(), operator=(), and ~Trigger().
|
private |
Definition at line 163 of file Trigger.h.
Referenced by ensure(), fired(), getInjector(), getTriggerField(), getTriggerFieldValue(), getTriggerTime(), getType(), isNOP(), isResolved(), operator=(), resolveTime(), toString(), and ~Trigger().