gem5
v20.1.0.0
|
#include <decode.hh>
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 ¶ms, 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 ForwardInstData * | getInput (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 | |
MinorCPU & | cpu |
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< DecodeThreadInfo > | decodeInfo |
ThreadID | threadPriority |
Protected Attributes inherited from Named | |
const std::string | _name |
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 46 of file decode.cc.
References fatal, inputBuffer, Named::name(), outputWidth, and sc_dt::to_string().
void Minor::Decode::evaluate | ( | ) |
Pass on input/buffer data to the output if you can.
Definition at line 122 of file decode.cc.
References ActivityRecorder::activateStage(), ActivityRecorder::activity(), MinorCPU::activityRecorder, StaticInst::advancePC(), cpu, decodeInfo, Minor::Pipeline::DecodeStageId, DPRINTF, Minor::Decode::DecodeThreadInfo::execSeqNum, StaticInst::fetchMicroop(), getInput(), getScheduledThread(), ArmISA::i, Minor::Decode::DecodeThreadInfo::inMacroop, inp, inputBuffer, Minor::Decode::DecodeThreadInfo::inputIndex, Minor::ForwardInstData::insts, InvalidThreadID, Minor::ForwardInstData::isBubble(), StaticInst::isLastMicroop(), StaticInst::isMacroop(), Minor::Decode::DecodeThreadInfo::microopPC, nextStageReserve, NoFault, BaseCPU::numThreads, out, outputWidth, popInput(), processMoreThanOneInput, Minor::ForwardInstData::resize(), Minor::ForwardInstData::threadId, and Minor::ForwardInstData::width().
Referenced by Minor::Pipeline::evaluate().
|
protected |
Get a piece of data to work on, or 0 if there is no data.
Definition at line 80 of file decode.cc.
References inputBuffer, and Minor::ForwardInstData::isBubble().
Referenced by evaluate(), and getScheduledThread().
|
inlineprotected |
Use the current threading policy to determine the next thread to decode from.
Definition at line 295 of file decode.cc.
References cpu, 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 325 of file decode.cc.
References inp, and inputBuffer.
Referenced by Minor::Pipeline::isDrained().
void Minor::Decode::minorTrace | ( | ) | const |
Definition at line 336 of file decode.cc.
References data, decodeInfo, inputBuffer, MINORTRACE, and out.
Referenced by Minor::Pipeline::minorTrace().
|
protected |
Pop an element off the input buffer, if there are any.
Definition at line 93 of file decode.cc.
References decodeInfo, and inputBuffer.
Referenced by evaluate().
|
protected |
Pointer back to the containing CPU.
Definition at line 64 of file decode.hh.
Referenced by evaluate(), and getScheduledThread().
|
protected |
Definition at line 125 of file decode.hh.
Referenced by evaluate(), getScheduledThread(), minorTrace(), and popInput().
|
protected |
Input port carrying macro instructions from Fetch2.
Definition at line 67 of file decode.hh.
Referenced by evaluate(), and isDrained().
std::vector<InputBuffer<ForwardInstData> > Minor::Decode::inputBuffer |
Definition at line 83 of file decode.hh.
Referenced by Decode(), evaluate(), getInput(), isDrained(), minorTrace(), and popInput().
|
protected |
Interface to reserve space in the next stage.
Definition at line 72 of file decode.hh.
Referenced by evaluate().
|
protected |
Output port carrying micro-op decomposed instructions to Execute.
Definition at line 69 of file decode.hh.
Referenced by evaluate(), and minorTrace().
|
protected |
Width of output of this stage/input of next in instructions.
Definition at line 75 of file decode.hh.
Referenced by Decode(), and evaluate().
|
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 79 of file decode.hh.
Referenced by evaluate().
|
protected |
Definition at line 126 of file decode.hh.
Referenced by getScheduledThread().