gem5  v21.1.0.2
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes | List of all members
gem5::RiscvISA::Decoder Class Reference

#include <decoder.hh>

Inheritance diagram for gem5::RiscvISA::Decoder:
gem5::InstDecoder

Public Member Functions

 Decoder (ISA *isa=nullptr)
 
void process ()
 
void reset ()
 
bool compressed (ExtMachInst inst)
 
void moreBytes (const PCState &pc, Addr fetchPC)
 
bool needMoreBytes ()
 
bool instReady ()
 
void takeOverFrom (Decoder *old)
 
StaticInstPtr decode (RiscvISA::PCState &nextPC)
 
- Public Member Functions inherited from gem5::InstDecoder
template<typename MoreBytesType >
 InstDecoder (MoreBytesType *mb_buf)
 
virtual StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop)
 
void * moreBytesPtr () const
 
size_t moreBytesSize () const
 
Addr pcMask () const
 

Protected Member Functions

StaticInstPtr decodeInst (ExtMachInst mach_inst)
 
StaticInstPtr decode (ExtMachInst mach_inst, Addr addr)
 Decode a machine instruction. More...
 

Protected Attributes

ExtMachInst emi
 
uint32_t machInst
 
bool instDone
 
- Protected Attributes inherited from gem5::InstDecoder
void * _moreBytesPtr
 
size_t _moreBytesSize
 
Addr _pcMask
 

Private Attributes

decode_cache::InstMap< ExtMachInstinstMap
 
bool aligned
 
bool mid
 
bool more
 

Detailed Description

Definition at line 48 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

gem5::RiscvISA::Decoder::Decoder ( ISA isa = nullptr)
inline

Definition at line 70 of file decoder.hh.

References reset().

Member Function Documentation

◆ compressed()

bool gem5::RiscvISA::Decoder::compressed ( ExtMachInst  inst)
inline

Definition at line 75 of file decoder.hh.

Referenced by decode(), and moreBytes().

◆ decode() [1/2]

StaticInstPtr gem5::RiscvISA::Decoder::decode ( ExtMachInst  mach_inst,
Addr  addr 
)
protected

Decode a machine instruction.

Parameters
mach_instThe binary instruction to decode.
Return values
Apointer to the corresponding StaticInst object.

Definition at line 85 of file decoder.cc.

References gem5::X86ISA::addr, decodeInst(), DPRINTF, instMap, and gem5::ArmISA::si.

Referenced by decode().

◆ decode() [2/2]

StaticInstPtr gem5::RiscvISA::Decoder::decode ( RiscvISA::PCState nextPC)

◆ decodeInst()

StaticInstPtr gem5::RiscvISA::Decoder::decodeInst ( ExtMachInst  mach_inst)
protected

Referenced by decode().

◆ instReady()

bool gem5::RiscvISA::Decoder::instReady ( )
inline

Definition at line 82 of file decoder.hh.

References instDone.

◆ moreBytes()

void gem5::RiscvISA::Decoder::moreBytes ( const PCState pc,
Addr  fetchPC 
)

◆ needMoreBytes()

bool gem5::RiscvISA::Decoder::needMoreBytes ( )
inline

Definition at line 81 of file decoder.hh.

References more.

◆ process()

void gem5::RiscvISA::Decoder::process ( )
inline

Definition at line 72 of file decoder.hh.

◆ reset()

void gem5::RiscvISA::Decoder::reset ( )

Definition at line 41 of file decoder.cc.

References aligned, emi, instDone, mid, and more.

Referenced by Decoder().

◆ takeOverFrom()

void gem5::RiscvISA::Decoder::takeOverFrom ( Decoder old)
inline

Definition at line 83 of file decoder.hh.

Member Data Documentation

◆ aligned

bool gem5::RiscvISA::Decoder::aligned
private

Definition at line 52 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ emi

ExtMachInst gem5::RiscvISA::Decoder::emi
protected

Definition at line 58 of file decoder.hh.

Referenced by decode(), moreBytes(), and reset().

◆ instDone

bool gem5::RiscvISA::Decoder::instDone
protected

Definition at line 60 of file decoder.hh.

Referenced by decode(), instReady(), moreBytes(), and reset().

◆ instMap

decode_cache::InstMap<ExtMachInst> gem5::RiscvISA::Decoder::instMap
private

Definition at line 51 of file decoder.hh.

Referenced by decode().

◆ machInst

uint32_t gem5::RiscvISA::Decoder::machInst
protected

Definition at line 59 of file decoder.hh.

Referenced by decode(), and moreBytes().

◆ mid

bool gem5::RiscvISA::Decoder::mid
private

Definition at line 53 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ more

bool gem5::RiscvISA::Decoder::more
private

Definition at line 54 of file decoder.hh.

Referenced by moreBytes(), needMoreBytes(), and reset().


The documentation for this class was generated from the following files:

Generated on Tue Sep 21 2021 12:32:00 for gem5 by doxygen 1.8.17