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

#include <decoder.hh>

Inheritance diagram for RiscvISA::Decoder:
InstDecoder

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)
 
- Public Member Functions inherited from InstDecoder
virtual StaticInstPtr fetchRomMicroop (MicroPC micropc, StaticInstPtr curMacroop)
 

Protected Attributes

ExtMachInst emi
 
bool instDone
 

Private Attributes

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

Detailed Description

Definition at line 46 of file decoder.hh.

Constructor & Destructor Documentation

◆ Decoder()

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

Definition at line 60 of file decoder.hh.

References reset().

Member Function Documentation

◆ compressed()

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

Definition at line 65 of file decoder.hh.

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 addr, decodeInst(), DPRINTF, instMap, and ArmISA::si.

Referenced by decode().

◆ decode() [2/2]

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

◆ decodeInst()

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

Referenced by decode().

◆ instReady()

bool RiscvISA::Decoder::instReady ( )
inline

Definition at line 72 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 71 of file decoder.hh.

References more.

◆ process()

void RiscvISA::Decoder::process ( )
inline

Definition at line 62 of file decoder.hh.

◆ reset()

void RiscvISA::Decoder::reset ( )

Definition at line 40 of file decoder.cc.

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

Referenced by Decoder().

◆ takeOverFrom()

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

Definition at line 73 of file decoder.hh.

Member Data Documentation

◆ aligned

bool RiscvISA::Decoder::aligned
private

Definition at line 50 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ emi

ExtMachInst RiscvISA::Decoder::emi
protected

Definition at line 56 of file decoder.hh.

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

◆ instDone

bool RiscvISA::Decoder::instDone
protected

Definition at line 57 of file decoder.hh.

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

◆ instMap

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

Definition at line 49 of file decoder.hh.

Referenced by decode().

◆ mid

bool RiscvISA::Decoder::mid
private

Definition at line 51 of file decoder.hh.

Referenced by moreBytes(), and reset().

◆ more

bool RiscvISA::Decoder::more
private

Definition at line 52 of file decoder.hh.

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


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

Generated on Wed Sep 30 2020 14:03:08 for gem5 by doxygen 1.8.17