ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
InterruptHandler.h
Go to the documentation of this file.
1 
53 #ifndef ETISS_INCLUDE_INTERRUPTHANDLER_H_
54 #define ETISS_INCLUDE_INTERRUPTHANDLER_H_
55 
56 #include "etiss/CPUArch.h"
57 #include "etiss/InterruptVector.h"
58 #include "etiss/InterruptHandler.h"
59 #include "etiss/LibraryInterface.h"
60 #include "etiss/Plugin.h"
61 #include "etiss/jit/types.h"
62 #include <list>
63 #include <mutex>
64 #include <set>
65 #include <vector>
66 
67 namespace etiss
68 {
69 
74 {
75 
78 
79 };
80 
86 {
87  public:
88  InterruptHandler(etiss::InterruptVector *interruptVector, etiss::InterruptEnable *interruptEnable, std::shared_ptr<etiss::CPUArch> arch,
89  InterruptType itype = EDGE_TRIGGERED, bool sync = true);
90  virtual ~InterruptHandler();
95  virtual void setLine(unsigned line, bool state, etiss::uint64 time_ps);
100  virtual etiss::int32 execute();
101  virtual std::string _getPluginName() const;
102 
103  protected:
105  std::mutex mu_;
106  const bool sync_;
110  std::list<std::pair<etiss::uint64, std::pair<unsigned, bool>>> pending_;
111  const std::shared_ptr<etiss::CPUArch> cpuarch_;
112  std::set<unsigned> ed_raised_;
113  bool empty_;
114 };
115 } // namespace etiss
116 
117 #endif
etiss_int32 int32
Definition: 386-GCC.h:81
etiss_uint64 uint64
Definition: 386-GCC.h:82
contains neccesary interfaces for instruction translation.
interrupt checking and signaling
defines a general interface to set interrupt bits
class for simple library access.
plugins for extensions to code translation and instruction execution
this plugin will be called before a block is executed.
Definition: Plugin.h:299
class that handles interrupt signaling and checking.
virtual std::string _getPluginName() const
InterruptHandler(etiss::InterruptVector *interruptVector, etiss::InterruptEnable *interruptEnable, std::shared_ptr< etiss::CPUArch > arch, InterruptType itype=EDGE_TRIGGERED, bool sync=true)
const std::shared_ptr< etiss::CPUArch > cpuarch_
std::set< unsigned > ed_raised_
virtual etiss::int32 execute()
apply interrupt changes to the InterruptVector
std::list< std::pair< etiss::uint64, std::pair< unsigned, bool > > > pending_
list: (time , (line ,state) )
virtual void setLine(unsigned line, bool state, etiss::uint64 time_ps)
set the state of a line at a given time.
const InterruptType itype_
InterruptVector *const vector_
InterruptEnable *const enable_
interface to set interrupt bits
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
Definition: Benchmark.h:53
InterruptType
interrupt types supported by the default implementation
@ EDGE_TRIGGERED
@ LEVEL_TRIGGERED