gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Classes | Public Member Functions | Public Attributes | Protected Member Functions | Protected Attributes | List of all members
Minor::Decode Class Reference

#include <decode.hh>

Inheritance diagram for Minor::Decode:
Named

Classes

struct  DecodeThreadInfo
 Data members after this line are cycle-to-cycle state. More...
 

Public Member Functions

 Decode (const std::string &name, MinorCPU &cpu_, MinorCPUParams &params, Latch< ForwardInstData >::Output inp_, Latch< ForwardInstData >::Input out_, std::vector< InputBuffer< ForwardInstData >> &next_stage_input_buffer)
 
void evaluate ()
 Pass on input/buffer data to the output if you can. More...
 
void minorTrace () const
 
bool isDrained ()
 Is this stage drained? For Decoed, draining is initiated by Execute halting Fetch1 causing Fetch2 to naturally drain into Decode and on to Execute which is responsible for actually killing instructions. More...
 
- Public Member Functions inherited from Named
 Named (const std::string &name_)
 
const std::string & name () const
 

Public Attributes

std::vector< InputBuffer
< ForwardInstData > > 
inputBuffer
 

Protected Member Functions

const ForwardInstDatagetInput (ThreadID tid)
 Get a piece of data to work on, or 0 if there is no data. More...
 
void popInput (ThreadID tid)
 Pop an element off the input buffer, if there are any. More...
 
ThreadID getScheduledThread ()
 Use the current threading policy to determine the next thread to decode from. More...
 

Protected Attributes

MinorCPUcpu
 Pointer back to the containing CPU. More...
 
Latch< ForwardInstData >::Output inp
 Input port carrying macro instructions from Fetch2. More...
 
Latch< ForwardInstData >::Input out
 Output port carrying micro-op decomposed instructions to Execute. More...
 
std::vector< InputBuffer
< ForwardInstData > > & 
nextStageReserve
 Interface to reserve space in the next stage. More...
 
unsigned int outputWidth
 Width of output of this stage/input of next in instructions. More...
 
bool processMoreThanOneInput
 If true, more than one input word can be processed each cycle if there is room in the output to contain its processed data. More...
 
std::vector< DecodeThreadInfodecodeInfo
 
ThreadID threadPriority
 
- Protected Attributes inherited from Named
const std::string _name
 

Detailed Description

Definition at line 62 of file decode.hh.

Constructor & Destructor Documentation

Minor::Decode::Decode ( const std::string &  name,
MinorCPU cpu_,
MinorCPUParams &  params,
Latch< ForwardInstData >::Output  inp_,
Latch< ForwardInstData >::Input  out_,
std::vector< InputBuffer< ForwardInstData >> &  next_stage_input_buffer 
)

Definition at line 48 of file decode.cc.

References fatal, inputBuffer, and outputWidth.

Member Function Documentation

void Minor::Decode::evaluate ( )
const ForwardInstData * Minor::Decode::getInput ( ThreadID  tid)
protected

Get a piece of data to work on, or 0 if there is no data.

Definition at line 82 of file decode.cc.

References inputBuffer, and Minor::ForwardInstData::isBubble().

Referenced by evaluate(), and getScheduledThread().

ThreadID Minor::Decode::getScheduledThread ( )
inlineprotected

Use the current threading policy to determine the next thread to decode from.

Definition at line 297 of file decode.cc.

References decodeInfo, getInput(), InvalidThreadID, panic, MinorCPU::randomPriority(), MinorCPU::roundRobinPriority(), MinorCPU::threadPolicy, and threadPriority.

Referenced by evaluate().

bool Minor::Decode::isDrained ( )

Is this stage drained? For Decoed, draining is initiated by Execute halting Fetch1 causing Fetch2 to naturally drain into Decode and on to Execute which is responsible for actually killing instructions.

Definition at line 327 of file decode.cc.

References inp, and inputBuffer.

Referenced by Minor::Pipeline::isDrained().

void Minor::Decode::minorTrace ( ) const

Definition at line 338 of file decode.cc.

References data, decodeInfo, inputBuffer, MINORTRACE, and out.

Referenced by Minor::Pipeline::minorTrace().

void Minor::Decode::popInput ( ThreadID  tid)
protected

Pop an element off the input buffer, if there are any.

Definition at line 95 of file decode.cc.

References decodeInfo, and inputBuffer.

Referenced by evaluate().

Member Data Documentation

MinorCPU& Minor::Decode::cpu
protected

Pointer back to the containing CPU.

Definition at line 66 of file decode.hh.

std::vector<DecodeThreadInfo> Minor::Decode::decodeInfo
protected

Definition at line 127 of file decode.hh.

Referenced by evaluate(), getScheduledThread(), minorTrace(), and popInput().

Latch<ForwardInstData>::Output Minor::Decode::inp
protected

Input port carrying macro instructions from Fetch2.

Definition at line 69 of file decode.hh.

Referenced by evaluate(), and isDrained().

std::vector<InputBuffer<ForwardInstData> > Minor::Decode::inputBuffer

Definition at line 85 of file decode.hh.

Referenced by Decode(), evaluate(), getInput(), isDrained(), minorTrace(), and popInput().

std::vector<InputBuffer<ForwardInstData> >& Minor::Decode::nextStageReserve
protected

Interface to reserve space in the next stage.

Definition at line 74 of file decode.hh.

Referenced by evaluate().

Latch<ForwardInstData>::Input Minor::Decode::out
protected

Output port carrying micro-op decomposed instructions to Execute.

Definition at line 71 of file decode.hh.

Referenced by evaluate(), and minorTrace().

unsigned int Minor::Decode::outputWidth
protected

Width of output of this stage/input of next in instructions.

Definition at line 77 of file decode.hh.

Referenced by Decode(), and evaluate().

bool Minor::Decode::processMoreThanOneInput
protected

If true, more than one input word can be processed each cycle if there is room in the output to contain its processed data.

Definition at line 81 of file decode.hh.

Referenced by evaluate().

ThreadID Minor::Decode::threadPriority
protected

Definition at line 128 of file decode.hh.

Referenced by getScheduledThread().


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

Generated on Fri Jun 9 2017 13:04:33 for gem5 by doxygen 1.8.6