35#ifndef __BASE_TYPES_HH__
36#define __BASE_TYPES_HH__
89 explicit constexpr Cycles(uint64_t _c) :
c(_c) { }
95 constexpr operator uint64_t()
const {
return c; }
123 throw std::invalid_argument(
"RHS cycle value larger than LHS");
162 return upc & ~MicroPCRomBit;
178static inline uint32_t
190static inline uint64_t
249typedef std::shared_ptr<FaultBase>
Fault;
Cycles is a wrapper class for representing cycle counts, i.e.
constexpr Cycles operator+(const Cycles &b) const
Cycles & operator+=(const Cycles &cc)
In-place addition of cycles.
constexpr Cycles operator>>(const int32_t shift) const
uint64_t c
Member holding the actual value.
friend std::ostream & operator<<(std::ostream &out, const Cycles &cycles)
constexpr Cycles(uint64_t _c)
Explicit constructor assigning a value.
Cycles & operator--()
Prefix decrement operator.
Cycles & operator++()
Prefix increment operator.
constexpr bool operator>(const Cycles &cc) const
Greater than comparison used for > Cycles(0).
Cycles()
Default constructor for parameter classes.
constexpr Cycles operator-(const Cycles &b) const
double Counter
All counters are of 64-bit values.
Copyright (c) 2024 - Pranith Kumar Copyright (c) 2020 Inria All rights reserved.
std::shared_ptr< FaultBase > Fault
int16_t ThreadID
Thread index/ID type.
static uint32_t floatToBits32(float val)
const PortID InvalidPortID
const ThreadID InvalidThreadID
static uint64_t floatToBits(double val)
static MicroPC romMicroPC(MicroPC upc)
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
int16_t PortID
Port index/ID type, and a symbolic name for an invalid port id.
uint64_t Tick
Tick count type.
static uint64_t floatToBits64(double val)
static double bitsToFloat(uint64_t val)
int ContextID
Globally unique thread context ID.
static bool isRomMicroPC(MicroPC upc)
const ContextID InvalidContextID
static double bitsToFloat64(uint64_t val)
static const MicroPC MicroPCRomBit
static float bitsToFloat32(uint32_t val)
constexpr decltype(nullptr) NoFault
static MicroPC normalMicroPC(MicroPC upc)