ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
etiss::fault::Action Class Reference

#include <Action.h>

Inheritance diagram for etiss::fault::Action:
Inheritance graph
[legend]
Collaboration diagram for etiss::fault::Action:
Collaboration graph
[legend]

Public Types

typedef Action_Type type_t
 
typedef Action_MaskOp mask_op_t
 

Public Member Functions

bool is_action_on_field (void) const
 returns true if type_ is an action on a Field
 
 Action ()
 
 Action (int32_t event)
 A etiss::RETURNCODE exception will be injected into the etiss simulation loop.
 
 Action (const InjectorAddress &inj, const std::string &command)
 abstract string command will be passed to the targeted injector
 
 Action (const InjectorAddress &inj, const std::string &field, unsigned bit)
 the bit at the given position of the given field of the given injector will be flipped
 
 Action (const InjectorAddress &inj, const std::string &field, mask_op_t mask_op, uint64_t mask_value)
 applies a mask type injection (field op= mask;) where <op> can be bitwise AND, OR, XOR, NAND, NOR
 
 Action (const FaultRef &fault_ref, type_t type)
 injects a fault. this is especially usefull with Triggers of type TIMERELATIVE
 
 Action (const Action &cpy)
 
Actionoperator= (const Action &cpy)
 
const type_tgetType () const
 
const InjectorAddressgetInjectorAddress () const
 
const std::string & getCommand () const
 COMMAND only.
 
const std::string & getTargetField () const
 BITFLIP only.
 
unsigned getTargetBit () const
 BITFLIP only.
 
const FaultRefgetFaultRef () const
 INJECTION and EJECTION only.
 
const mask_op_tgetMaskOp () const
 MASK only.
 
uint64_t getMaskValue () const
 
int32_t getEvent () const
 
std::string toString () const
 operator<< can be used.
 
- Public Member Functions inherited from etiss::ToString
 ToString ()
 
virtual ~ToString ()
 

Private Member Functions

void ensure (type_t)
 

Private Attributes

type_t type_
 type of the Attribute
 
std::unique_ptr< InjectorAddressinj_
 Address of Injector.
 
std::string command_
 command e.g. for booting OR1KVCPU
 
std::string field_
 concerning Field (for fault injection)
 
unsigned bit_ = { 0 }
 concerning Bit (for fault injection)
 
mask_op_t mask_op_ { mask_op_t::NOP }
 mask operation (for mask injection)
 
uint64_t mask_value_ { 0 }
 mask value (for mask injection)
 
std::unique_ptr< FaultReffault_ref_
 for fault injection
 
int32_t event_ { 0 }
 exception, or rather etiss::RETURNCODE to to be injected into the simulation loop
 

Detailed Description

Definition at line 45 of file Action.h.

Member Typedef Documentation

◆ mask_op_t

typedef Action_MaskOp etiss::fault::Action::mask_op_t

Definition at line 49 of file Action.h.

◆ type_t

typedef Action_Type etiss::fault::Action::type_t

Definition at line 48 of file Action.h.

Constructor & Destructor Documentation

◆ Action() [1/7]

etiss::fault::Action::Action ( )
Note
Type: NOP (no operation)

Definition at line 40 of file Action.cpp.

References etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [2/7]

etiss::fault::Action::Action ( int32_t  event)

A etiss::RETURNCODE exception will be injected into the etiss simulation loop.

Note
Type: Exception

Definition at line 46 of file Action.cpp.

References etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [3/7]

etiss::fault::Action::Action ( const InjectorAddress inj,
const std::string &  command 
)

abstract string command will be passed to the targeted injector

Note
Type: Command

Definition at line 52 of file Action.cpp.

References etiss::fault::InjectorAddress::getInjectorPath(), etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [4/7]

etiss::fault::Action::Action ( const InjectorAddress inj,
const std::string &  field,
unsigned  bit 
)

the bit at the given position of the given field of the given injector will be flipped

Note
Type: BitFlip

Definition at line 59 of file Action.cpp.

References etiss::fault::InjectorAddress::getInjectorPath(), etiss::log(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [5/7]

etiss::fault::Action::Action ( const InjectorAddress inj,
const std::string &  field,
mask_op_t  mask_op,
uint64_t  mask_value 
)

applies a mask type injection (field op= mask;) where <op> can be bitwise AND, OR, XOR, NAND, NOR

Note
Type: MASK

Definition at line 67 of file Action.cpp.

References etiss::fault::InjectorAddress::getInjectorPath(), etiss::log(), mask_op_, and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [6/7]

etiss::fault::Action::Action ( const FaultRef fault_ref,
type_t  type 
)

injects a fault. this is especially usefull with Triggers of type TIMERELATIVE

Note
Type: Injection

Definition at line 80 of file Action.cpp.

References etiss::log(), etiss::fault::FaultRef::toString(), and etiss::VERBOSE.

Here is the call graph for this function:

◆ Action() [7/7]

etiss::fault::Action::Action ( const Action cpy)

Definition at line 86 of file Action.cpp.

Member Function Documentation

◆ ensure()

void etiss::fault::Action::ensure ( type_t  t)
private

Definition at line 29 of file Action.cpp.

References type_.

◆ getCommand()

const std::string & etiss::fault::Action::getCommand ( ) const

COMMAND only.

Definition at line 155 of file Action.cpp.

References command_, etiss::FATALERROR, etiss::log(), and type_.

Referenced by main(), and operator=().

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

◆ getEvent()

int32_t etiss::fault::Action::getEvent ( ) const

Definition at line 206 of file Action.cpp.

References event_, etiss::FATALERROR, etiss::log(), and type_.

Referenced by operator=().

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

◆ getFaultRef()

const FaultRef & etiss::fault::Action::getFaultRef ( ) const

INJECTION and EJECTION only.

Definition at line 181 of file Action.cpp.

References etiss::FATALERROR, fault_ref_, etiss::log(), and type_.

Referenced by operator=().

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

◆ getInjectorAddress()

const InjectorAddress & etiss::fault::Action::getInjectorAddress ( ) const

Definition at line 144 of file Action.cpp.

References etiss::FATALERROR, inj_, etiss::log(), and type_.

Referenced by operator=().

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

◆ getMaskOp()

const Action::mask_op_t & etiss::fault::Action::getMaskOp ( ) const

MASK only.

Definition at line 189 of file Action.cpp.

References etiss::FATALERROR, etiss::log(), mask_op_, and type_.

Referenced by etiss::VirtualStruct::Field::_applyAction(), and operator=().

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

◆ getMaskValue()

uint64_t etiss::fault::Action::getMaskValue ( ) const

Definition at line 197 of file Action.cpp.

References etiss::FATALERROR, etiss::log(), mask_value_, and type_.

Referenced by etiss::VirtualStruct::Field::_applyAction(), and operator=().

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

◆ getTargetBit()

unsigned etiss::fault::Action::getTargetBit ( ) const

BITFLIP only.

Definition at line 173 of file Action.cpp.

References bit_, etiss::FATALERROR, etiss::log(), and type_.

Referenced by etiss::VirtualStruct::Field::_applyAction(), and operator=().

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

◆ getTargetField()

const std::string & etiss::fault::Action::getTargetField ( ) const

BITFLIP only.

is_action_on_field only

Definition at line 164 of file Action.cpp.

References etiss::FATALERROR, field_, etiss::log(), and type_.

Referenced by etiss::VirtualStruct::applyAction(), operator=(), and etiss::VirtualStruct::update_field_access_rights().

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

◆ getType()

const Action::type_t & etiss::fault::Action::getType ( ) const

Definition at line 139 of file Action.cpp.

References type_.

Referenced by etiss::VirtualStruct::Field::_applyAction(), etiss::VirtualStruct::applyAction(), and etiss::VirtualStruct::update_field_access_rights().

Here is the caller graph for this function:

◆ is_action_on_field()

bool etiss::fault::Action::is_action_on_field ( void  ) const

returns true if type_ is an action on a Field

Definition at line 35 of file Action.cpp.

References type_.

◆ operator=()

Action & etiss::fault::Action::operator= ( const Action cpy)

◆ toString()

std::string etiss::fault::Action::toString ( ) const

operator<< can be used.

Definition at line 215 of file Action.cpp.

Member Data Documentation

◆ bit_

unsigned etiss::fault::Action::bit_ = { 0 }
private

concerning Bit (for fault injection)

Definition at line 131 of file Action.h.

Referenced by getTargetBit(), and operator=().

◆ command_

std::string etiss::fault::Action::command_
private

command e.g. for booting OR1KVCPU

Definition at line 129 of file Action.h.

Referenced by getCommand(), and operator=().

◆ event_

int32_t etiss::fault::Action::event_ { 0 }
private

exception, or rather etiss::RETURNCODE to to be injected into the simulation loop

Definition at line 136 of file Action.h.

Referenced by getEvent(), and operator=().

◆ fault_ref_

std::unique_ptr<FaultRef> etiss::fault::Action::fault_ref_
private

for fault injection

Definition at line 134 of file Action.h.

Referenced by getFaultRef(), and operator=().

◆ field_

std::string etiss::fault::Action::field_
private

concerning Field (for fault injection)

Definition at line 130 of file Action.h.

Referenced by getTargetField(), and operator=().

◆ inj_

std::unique_ptr<InjectorAddress> etiss::fault::Action::inj_
private

Address of Injector.

Definition at line 128 of file Action.h.

Referenced by getInjectorAddress(), and operator=().

◆ mask_op_

mask_op_t etiss::fault::Action::mask_op_ { mask_op_t::NOP }
private

mask operation (for mask injection)

Definition at line 132 of file Action.h.

Referenced by Action(), getMaskOp(), and operator=().

◆ mask_value_

uint64_t etiss::fault::Action::mask_value_ { 0 }
private

mask value (for mask injection)

Definition at line 133 of file Action.h.

Referenced by getMaskValue(), and operator=().

◆ type_

type_t etiss::fault::Action::type_
private

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