54 using namespace etiss;
58 : itype_(itype), sync_(sync), vector_(interruptVector), enable_(interruptEnable), cpuarch_(arch)
66 const std::pair<
etiss::uint64, std::pair<unsigned, bool>> &o2)
68 return o1.first < o2.first;
78 pending_.push_back(std::make_pair(time_ps, std::make_pair(line, state)));
112 std::pair<etiss::uint64, std::pair<unsigned, bool>> &cur =
pending_.front();
117 if (cur.second.second)
141 std::cout <<
"InterruptHandler::execute: ERROR: interrupt type is invalid" <<
stream_code_info
174 return "InterruptHandler";
bool interrupt_handler_cmp(const std::pair< etiss::uint64, std::pair< unsigned, bool >> &o1, const std::pair< etiss::uint64, std::pair< unsigned, bool >> &o2)
interrupt checking and signaling
virtual ~InterruptHandler()
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)
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
virtual bool isActive() const
bool consumed_by_interruptlistener_
virtual void setBit(unsigned bit, bool state)=0
set the bit of an interrupt line to state (true = raised)
ETISS_CPU * plugin_cpu_
holds a pointer to the cpu structure. will be set before init call and after cleanup call
MM_EXPORT const int32_t NOERROR
Page Table Entry (PTE) defines the composition of Page Frame Number (PFN) and relavant flags.
InterruptType
interrupt types supported by the default implementation
etiss_uint64 cpuTime_ps
simulation time of cpu