ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
Fault.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_FAULT_H_
15#define ETISS_FAULT_FAULT_H_
16
17#include <exception>
18#include <iostream>
19#include <limits>
20#include <list>
21#include <sstream>
22#include <stdint.h>
23#include <vector>
24
25#ifndef NO_ETISS
26#include "etiss/Misc.h"
27#include "etiss/fault/Defs.h"
28#else
29#include "fault/Defs.h"
30#endif
31
33#define MUTEX_SUPPORTED CXX0X_UP_SUPPORTED
34
35namespace etiss
36{
37namespace fault
38{
39
40typedef uint64_t INT;
41
42class Action;
43class Trigger;
44
45class Fault : public etiss::ToString
46{
47 public:
48 std::string toString() const;
49
50 void resolveTime(uint64_t time);
51 bool isResoved() const;
52
53 Fault();
54 Fault(int nullid);
55
56 public:
57 std::string name_;
59 std::vector<Trigger> triggers;
60 std::vector<Action> actions;
61};
62
64{
65 private:
66 mutable Fault fault_;
67 std::string name_;
68
69 public:
70 std::string toString() const;
71
72 bool is_set() const { return (fault_.name_ == name_); }
73 bool set_fault_reference(const std::string &identifier);
74 bool resolve_reference() const;
75 const Fault &get_fault() const { return fault_; }
76 const std::string &get_name() const { return name_; }
77};
78
79#if ETISS_FAULT_XML
80
81namespace xml
82{
83
84} // namespace xml
85
86#endif
87
88} // namespace fault
89} // namespace etiss
90
91#endif
contains general definitions used by other fault library code
general configuration and logging
static __inline__ uint64_t
Definition arm_cde.h:31
static __inline__ int32_t
Definition arm_mve.h:51
Marker interface for toString() support.
Definition Misc.h:95
std::string toString() const
operator<< can be used.
Definition Fault.cpp:269
bool is_set() const
Definition Fault.h:72
bool set_fault_reference(const std::string &identifier)
Definition Fault.cpp:286
std::string name_
string identifier, used to resolve actual reference via fault_
Definition Fault.h:67
Fault fault_
referenced Fault, needs to be resolved during sim. runtime
Definition Fault.h:66
const Fault & get_fault() const
Definition Fault.h:75
bool resolve_reference() const
Definition Fault.cpp:293
const std::string & get_name() const
Definition Fault.h:76
bool isResoved() const
check all Triggers if they are resolved.
Definition Fault.cpp:259
Fault()
Constructor: Generates a new Fault with unique ID.
Definition Fault.cpp:227
std::string toString() const
operator<< can be used.
Definition Fault.cpp:234
std::string name_
Definition Fault.h:57
void resolveTime(uint64_t time)
Resolves time for all its Triggers.
Definition Fault.cpp:251
std::vector< Trigger > triggers
contains the triggers for this fault
Definition Fault.h:59
std::vector< Action > actions
contains the actions for this fault
Definition Fault.h:60
uint64_t INT
Definition Fault.h:40
forwards: include/jit/*
Definition Benchmark.h:17