28 #ifndef __ARCH_GENERIC_DECODER_HH__
29 #define __ARCH_GENERIC_DECODER_HH__
36 #include "params/InstDecoder.hh"
53 template <
typename MoreBytesType>
73 return *
static_cast<Type *
>(
this);
80 return *
static_cast<const Type *
>(
this);
Defines global host-dependent types: Counter, Tick, and (indirectly) {int,uint}{8,...
virtual StaticInstPtr decode(PCStateBase &pc)=0
Decode an instruction or fetch it from the code cache.
virtual StaticInstPtr fetchRomMicroop(MicroPC micropc, StaticInstPtr curMacroop)
void * moreBytesPtr() const
virtual void takeOverFrom(InstDecoder *old)
Take over the state from an old decoder when switching CPUs.
InstDecoder(const InstDecoderParams ¶ms, MoreBytesType *mb_buf)
size_t moreBytesSize() const
bool needMoreBytes() const
Can the decoder accept more data?
bool instReady() const
Is an instruction ready to be decoded?
virtual void moreBytes(const PCStateBase &pc, Addr fetchPC)=0
Feed data to the decoder.
Abstract superclass for simulation objects.
static constexpr std::enable_if_t< std::is_integral_v< T >, int > floorLog2(T x)
constexpr uint64_t mask(unsigned nbits)
Generate a 64-bit mask of 'nbits' 1s, right justified.
const Params & params() const
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.