gem5  v20.0.0.2
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | Protected Attributes | Private Attributes | List of all members
RiscvISA::Decoder Class Reference

#include <decoder.hh>

Public Member Functions

 Decoder (ISA *isa=nullptr)
 
void process ()
 
void reset ()
 
bool compressed (ExtMachInst inst)
 
void moreBytes (const PCState &pc, Addr fetchPC, MachInst inst)
 
bool needMoreBytes ()
 
bool instReady ()
 
void takeOverFrom (Decoder *old)
 
StaticInstPtr decodeInst (ExtMachInst mach_inst)
 
StaticInstPtr decode (ExtMachInst mach_inst, Addr addr)
 Decode a machine instruction. More...
 
StaticInstPtr decode (RiscvISA::PCState &nextPC)
 

Protected Attributes

ExtMachInst emi
 
bool instDone
 

Private Attributes

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

Detailed Description

Definition at line 45 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

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

Definition at line 59 of file decoder.hh.

References reset().

Member Function Documentation

◆ compressed()

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

Definition at line 64 of file decoder.hh.

References moreBytes(), and RiscvISA::pc.

Referenced by decode(), and moreBytes().

◆ decode() [1/2]

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

Decode a machine instruction.

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

Definition at line 80 of file decoder.cc.

References decodeInst(), DPRINTF, instMap, and PowerISA::si.

Referenced by decode(), and takeOverFrom().

◆ decode() [2/2]

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

◆ decodeInst()

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

Referenced by decode(), and takeOverFrom().

◆ instReady()

bool RiscvISA::Decoder::instReady ( )
inline

Definition at line 71 of file decoder.hh.

References instDone.

◆ moreBytes()

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

◆ needMoreBytes()

bool RiscvISA::Decoder::needMoreBytes ( )
inline

Definition at line 70 of file decoder.hh.

References more.

◆ process()

void RiscvISA::Decoder::process ( )
inline

Definition at line 61 of file decoder.hh.

References reset().

◆ reset()

void RiscvISA::Decoder::reset ( )

Definition at line 40 of file decoder.cc.

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

Referenced by Decoder(), and process().

◆ takeOverFrom()

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

Definition at line 72 of file decoder.hh.

References addr, decode(), and decodeInst().

Member Data Documentation

◆ aligned

bool RiscvISA::Decoder::aligned
private

Definition at line 49 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ emi

ExtMachInst RiscvISA::Decoder::emi
protected

Definition at line 55 of file decoder.hh.

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

◆ instDone

bool RiscvISA::Decoder::instDone
protected

Definition at line 56 of file decoder.hh.

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

◆ instMap

DecodeCache::InstMap<ExtMachInst> RiscvISA::Decoder::instMap
private

Definition at line 48 of file decoder.hh.

Referenced by decode().

◆ mid

bool RiscvISA::Decoder::mid
private

Definition at line 50 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ more

bool RiscvISA::Decoder::more
private

Definition at line 51 of file decoder.hh.

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


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

Generated on Mon Jun 8 2020 15:45:59 for gem5 by doxygen 1.8.13