37 #ifndef __BASE_TYPES_HH__
38 #define __BASE_TYPES_HH__
50 #define ULL(N) ((uint64_t)N##ULL)
52 #define LL(N) ((int64_t)N##LL)
94 explicit constexpr
Cycles(uint64_t _c) :
c(_c) { }
100 constexpr
operator uint64_t()
const {
return c; }
104 { ++
c;
return *
this; }
108 { assert(
c != 0); --
c;
return *
this; }
112 {
c += cc.
c;
return *
this; }
124 throw std::invalid_argument(
"RHS cycle value larger than LHS");
185 typedef std::shared_ptr<FaultBase>
Fault;
189 constexpr decltype(
nullptr)
NoFault =
nullptr;
193 virtual void operator()(uint8_t *
p) = 0;
209 #endif // __BASE_TYPES_HH__
void operator()(uint8_t *p)
constexpr Cycles operator<<(const int32_t shift) const
constexpr Cycles operator-(const Cycles &b) const
decltype(nullptr) constexpr NoFault
Cycles is a wrapper class for representing cycle counts, i.e.
constexpr bool operator>(const Cycles &cc) const
Greater than comparison used for > Cycles(0).
const PortID InvalidPortID
Cycles & operator++()
Prefix increment operator.
constexpr Cycles operator+(const Cycles &b) const
static const MicroPC MicroPCRomBit
constexpr Cycles operator>>(const int32_t shift) const
constexpr Cycles(uint64_t _c)
Explicit constructor assigning a value.
virtual ~AtomicOpFunctor()
Classes for managing reference counted objects.
Cycles & operator+=(const Cycles &cc)
In-place addition of cycles.
uint64_t Tick
Tick count type.
uint64_t c
Member holding the actual value.
Cycles()
Default constructor for parameter classes.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
#define ULL(N)
uint64_t constant
static MicroPC romMicroPC(MicroPC upc)
int64_t Counter
Statistics counter type.
static bool isRomMicroPC(MicroPC upc)
const ThreadID InvalidThreadID
int16_t ThreadID
Thread index/ID type.
Cycles & operator--()
Prefix decrement operator.
const ContextID InvalidContextID
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
virtual void execute(T *p)=0
std::shared_ptr< FaultBase > Fault
static MicroPC normalMicroPC(MicroPC upc)
int ContextID
Globally unique thread context ID.