ETISS 0.11.2
ExtendableTranslatingInstructionSetSimulator(version0.11.2)
Loading...
Searching...
No Matches
InterruptHandler.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.
15#ifndef ETISS_INCLUDE_INTERRUPTHANDLER_H_
16#define ETISS_INCLUDE_INTERRUPTHANDLER_H_
17
18#include "etiss/Misc.h"
19#include "etiss/Plugin.h"
20#include "etiss/jit/types.h"
21#include <list>
22#include <mutex>
23#include <set>
24#include <vector>
25
26namespace etiss
27{
28
39
45{
46 public:
47 InterruptHandler(etiss::InterruptVector *interruptVector, etiss::InterruptEnable *interruptEnable,
48 std::shared_ptr<etiss::CPUArch> arch, InterruptType itype = EDGE_TRIGGERED, bool sync = true);
49 virtual ~InterruptHandler();
54 virtual void setLine(unsigned line, bool state, etiss::uint64 time_ps);
59 virtual etiss::int32 execute();
60 virtual std::string _getPluginName() const;
61
62 protected:
64 std::mutex mu_;
65 const bool sync_;
69 std::list<std::pair<etiss::uint64, std::pair<unsigned, bool>>> pending_;
70 const std::shared_ptr<etiss::CPUArch> cpuarch_;
71 std::set<unsigned> ed_raised_;
72 bool empty_;
73};
74} // namespace etiss
75
76#endif
general configuration and logging
plugins for extensions to code translation and instruction execution
this plugin will be called before a block is executed.
Definition Plugin.h:259
class that handles interrupt signaling and checking.
virtual std::string _getPluginName() const
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
forwards: include/jit/*
Definition Benchmark.h:17
InterruptType
interrupt types supported by the default implementation