Go to the documentation of this file.
35 #ifndef __BASE_TYPES_HH__
36 #define __BASE_TYPES_HH__
47 #include "enums/ByteOrder.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");
170 static inline uint32_t
182 static inline uint64_t
241 typedef std::shared_ptr<FaultBase>
Fault;
245 constexpr decltype(
nullptr)
NoFault =
nullptr;
247 #endif // __BASE_TYPES_HH__
const ThreadID InvalidThreadID
constexpr Cycles operator<<(const int32_t shift) const
const PortID InvalidPortID
static float bitsToFloat32(uint32_t val)
int16_t ThreadID
Thread index/ID type.
static MicroPC romMicroPC(MicroPC upc)
int ContextID
Globally unique thread context ID.
Cycles & operator+=(const Cycles &cc)
In-place addition of cycles.
uint64_t Tick
Tick count type.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
const ContextID InvalidContextID
constexpr Cycles operator+(const Cycles &b) const
Cycles & operator++()
Prefix increment operator.
constexpr Cycles operator-(const Cycles &b) const
int64_t Counter
Statistics counter type.
Cycles & operator--()
Prefix decrement operator.
std::shared_ptr< FaultBase > Fault
static const MicroPC MicroPCRomBit
constexpr Cycles operator>>(const int32_t shift) const
constexpr bool operator>(const Cycles &cc) const
Greater than comparison used for > Cycles(0).
constexpr decltype(nullptr) NoFault
static double bitsToFloat64(uint64_t val)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
static bool isRomMicroPC(MicroPC upc)
constexpr Cycles(uint64_t _c)
Explicit constructor assigning a value.
static double bitsToFloat(uint64_t val)
Cycles is a wrapper class for representing cycle counts, i.e.
static MicroPC normalMicroPC(MicroPC upc)
uint64_t c
Member holding the actual value.
static uint64_t floatToBits(double val)
static uint32_t floatToBits32(float val)
Cycles()
Default constructor for parameter classes.
#define ULL(N)
uint64_t constant
static uint64_t floatToBits64(double val)
Generated on Wed Sep 30 2020 14:02:01 for gem5 by doxygen 1.8.17