ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Plugin.h
Go to the documentation of this file.
1
56#ifndef ETISS_PLUGIN_ERRORINJECTION_PLUGIN_H_
57#define ETISS_PLUGIN_ERRORINJECTION_PLUGIN_H_
58
59#include "etiss/Plugin.h"
60
61#include <list>
62#include <string>
63
64namespace etiss
65{
66
67namespace plugin
68{
69
70namespace errorInjection
71{
72
79{
80 public:
81 class Error
82 {
83 public:
84 Error(std::string reg, unsigned errorid, etiss::uint64 time_ps, etiss::uintMax xor_,
85 etiss::uintMax and_ = (etiss::uintMax)(etiss::intMax)-1, etiss::uintMax or_ = 0);
86 std::string reg;
87 unsigned errorid;
88 etiss::uint64 time_ps;
89 etiss::uintMax xor_;
90 etiss::uintMax and_;
91 etiss::uintMax or_;
92 };
93
96
103 void add(etiss::uint64 time_ps, unsigned errorid, std::string register_, etiss::uintMax xor_,
104 etiss::uintMax and_ = (etiss::uintMax)(etiss::intMax)-1, etiss::uintMax or_ = 0);
105
109 virtual etiss::int32 execute();
110
132 void parseFile(std::string filename, std::string reg);
133
134 virtual std::string _getPluginName() const;
135
136 virtual void init(ETISS_CPU *cpu, ETISS_System *system, CPUArch *arch);
137 virtual void cleanup();
138
139 private:
143 std::list<Error> errors_;
144 etiss::uint64 last_time_ps;
145 etiss::uint64 next_time_ps;
146};
147
148} // namespace errorInjection
149
150} // namespace plugin
151
152} // namespace etiss
153
154#endif
plugins for extensions to code translation and instruction execution
the interface to translate instructions of and processor architecture
Definition CPUArch.h:162
this plugin will be called before a block is executed.
Definition Plugin.h:299
Register error injection class.
Definition Plugin.h:79
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
Definition Plugin.cpp:77
virtual etiss::int32 execute()
call to apply errors
Definition Plugin.cpp:92
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)...
Definition Plugin.cpp:243
virtual void cleanup()
this function is called after cpu execution loop (etiss::CPUCore::execute) finished.
Definition Plugin.cpp:249
void parseFile(std::string filename, std::string reg)
reads a file and adds the errors.
Definition Plugin.cpp:158
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition Benchmark.h:53
basic cpu state structure needed for execution of any cpu architecture.
Definition CPU.h:89
memory access and time synchronization functions.
Definition System.h:78