gem5  v22.1.0.0
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
gem5::minor::BranchData Class Reference

Forward data betwen Execute and Fetch1 carrying change-of-address/stream information. More...

#include <pipe_data.hh>

Public Types

enum  Reason {
  NoBranch , CorrectlyPredictedBranch , UnpredictedBranch , BranchPrediction ,
  BadlyPredictedBranchTarget , BadlyPredictedBranch , SuspendThread , Interrupt ,
  HaltFetch
}
 

Public Member Functions

 BranchData ()
 
 BranchData (Reason reason_, ThreadID thread_id, InstSeqNum new_stream_seq_num, InstSeqNum new_prediction_seq_num, const PCStateBase &_target, MinorDynInstPtr inst_)
 
 BranchData (const BranchData &other)
 
BranchDataoperator= (const BranchData &other)
 
bool isBubble () const
 
bool isStreamChange () const
 As static isStreamChange but on this branch data. More...
 
bool isBranch () const
 As static isBranch but on this branch data. More...
 
void reportData (std::ostream &os) const
 ReportIF interface. More...
 

Static Public Member Functions

static bool isStreamChange (const BranchData::Reason reason)
 Is a request with this reason actually a request to change the PC rather than a bubble or branch prediction information. More...
 
static bool isBranch (const BranchData::Reason reason)
 Is a request with this reason actually a 'real' branch, that is, a stream change that's not just an instruction to Fetch1 to halt or wake up. More...
 
static BranchData bubble ()
 BubbleIF interface. More...
 

Public Attributes

Reason reason = NoBranch
 Explanation for this branch. More...
 
ThreadID threadId = InvalidThreadID
 ThreadID associated with branch. More...
 
InstSeqNum newStreamSeqNum = 0
 Sequence number of new stream/prediction to be adopted. More...
 
InstSeqNum newPredictionSeqNum = 0
 
std::unique_ptr< PCStateBasetarget
 Starting PC of that stream. More...
 
MinorDynInstPtr inst = MinorDynInst::bubble()
 Instruction which caused this branch. More...
 

Detailed Description

Forward data betwen Execute and Fetch1 carrying change-of-address/stream information.

Definition at line 66 of file pipe_data.hh.

Member Enumeration Documentation

◆ Reason

Enumerator
NoBranch 
CorrectlyPredictedBranch 
UnpredictedBranch 
BranchPrediction 
BadlyPredictedBranchTarget 
BadlyPredictedBranch 
SuspendThread 
Interrupt 
HaltFetch 

Definition at line 69 of file pipe_data.hh.

Constructor & Destructor Documentation

◆ BranchData() [1/3]

gem5::minor::BranchData::BranchData ( )
inline

Definition at line 129 of file pipe_data.hh.

Referenced by bubble().

◆ BranchData() [2/3]

gem5::minor::BranchData::BranchData ( Reason  reason_,
ThreadID  thread_id,
InstSeqNum  new_stream_seq_num,
InstSeqNum  new_prediction_seq_num,
const PCStateBase _target,
MinorDynInstPtr  inst_ 
)
inline

Definition at line 131 of file pipe_data.hh.

References gem5::ArmISA::set, and target.

◆ BranchData() [3/3]

gem5::minor::BranchData::BranchData ( const BranchData other)
inline

Definition at line 142 of file pipe_data.hh.

References gem5::ArmISA::set, and target.

Member Function Documentation

◆ bubble()

static BranchData gem5::minor::BranchData::bubble ( )
inlinestatic

BubbleIF interface.

Definition at line 163 of file pipe_data.hh.

References BranchData().

Referenced by gem5::minor::Execute::evaluate().

◆ isBranch() [1/2]

bool gem5::minor::BranchData::isBranch ( ) const
inline

As static isBranch but on this branch data.

Definition at line 170 of file pipe_data.hh.

References isBranch(), and reason.

Referenced by isBranch().

◆ isBranch() [2/2]

bool gem5::minor::BranchData::isBranch ( const BranchData::Reason  reason)
static

Is a request with this reason actually a 'real' branch, that is, a stream change that's not just an instruction to Fetch1 to halt or wake up.

Definition at line 113 of file pipe_data.cc.

References BadlyPredictedBranch, BadlyPredictedBranchTarget, BranchPrediction, CorrectlyPredictedBranch, HaltFetch, Interrupt, NoBranch, reason, SuspendThread, and UnpredictedBranch.

◆ isBubble()

bool gem5::minor::BranchData::isBubble ( ) const
inline

◆ isStreamChange() [1/2]

bool gem5::minor::BranchData::isStreamChange ( ) const
inline

As static isStreamChange but on this branch data.

Definition at line 167 of file pipe_data.hh.

References isStreamChange(), and reason.

Referenced by isStreamChange(), and gem5::minor::Execute::updateBranchData().

◆ isStreamChange() [2/2]

bool gem5::minor::BranchData::isStreamChange ( const BranchData::Reason  reason)
static

Is a request with this reason actually a request to change the PC rather than a bubble or branch prediction information.

Definition at line 85 of file pipe_data.cc.

References BadlyPredictedBranch, BadlyPredictedBranchTarget, BranchPrediction, CorrectlyPredictedBranch, HaltFetch, Interrupt, NoBranch, reason, SuspendThread, and UnpredictedBranch.

Referenced by gem5::minor::Execute::commit(), gem5::minor::Fetch1::evaluate(), and gem5::minor::Fetch2::evaluate().

◆ operator=()

BranchData& gem5::minor::BranchData::operator= ( const BranchData other)
inline

Definition at line 151 of file pipe_data.hh.

References inst, newPredictionSeqNum, newStreamSeqNum, reason, gem5::ArmISA::set, target, and threadId.

◆ reportData()

void gem5::minor::BranchData::reportData ( std::ostream &  os) const

ReportIF interface.

Definition at line 141 of file pipe_data.cc.

References inst, isBubble(), newPredictionSeqNum, newStreamSeqNum, gem5::X86ISA::os, reason, and target.

Member Data Documentation

◆ inst

MinorDynInstPtr gem5::minor::BranchData::inst = MinorDynInst::bubble()

Instruction which caused this branch.

Definition at line 126 of file pipe_data.hh.

Referenced by gem5::minor::operator<<(), operator=(), reportData(), and gem5::minor::Fetch2::updateBranchPrediction().

◆ newPredictionSeqNum

InstSeqNum gem5::minor::BranchData::newPredictionSeqNum = 0

◆ newStreamSeqNum

InstSeqNum gem5::minor::BranchData::newStreamSeqNum = 0

Sequence number of new stream/prediction to be adopted.

Definition at line 119 of file pipe_data.hh.

Referenced by gem5::minor::Fetch1::evaluate(), gem5::minor::operator<<(), operator=(), reportData(), and gem5::minor::Fetch1::updateExpectedSeqNums().

◆ reason

Reason gem5::minor::BranchData::reason = NoBranch

◆ target

std::unique_ptr<PCStateBase> gem5::minor::BranchData::target

◆ threadId

ThreadID gem5::minor::BranchData::threadId = InvalidThreadID

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

Generated on Wed Dec 21 2022 10:24:16 for gem5 by doxygen 1.9.1