ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
etiss
include
etiss
fault
Trigger.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: BSD-3-Clause
2
//
3
// This file is part of ETISS. It is licensed under the BSD 3-Clause License; you may not use this file except in
4
// compliance with the License. You should have received a copy of the license along with this project. If not, see the
5
// LICENSE file.
14
#ifndef ETISS_FAULT_TRIGGER_H_
15
#define ETISS_FAULT_TRIGGER_H_
16
17
#include <iostream>
18
#include <
stdint.h
>
19
20
#if CXX0X_UP_SUPPORTED
21
#include <memory>
22
#endif
23
24
#ifndef NO_ETISS
25
#include "
etiss/Misc.h
"
26
#include "
etiss/fault/Misc.h
"
27
#else
28
#include "
fault/Misc.h
"
29
#endif
30
31
#include "enum.h"
32
33
namespace
etiss
34
{
35
namespace
fault
36
{
37
38
class
Injector;
39
class
InjectorAddress;
40
41
#if CXX0X_UP_SUPPORTED
42
typedef
std::shared_ptr<Injector>
Injector_ptr
;
43
#else
44
typedef
Injector *
Injector_ptr
;
45
#endif
46
47
BETTER_ENUM(Trigger_Type,
char
, NOP = 0, META_COUNTER, VARIABLEVALUE, TIME, TIMERELATIVE, ASAP)
48
49
class
Trigger
: public
etiss
::
ToString
50
{
51
public
:
52
typedef
Trigger_Type
type_t
;
53
// constructors
57
Trigger
();
58
// constructors
62
Trigger
(
const
InjectorAddress
&target_injector);
69
Trigger
(
const
Trigger
&sub,
uint64_t
count);
75
Trigger
(
const
InjectorAddress
&target_injector,
const
std::string &field,
uint64_t
value);
81
Trigger
(
const
InjectorAddress
&target_injector,
uint64_t
time_ps,
bool
relative =
false
);
82
83
// Copy Constructors
84
Trigger
(
const
Trigger
&cpy);
85
Trigger
&operator=(
const
Trigger
&cpy);
86
87
#if CXX0X_UP_SUPPORTED
88
Trigger
(
Trigger
&&cpy);
89
Trigger
&operator=(
Trigger
&&cpy);
90
#endif
91
92
~Trigger
();
93
94
// Getter
95
uint64_t
getTriggerCount()
const
;
96
const
Trigger
&getSubTrigger()
const
;
97
uint64_t
getTriggerTime()
const
;
98
const
InjectorAddress
&getInjectorAddress()
const
;
99
const
Injector_ptr
&getInjector()
const
;
100
bool
isNOP()
const
;
101
const
std::string &getTriggerField()
const
;
102
const
uint64_t
&getTriggerFieldValue()
const
;
103
const
type_t
&getType()
const
;
104
105
// Members
108
bool
check(
uint64_t
time_ps,
etiss::fault::Injector
*target_injector);
109
113
void
resolveTime(
uint64_t
time);
117
bool
isResolved()
const
;
118
119
std::string
toString
()
const
;
120
121
private
:
// Attributes
122
type_t
type_
;
123
std::string
field_
;
124
std::unique_ptr<Trigger>
sub_
;
125
std::unique_ptr<InjectorAddress>
inj_
;
126
void
*
fieldptr_
;
127
uint64_t
param1_{ 0 };
128
uint64_t
param2_{ 0 };
129
130
// Private Members
131
void
ensure(type_t type)
const
;
132
};
133
134
#if ETISS_FAULT_XML
135
namespace
xml
136
{
137
138
}
// namespace xml
139
#endif
140
141
}
// namespace fault
142
}
// namespace etiss
143
144
#endif
// ETISS_FAULT_TRIGGER_H_
Misc.h
general configuration and logging
uint64_t
static __inline__ uint64_t
Definition
arm_cde.h:31
etiss::ToString
Marker interface for toString() support.
Definition
Misc.h:95
etiss::fault::InjectorAddress
Definition
InjectorAddress.h:34
etiss::fault::Injector
Definition
Injector.h:48
etiss::fault::Trigger
Definition
Trigger.h:50
etiss::fault::Trigger::fieldptr_
void * fieldptr_
Definition
Trigger.h:126
etiss::fault::Trigger::sub_
std::unique_ptr< Trigger > sub_
Definition
Trigger.h:124
etiss::fault::Trigger::inj_
std::unique_ptr< InjectorAddress > inj_
Definition
Trigger.h:125
etiss::fault::Trigger::field_
std::string field_
Definition
Trigger.h:123
etiss::fault::Trigger::type_t
Trigger_Type type_t
Definition
Trigger.h:52
etiss::fault::Trigger::type_
type_t type_
Definition
Trigger.h:122
Misc.h
general helpers for fault
etiss::fault::Injector_ptr
std::shared_ptr< Injector > Injector_ptr
Definition
Defs.h:48
etiss
forwards: include/jit/*
Definition
Benchmark.h:17
etiss::toString
std::string toString(const T &val)
conversion of type T to std::string.
Definition
Misc.h:133
stdint.h
Generated on Sat Nov 15 2025 19:30:10 for ETISS 0.11.2 by
1.9.8