gem5 v24.0.0.0
Loading...
Searching...
No Matches
gem5::o3::Fetch Class Reference

Fetch class handles both single threaded and SMT fetch. More...

#include <fetch.hh>

Classes

struct  FetchStatGroup
 
class  FetchTranslation
 
class  FinishTranslationEvent
 
class  IcachePort
 IcachePort class for instruction fetch. More...
 
struct  Stalls
 Source of possible stalls. More...
 

Public Types

enum  FetchStatus { Active , Inactive }
 Overall fetch status. More...
 
enum  ThreadStatus {
  Running , Idle , Squashing , Blocked ,
  Fetching , TrapPending , QuiescePending , ItlbWait ,
  IcacheWaitResponse , IcacheWaitRetry , IcacheAccessComplete , NoGoodAddr
}
 Individual thread status. More...
 

Public Member Functions

 Fetch (CPU *_cpu, const BaseO3CPUParams &params)
 Fetch constructor.
 
std::string name () const
 Returns the name of fetch.
 
void regProbePoints ()
 Registers probes.
 
void setTimeBuffer (TimeBuffer< TimeStruct > *time_buffer)
 Sets the main backwards communication time buffer pointer.
 
void setActiveThreads (std::list< ThreadID > *at_ptr)
 Sets pointer to list of active threads.
 
void setFetchQueue (TimeBuffer< FetchStruct > *fq_ptr)
 Sets pointer to time buffer used to communicate to the next stage.
 
void startupStage ()
 Initialize stage.
 
void clearStates (ThreadID tid)
 Clear all thread-specific states.
 
void recvReqRetry ()
 Handles retrying the fetch access.
 
void processCacheCompletion (PacketPtr pkt)
 Processes cache completion event.
 
void drainResume ()
 Resume after a drain.
 
void drainSanityCheck () const
 Perform sanity checks after a drain.
 
bool isDrained () const
 Has the stage drained?
 
void takeOverFrom ()
 Takes over from another CPU's thread.
 
void drainStall (ThreadID tid)
 Stall the fetch stage after reaching a safe drain point.
 
void wakeFromQuiesce ()
 Tells fetch to wake up from a quiesce instruction.
 
void deactivateThread (ThreadID tid)
 For priority-based fetch policies, need to keep update priorityList.
 
void squash (const PCStateBase &new_pc, const InstSeqNum seq_num, DynInstPtr squashInst, ThreadID tid)
 Squashes a specific thread and resets the PC.
 
void tick ()
 Ticks the fetch stage, processing all inputs signals and fetching as many instructions as possible.
 
bool checkSignalsAndUpdate (ThreadID tid)
 Checks all input signals and updates the status as necessary.
 
void fetch (bool &status_change)
 Does the actual fetching of instructions and passing them on to the next stage.
 
Addr fetchBufferAlignPC (Addr addr)
 Align a PC to the start of a fetch buffer block.
 
RequestPortgetInstPort ()
 

Public Attributes

InstDecoderdecoder [MaxThreads]
 The decoder.
 

Protected Attributes

gem5::o3::Fetch::FetchStatGroup fetchStats
 

Private Member Functions

void resetStage ()
 Reset this pipeline stage.
 
void switchToActive ()
 Changes the status of this stage to active, and indicates this to the CPU.
 
void switchToInactive ()
 Changes the status of this stage to inactive, and indicates this to the CPU.
 
bool lookupAndUpdateNextPC (const DynInstPtr &inst, PCStateBase &pc)
 Looks up in the branch predictor to see if the next PC should be either next PC+=MachInst or a branch target.
 
bool fetchCacheLine (Addr vaddr, ThreadID tid, Addr pc)
 Fetches the cache line that contains the fetch PC.
 
void finishTranslation (const Fault &fault, const RequestPtr &mem_req)
 
bool checkInterrupt (Addr pc)
 Check if an interrupt is pending and that we need to handle.
 
void doSquash (const PCStateBase &new_pc, const DynInstPtr squashInst, ThreadID tid)
 Squashes a specific thread and resets the PC.
 
void squashFromDecode (const PCStateBase &new_pc, const DynInstPtr squashInst, const InstSeqNum seq_num, ThreadID tid)
 Squashes a specific thread and resets the PC.
 
bool checkStall (ThreadID tid) const
 Checks if a thread is stalled.
 
FetchStatus updateFetchStatus ()
 Updates overall fetch stage status; to be called at the end of each cycle.
 
DynInstPtr buildInst (ThreadID tid, StaticInstPtr staticInst, StaticInstPtr curMacroop, const PCStateBase &this_pc, const PCStateBase &next_pc, bool trace)
 
ThreadID getFetchingThread ()
 Returns the appropriate thread to fetch, given the fetch policy.
 
ThreadID roundRobin ()
 Returns the appropriate thread to fetch using a round robin policy.
 
ThreadID iqCount ()
 Returns the appropriate thread to fetch using the IQ count policy.
 
ThreadID lsqCount ()
 Returns the appropriate thread to fetch using the LSQ count policy.
 
ThreadID branchCount ()
 Returns the appropriate thread to fetch using the branch count policy.
 
void pipelineIcacheAccesses (ThreadID tid)
 Pipeline the next I-cache access to the current one.
 
void profileStall (ThreadID tid)
 Profile the reasons of fetch stall.
 

Private Attributes

FetchStatus _status
 Fetch status.
 
ThreadStatus fetchStatus [MaxThreads]
 Per-thread status.
 
SMTFetchPolicy fetchPolicy
 Fetch policy.
 
std::list< ThreadIDpriorityList
 List that has the threads organized by priority.
 
ProbePointArg< DynInstPtr > * ppFetch
 Probe points.
 
ProbePointArg< RequestPtr > * ppFetchRequestSent
 To probe when a fetch request is successfully sent.
 
CPUcpu
 Pointer to the O3CPU.
 
TimeBuffer< TimeStruct > * timeBuffer
 Time buffer interface.
 
TimeBuffer< TimeStruct >::wire fromDecode
 Wire to get decode's information from backwards time buffer.
 
TimeBuffer< TimeStruct >::wire fromRename
 Wire to get rename's information from backwards time buffer.
 
TimeBuffer< TimeStruct >::wire fromIEW
 Wire to get iew's information from backwards time buffer.
 
TimeBuffer< TimeStruct >::wire fromCommit
 Wire to get commit's information from backwards time buffer.
 
TimeBuffer< FetchStruct >::wire toDecode
 Wire used to write any information heading to decode.
 
branch_prediction::BPredUnitbranchPred
 BPredUnit.
 
std::unique_ptr< PCStateBasepc [MaxThreads]
 
Addr fetchOffset [MaxThreads]
 
StaticInstPtr macroop [MaxThreads]
 
bool delayedCommit [MaxThreads]
 Can the fetch stage redirect from an interrupt on this instruction?
 
RequestPtr memReq [MaxThreads]
 Memory request used to access cache.
 
bool wroteToTimeBuffer
 Variable that tracks if fetch has written to the time buffer this cycle.
 
int numInst
 Tracks how many instructions has been fetched this cycle.
 
Stalls stalls [MaxThreads]
 Tracks which stages are telling fetch to stall.
 
Cycles decodeToFetchDelay
 Decode to fetch delay.
 
Cycles renameToFetchDelay
 Rename to fetch delay.
 
Cycles iewToFetchDelay
 IEW to fetch delay.
 
Cycles commitToFetchDelay
 Commit to fetch delay.
 
unsigned fetchWidth
 The width of fetch in instructions.
 
unsigned decodeWidth
 The width of decode in instructions.
 
bool cacheBlocked
 Is the cache blocked? If so no threads can access it.
 
PacketPtr retryPkt
 The packet that is waiting to be retried.
 
ThreadID retryTid
 The thread that is waiting on the cache to tell fetch to retry.
 
Addr cacheBlkSize
 Cache block size.
 
unsigned fetchBufferSize
 The size of the fetch buffer in bytes.
 
Addr fetchBufferMask
 Mask to align a fetch address to a fetch buffer boundary.
 
uint8_t * fetchBuffer [MaxThreads]
 The fetch data that is being fetched and buffered.
 
Addr fetchBufferPC [MaxThreads]
 The PC of the first instruction loaded into the fetch buffer.
 
unsigned fetchQueueSize
 The size of the fetch queue in micro-ops.
 
std::deque< DynInstPtrfetchQueue [MaxThreads]
 Queue of fetched instructions.
 
bool fetchBufferValid [MaxThreads]
 Whether or not the fetch buffer data is valid.
 
int instSize
 Size of instructions.
 
Counter lastIcacheStall [MaxThreads]
 Icache stall statistics.
 
std::list< ThreadID > * activeThreads
 List of Active Threads.
 
ThreadID numThreads
 Number of threads.
 
ThreadID numFetchingThreads
 Number of threads that are actively fetching.
 
ThreadID threadFetched
 Thread ID being fetched.
 
bool interruptPending
 Checks if there is an interrupt pending.
 
IcachePort icachePort
 Instruction port.
 
bool issuePipelinedIfetch [MaxThreads]
 Set to true if a pipelined I-cache request should be issued.
 
FinishTranslationEvent finishTranslationEvent
 Event used to delay fault generation of translation faults.
 

Detailed Description

Fetch class handles both single threaded and SMT fetch.

Its width is specified by the parameters; each cycle it tries to fetch that many instructions. It supports using a branch predictor to predict direction and targets. It supports the idling functionality of the CPU by indicating to the CPU when it is active and inactive.

Definition at line 78 of file fetch.hh.

Member Enumeration Documentation

◆ FetchStatus

Overall fetch status.

Used to determine if the CPU can deschedule itsef due to a lack of activity.

Enumerator
Active 
Inactive 

Definition at line 162 of file fetch.hh.

◆ ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
Squashing 
Blocked 
Fetching 
TrapPending 
QuiescePending 
ItlbWait 
IcacheWaitResponse 
IcacheWaitRetry 
IcacheAccessComplete 
NoGoodAddr 

Definition at line 169 of file fetch.hh.

Constructor & Destructor Documentation

◆ Fetch()

Member Function Documentation

◆ branchCount()

ThreadID gem5::o3::Fetch::branchCount ( )
private

Returns the appropriate thread to fetch using the branch count policy.

Definition at line 1499 of file fetch.cc.

References gem5::InvalidThreadID, and panic.

Referenced by getFetchingThread().

◆ buildInst()

◆ checkInterrupt()

bool gem5::o3::Fetch::checkInterrupt ( Addr pc)
inlineprivate

Check if an interrupt is pending and that we need to handle.

Definition at line 305 of file fetch.hh.

References interruptPending.

Referenced by fetch(), and fetchCacheLine().

◆ checkSignalsAndUpdate()

bool gem5::o3::Fetch::checkSignalsAndUpdate ( ThreadID tid)

Checks all input signals and updates the status as necessary.

Returns
: Returns if the status has changed due to input signals.

Definition at line 918 of file fetch.cc.

References Blocked, branchPred, checkStall(), gem5::o3::Fetch::Stalls::decode, DPRINTF, fetchStatus, fromCommit, fromDecode, IcacheWaitResponse, IcacheWaitRetry, ItlbWait, QuiescePending, Running, gem5::branch_prediction::BPredUnit::squash(), squash(), squashFromDecode(), Squashing, stalls, and gem5::branch_prediction::BPredUnit::update().

Referenced by tick().

◆ checkStall()

bool gem5::o3::Fetch::checkStall ( ThreadID tid) const
private

Checks if a thread is stalled.

Definition at line 751 of file fetch.cc.

References cpu, DPRINTF, gem5::o3::CPU::isDraining(), and stalls.

Referenced by checkSignalsAndUpdate(), and processCacheCompletion().

◆ clearStates()

void gem5::o3::Fetch::clearStates ( ThreadID tid)

◆ deactivateThread()

void gem5::o3::Fetch::deactivateThread ( ThreadID tid)

For priority-based fetch policies, need to keep update priorityList.

Definition at line 476 of file fetch.cc.

References priorityList.

Referenced by gem5::o3::CPU::deactivateThread().

◆ doSquash()

void gem5::o3::Fetch::doSquash ( const PCStateBase & new_pc,
const DynInstPtr squashInst,
ThreadID tid )
private

◆ drainResume()

void gem5::o3::Fetch::drainResume ( )

Resume after a drain.

Definition at line 370 of file fetch.cc.

References gem5::o3::Fetch::Stalls::decode, gem5::o3::Fetch::Stalls::drain, gem5::ArmISA::i, numThreads, and stalls.

Referenced by gem5::o3::CPU::drainResume().

◆ drainSanityCheck()

void gem5::o3::Fetch::drainSanityCheck ( ) const

◆ drainStall()

void gem5::o3::Fetch::drainStall ( ThreadID tid)

Stall the fetch stage after reaching a safe drain point.

The CPU uses this method to stop fetching instructions from a thread that has been drained. The drain stall is different from all other stalls in that it is signaled instantly from the commit stage (without the normal communication delay) when it has reached a safe point to drain from.

Definition at line 434 of file fetch.cc.

References cpu, DPRINTF, gem5::o3::Fetch::Stalls::drain, gem5::o3::CPU::isDraining(), and stalls.

Referenced by gem5::o3::CPU::commitDrained().

◆ fetch()

void gem5::o3::Fetch::fetch ( bool & status_change)

Does the actual fetching of instructions and passing them on to the next stage.

Parameters
status_changefetch() sets this variable if there was a status change (ie switching to IcacheMissStall).

Definition at line 1073 of file fetch.cc.

References gem5::PCStateBase::branching(), buildInst(), checkInterrupt(), gem5::PCStateBase::clone(), cpu, gem5::curTick(), gem5::o3::Fetch::FetchStatGroup::cycles, decoder, delayedCommit, DPRINTF, fetchBuffer, fetchBufferAlignPC(), fetchBufferPC, fetchBufferSize, fetchBufferValid, fetchCacheLine(), gem5::StaticInst::fetchMicroop(), fetchOffset, fetchQueue, fetchQueueSize, gem5::BaseCPU::fetchStats, fetchStats, fetchStatus, fetchWidth, getFetchingThread(), IcacheAccessComplete, IcacheWaitResponse, IcacheWaitRetry, Idle, gem5::o3::Fetch::FetchStatGroup::idleCycles, gem5::PCStateBase::instAddr(), instSize, gem5::InvalidThreadID, gem5::StaticInst::isLastMicroop(), gem5::StaticInst::isMacroop(), gem5::isRomMicroPC(), issuePipelinedIfetch, ItlbWait, lookupAndUpdateNextPC(), macroop, gem5::PCStateBase::microPC(), gem5::o3::Fetch::FetchStatGroup::miscStallCycles, gem5::InstDecoder::moreBytes(), numFetchingThreads, numInst, numThreads, pc, gem5::InstDecoder::pcMask(), ppFetch, profileStall(), QuiescePending, Running, gem5::ArmISA::set, gem5::BaseCPU::switchedOut(), threadFetched, gem5::o3::Fetch::FetchStatGroup::tlbCycles, and wroteToTimeBuffer.

Referenced by gem5::o3::Fetch::FetchStatGroup::FetchStatGroup(), gem5::o3::Fetch::IcachePort::recvReqRetry(), gem5::o3::Fetch::IcachePort::recvTimingResp(), and tick().

◆ fetchBufferAlignPC()

Addr gem5::o3::Fetch::fetchBufferAlignPC ( Addr addr)
inline

Align a PC to the start of a fetch buffer block.

Definition at line 352 of file fetch.hh.

References gem5::X86ISA::addr, and fetchBufferMask.

Referenced by fetch(), fetchCacheLine(), and pipelineIcacheAccesses().

◆ fetchCacheLine()

bool gem5::o3::Fetch::fetchCacheLine ( Addr vaddr,
ThreadID tid,
Addr pc )
private

Fetches the cache line that contains the fetch PC.

Returns any fault that happened. Puts the data into the class variable fetchBuffer, which may not hold the entire fetched cache line.

Parameters
vaddrThe memory address that is being fetched from.
ret_faultThe fault reference that will be set to the result of the icache access.
tidThread id.
pcThe actual PC of the current instruction.
Returns
Any fault that occured.

Definition at line 530 of file fetch.cc.

References cacheBlocked, checkInterrupt(), cpu, delayedCommit, DPRINTF, gem5::BaseMMU::Execute, fetchBufferAlignPC(), fetchBufferSize, fetchStatus, gem5::Request::INST_FETCH, gem5::BaseCPU::instRequestorId(), ItlbWait, memReq, gem5::o3::CPU::mmu, gem5::NoFault, pc, gem5::BaseCPU::switchedOut(), gem5::BaseCPU::taskId(), gem5::o3::CPU::thread, gem5::BaseMMU::translateTiming(), and gem5::MipsISA::vaddr.

Referenced by fetch(), and pipelineIcacheAccesses().

◆ finishTranslation()

◆ getFetchingThread()

ThreadID gem5::o3::Fetch::getFetchingThread ( )
private

Returns the appropriate thread to fetch, given the fetch policy.

Definition at line 1364 of file fetch.cc.

References activeThreads, branchCount(), fetchPolicy, fetchStatus, IcacheAccessComplete, Idle, gem5::InvalidThreadID, iqCount(), lsqCount(), numThreads, roundRobin(), and Running.

Referenced by fetch().

◆ getInstPort()

RequestPort & gem5::o3::Fetch::getInstPort ( )
inline

Definition at line 360 of file fetch.hh.

References icachePort.

Referenced by gem5::o3::CPU::getInstPort().

◆ iqCount()

ThreadID gem5::o3::Fetch::iqCount ( )
private

Returns the appropriate thread to fetch using the IQ count policy.

Definition at line 1428 of file fetch.cc.

References activeThreads, fetchStatus, fromIEW, IcacheAccessComplete, Idle, gem5::InvalidThreadID, iqCount(), and Running.

Referenced by getFetchingThread(), and iqCount().

◆ isDrained()

bool gem5::o3::Fetch::isDrained ( ) const

◆ lookupAndUpdateNextPC()

bool gem5::o3::Fetch::lookupAndUpdateNextPC ( const DynInstPtr & inst,
PCStateBase & pc )
private

Looks up in the branch predictor to see if the next PC should be either next PC+=MachInst or a branch target.

Parameters
next_PCNext PC variable passed in by reference. It is expected to be set to the current PC; it will be updated with what the next PC will be.
next_NPCUsed for ISAs which use delay slots.
Returns
Whether or not a branch was predicted as taken.

Definition at line 486 of file fetch.cc.

References branchPred, cpu, DPRINTF, gem5::BaseCPU::fetchStats, fetchStats, gem5::branch_prediction::BPredUnit::predict(), and gem5::o3::Fetch::FetchStatGroup::predictedBranches.

Referenced by fetch().

◆ lsqCount()

ThreadID gem5::o3::Fetch::lsqCount ( )
private

Returns the appropriate thread to fetch using the LSQ count policy.

Definition at line 1464 of file fetch.cc.

References activeThreads, fetchStatus, fromIEW, IcacheAccessComplete, Idle, gem5::InvalidThreadID, and Running.

Referenced by getFetchingThread().

◆ name()

std::string gem5::o3::Fetch::name ( ) const

Returns the name of fetch.

Definition at line 148 of file fetch.cc.

References cpu, and gem5::Named::name().

Referenced by finishTranslation().

◆ pipelineIcacheAccesses()

void gem5::o3::Fetch::pipelineIcacheAccesses ( ThreadID tid)
private

Pipeline the next I-cache access to the current one.

Definition at line 1506 of file fetch.cc.

References decoder, DPRINTF, fetchBufferAlignPC(), fetchBufferPC, fetchBufferValid, fetchCacheLine(), fetchOffset, gem5::PCStateBase::instAddr(), gem5::isRomMicroPC(), issuePipelinedIfetch, gem5::PCStateBase::microPC(), and pc.

Referenced by tick().

◆ processCacheCompletion()

◆ profileStall()

◆ recvReqRetry()

◆ regProbePoints()

void gem5::o3::Fetch::regProbePoints ( )

Registers probes.

Definition at line 151 of file fetch.cc.

References cpu, gem5::SimObject::getProbeManager(), ppFetch, and ppFetchRequestSent.

Referenced by gem5::o3::CPU::regProbePoints().

◆ resetStage()

◆ roundRobin()

ThreadID gem5::o3::Fetch::roundRobin ( )
private

Returns the appropriate thread to fetch using a round robin policy.

Definition at line 1399 of file fetch.cc.

References fetchStatus, IcacheAccessComplete, Idle, gem5::InvalidThreadID, numThreads, priorityList, and Running.

Referenced by getFetchingThread().

◆ setActiveThreads()

void gem5::o3::Fetch::setActiveThreads ( std::list< ThreadID > * at_ptr)

Sets pointer to list of active threads.

Definition at line 250 of file fetch.cc.

References activeThreads.

◆ setFetchQueue()

void gem5::o3::Fetch::setFetchQueue ( TimeBuffer< FetchStruct > * fq_ptr)

Sets pointer to time buffer used to communicate to the next stage.

Definition at line 256 of file fetch.cc.

References gem5::TimeBuffer< T >::getWire(), and toDecode.

◆ setTimeBuffer()

void gem5::o3::Fetch::setTimeBuffer ( TimeBuffer< TimeStruct > * time_buffer)

Sets the main backwards communication time buffer pointer.

Definition at line 238 of file fetch.cc.

References commitToFetchDelay, decodeToFetchDelay, fromCommit, fromDecode, fromIEW, fromRename, gem5::TimeBuffer< T >::getWire(), iewToFetchDelay, renameToFetchDelay, and timeBuffer.

◆ squash()

void gem5::o3::Fetch::squash ( const PCStateBase & new_pc,
const InstSeqNum seq_num,
DynInstPtr squashInst,
ThreadID tid )

Squashes a specific thread and resets the PC.

Also tells the CPU to remove any instructions that are not in the ROB. The source of this squash should be the commit stage.

Definition at line 804 of file fetch.cc.

References cpu, doSquash(), DPRINTF, and gem5::o3::CPU::removeInstsNotInROB().

Referenced by checkSignalsAndUpdate().

◆ squashFromDecode()

void gem5::o3::Fetch::squashFromDecode ( const PCStateBase & new_pc,
const DynInstPtr squashInst,
const InstSeqNum seq_num,
ThreadID tid )
private

Squashes a specific thread and resets the PC.

Also tells the CPU to remove any instructions between fetch and decode that should be sqaushed.

Definition at line 738 of file fetch.cc.

References cpu, doSquash(), DPRINTF, and gem5::o3::CPU::removeInstsUntil().

Referenced by checkSignalsAndUpdate().

◆ startupStage()

void gem5::o3::Fetch::startupStage ( )

Initialize stage.

Definition at line 263 of file fetch.cc.

References priorityList, resetStage(), and switchToActive().

Referenced by gem5::o3::CPU::startup().

◆ switchToActive()

void gem5::o3::Fetch::switchToActive ( )
private

Changes the status of this stage to active, and indicates this to the CPU.

Definition at line 452 of file fetch.cc.

References _status, gem5::o3::CPU::activateStage(), Active, cpu, DPRINTF, gem5::o3::CPU::FetchIdx, and Inactive.

Referenced by processCacheCompletion(), and startupStage().

◆ switchToInactive()

void gem5::o3::Fetch::switchToInactive ( )
private

Changes the status of this stage to inactive, and indicates this to the CPU.

Definition at line 464 of file fetch.cc.

References _status, Active, cpu, gem5::o3::CPU::deactivateStage(), DPRINTF, gem5::o3::CPU::FetchIdx, and Inactive.

◆ takeOverFrom()

void gem5::o3::Fetch::takeOverFrom ( )

Takes over from another CPU's thread.

Definition at line 426 of file fetch.cc.

References cpu, gem5::o3::CPU::getInstPort(), gem5::Port::isConnected(), and resetStage().

Referenced by gem5::o3::CPU::takeOverFrom().

◆ tick()

◆ updateFetchStatus()

Fetch::FetchStatus gem5::o3::Fetch::updateFetchStatus ( )
private

Updates overall fetch stage status; to be called at the end of each cycle.

Definition at line 765 of file fetch.cc.

References _status, gem5::o3::CPU::activateStage(), Active, activeThreads, cpu, gem5::o3::CPU::deactivateStage(), DPRINTF, gem5::o3::CPU::FetchIdx, fetchStatus, IcacheAccessComplete, Inactive, Running, and Squashing.

Referenced by finishTranslation(), and tick().

◆ wakeFromQuiesce()

void gem5::o3::Fetch::wakeFromQuiesce ( )

Tells fetch to wake up from a quiesce instruction.

Definition at line 443 of file fetch.cc.

References DPRINTF, fetchStatus, and Running.

Referenced by gem5::o3::CPU::activateContext().

Member Data Documentation

◆ _status

FetchStatus gem5::o3::Fetch::_status
private

◆ activeThreads

std::list<ThreadID>* gem5::o3::Fetch::activeThreads
private

List of Active Threads.

Definition at line 505 of file fetch.hh.

Referenced by getFetchingThread(), iqCount(), lsqCount(), profileStall(), setActiveThreads(), tick(), and updateFetchStatus().

◆ branchPred

branch_prediction::BPredUnit* gem5::o3::Fetch::branchPred
private

BPredUnit.

Definition at line 413 of file fetch.hh.

Referenced by checkSignalsAndUpdate(), drainSanityCheck(), Fetch(), and lookupAndUpdateNextPC().

◆ cacheBlkSize

Addr gem5::o3::Fetch::cacheBlkSize
private

Cache block size.

Definition at line 473 of file fetch.hh.

Referenced by Fetch().

◆ cacheBlocked

bool gem5::o3::Fetch::cacheBlocked
private

Is the cache blocked? If so no threads can access it.

Definition at line 464 of file fetch.hh.

Referenced by doSquash(), drainSanityCheck(), fetchCacheLine(), finishTranslation(), recvReqRetry(), and resetStage().

◆ commitToFetchDelay

Cycles gem5::o3::Fetch::commitToFetchDelay
private

Commit to fetch delay.

Definition at line 455 of file fetch.hh.

Referenced by setTimeBuffer().

◆ cpu

◆ decoder

InstDecoder* gem5::o3::Fetch::decoder[MaxThreads]

The decoder.

Definition at line 358 of file fetch.hh.

Referenced by doSquash(), Fetch(), fetch(), gem5::o3::ThreadContext::getDecoderPtr(), and pipelineIcacheAccesses().

◆ decodeToFetchDelay

Cycles gem5::o3::Fetch::decodeToFetchDelay
private

Decode to fetch delay.

Definition at line 446 of file fetch.hh.

Referenced by setTimeBuffer().

◆ decodeWidth

unsigned gem5::o3::Fetch::decodeWidth
private

The width of decode in instructions.

Definition at line 461 of file fetch.hh.

Referenced by tick().

◆ delayedCommit

bool gem5::o3::Fetch::delayedCommit[MaxThreads]
private

Can the fetch stage redirect from an interrupt on this instruction?

Definition at line 422 of file fetch.hh.

Referenced by buildInst(), clearStates(), doSquash(), Fetch(), fetch(), fetchCacheLine(), and resetStage().

◆ fetchBuffer

uint8_t* gem5::o3::Fetch::fetchBuffer[MaxThreads]
private

The fetch data that is being fetched and buffered.

Definition at line 484 of file fetch.hh.

Referenced by Fetch(), fetch(), and processCacheCompletion().

◆ fetchBufferMask

Addr gem5::o3::Fetch::fetchBufferMask
private

Mask to align a fetch address to a fetch buffer boundary.

Definition at line 481 of file fetch.hh.

Referenced by fetchBufferAlignPC().

◆ fetchBufferPC

Addr gem5::o3::Fetch::fetchBufferPC[MaxThreads]
private

The PC of the first instruction loaded into the fetch buffer.

Definition at line 487 of file fetch.hh.

Referenced by clearStates(), Fetch(), fetch(), finishTranslation(), pipelineIcacheAccesses(), and resetStage().

◆ fetchBufferSize

unsigned gem5::o3::Fetch::fetchBufferSize
private

The size of the fetch buffer in bytes.

The fetch buffer itself may be smaller than a cache line.

Definition at line 478 of file fetch.hh.

Referenced by Fetch(), fetch(), fetchCacheLine(), finishTranslation(), and processCacheCompletion().

◆ fetchBufferValid

bool gem5::o3::Fetch::fetchBufferValid[MaxThreads]
private

Whether or not the fetch buffer data is valid.

Definition at line 496 of file fetch.hh.

Referenced by clearStates(), Fetch(), fetch(), finishTranslation(), pipelineIcacheAccesses(), processCacheCompletion(), and resetStage().

◆ fetchOffset

Addr gem5::o3::Fetch::fetchOffset[MaxThreads]
private

Definition at line 417 of file fetch.hh.

Referenced by clearStates(), doSquash(), Fetch(), fetch(), pipelineIcacheAccesses(), and resetStage().

◆ fetchPolicy

SMTFetchPolicy gem5::o3::Fetch::fetchPolicy
private

Fetch policy.

Definition at line 193 of file fetch.hh.

Referenced by getFetchingThread().

◆ fetchQueue

std::deque<DynInstPtr> gem5::o3::Fetch::fetchQueue[MaxThreads]
private

Queue of fetched instructions.

Per-thread to prevent HoL blocking.

Definition at line 493 of file fetch.hh.

Referenced by buildInst(), clearStates(), doSquash(), fetch(), finishTranslation(), isDrained(), resetStage(), and tick().

◆ fetchQueueSize

unsigned gem5::o3::Fetch::fetchQueueSize
private

The size of the fetch queue in micro-ops.

Definition at line 490 of file fetch.hh.

Referenced by buildInst(), fetch(), and finishTranslation().

◆ fetchStats

◆ fetchStatus

◆ fetchWidth

unsigned gem5::o3::Fetch::fetchWidth
private

The width of fetch in instructions.

Definition at line 458 of file fetch.hh.

Referenced by buildInst(), Fetch(), fetch(), finishTranslation(), and gem5::o3::Fetch::FinishTranslationEvent::process().

◆ finishTranslationEvent

FinishTranslationEvent gem5::o3::Fetch::finishTranslationEvent
private

Event used to delay fault generation of translation faults.

Definition at line 528 of file fetch.hh.

Referenced by finishTranslation(), and isDrained().

◆ fromCommit

TimeBuffer<TimeStruct>::wire gem5::o3::Fetch::fromCommit
private

Wire to get commit's information from backwards time buffer.

Definition at line 406 of file fetch.hh.

Referenced by checkSignalsAndUpdate(), setTimeBuffer(), and tick().

◆ fromDecode

TimeBuffer<TimeStruct>::wire gem5::o3::Fetch::fromDecode
private

Wire to get decode's information from backwards time buffer.

Definition at line 397 of file fetch.hh.

Referenced by checkSignalsAndUpdate(), and setTimeBuffer().

◆ fromIEW

TimeBuffer<TimeStruct>::wire gem5::o3::Fetch::fromIEW
private

Wire to get iew's information from backwards time buffer.

Definition at line 403 of file fetch.hh.

Referenced by iqCount(), lsqCount(), and setTimeBuffer().

◆ fromRename

TimeBuffer<TimeStruct>::wire gem5::o3::Fetch::fromRename
private

Wire to get rename's information from backwards time buffer.

Definition at line 400 of file fetch.hh.

Referenced by setTimeBuffer().

◆ icachePort

IcachePort gem5::o3::Fetch::icachePort
private

Instruction port.

Note that it has to appear after the fetch stage.

Definition at line 522 of file fetch.hh.

Referenced by finishTranslation(), getInstPort(), and recvReqRetry().

◆ iewToFetchDelay

Cycles gem5::o3::Fetch::iewToFetchDelay
private

IEW to fetch delay.

Definition at line 452 of file fetch.hh.

Referenced by setTimeBuffer().

◆ instSize

int gem5::o3::Fetch::instSize
private

Size of instructions.

Definition at line 499 of file fetch.hh.

Referenced by Fetch(), and fetch().

◆ interruptPending

bool gem5::o3::Fetch::interruptPending
private

Checks if there is an interrupt pending.

If there is, fetch must stop once it is not fetching PAL instructions.

Definition at line 519 of file fetch.hh.

Referenced by checkInterrupt(), drainSanityCheck(), resetStage(), and tick().

◆ issuePipelinedIfetch

bool gem5::o3::Fetch::issuePipelinedIfetch[MaxThreads]
private

Set to true if a pipelined I-cache request should be issued.

Definition at line 525 of file fetch.hh.

Referenced by Fetch(), fetch(), pipelineIcacheAccesses(), and tick().

◆ lastIcacheStall

Counter gem5::o3::Fetch::lastIcacheStall[MaxThreads]
private

Icache stall statistics.

Definition at line 502 of file fetch.hh.

Referenced by Fetch(), and finishTranslation().

◆ macroop

StaticInstPtr gem5::o3::Fetch::macroop[MaxThreads]
private

Definition at line 419 of file fetch.hh.

Referenced by clearStates(), doSquash(), Fetch(), fetch(), and resetStage().

◆ memReq

RequestPtr gem5::o3::Fetch::memReq[MaxThreads]
private

Memory request used to access cache.

Definition at line 425 of file fetch.hh.

Referenced by clearStates(), doSquash(), drainSanityCheck(), Fetch(), fetchCacheLine(), finishTranslation(), processCacheCompletion(), and resetStage().

◆ numFetchingThreads

ThreadID gem5::o3::Fetch::numFetchingThreads
private

Number of threads that are actively fetching.

Definition at line 511 of file fetch.hh.

Referenced by fetch(), and tick().

◆ numInst

int gem5::o3::Fetch::numInst
private

Tracks how many instructions has been fetched this cycle.

Definition at line 433 of file fetch.hh.

Referenced by buildInst(), fetch(), finishTranslation(), gem5::o3::Fetch::FinishTranslationEvent::process(), resetStage(), and tick().

◆ numThreads

ThreadID gem5::o3::Fetch::numThreads
private

Number of threads.

Definition at line 508 of file fetch.hh.

Referenced by drainResume(), drainSanityCheck(), Fetch(), fetch(), getFetchingThread(), isDrained(), resetStage(), roundRobin(), and tick().

◆ pc

std::unique_ptr<PCStateBase> gem5::o3::Fetch::pc[MaxThreads]
private

◆ ppFetch

ProbePointArg<DynInstPtr>* gem5::o3::Fetch::ppFetch
private

Probe points.

Definition at line 199 of file fetch.hh.

Referenced by fetch(), and regProbePoints().

◆ ppFetchRequestSent

ProbePointArg<RequestPtr>* gem5::o3::Fetch::ppFetchRequestSent
private

To probe when a fetch request is successfully sent.

Definition at line 201 of file fetch.hh.

Referenced by finishTranslation(), recvReqRetry(), and regProbePoints().

◆ priorityList

std::list<ThreadID> gem5::o3::Fetch::priorityList
private

List that has the threads organized by priority.

Definition at line 196 of file fetch.hh.

Referenced by deactivateThread(), resetStage(), roundRobin(), and startupStage().

◆ renameToFetchDelay

Cycles gem5::o3::Fetch::renameToFetchDelay
private

Rename to fetch delay.

Definition at line 449 of file fetch.hh.

Referenced by setTimeBuffer().

◆ retryPkt

PacketPtr gem5::o3::Fetch::retryPkt
private

The packet that is waiting to be retried.

Definition at line 467 of file fetch.hh.

Referenced by doSquash(), drainSanityCheck(), finishTranslation(), and recvReqRetry().

◆ retryTid

ThreadID gem5::o3::Fetch::retryTid
private

The thread that is waiting on the cache to tell fetch to retry.

Definition at line 470 of file fetch.hh.

Referenced by doSquash(), drainSanityCheck(), finishTranslation(), and recvReqRetry().

◆ stalls

Stalls gem5::o3::Fetch::stalls[MaxThreads]
private

Tracks which stages are telling fetch to stall.

Definition at line 443 of file fetch.hh.

Referenced by checkSignalsAndUpdate(), checkStall(), clearStates(), drainResume(), drainSanityCheck(), drainStall(), Fetch(), isDrained(), profileStall(), resetStage(), and tick().

◆ threadFetched

ThreadID gem5::o3::Fetch::threadFetched
private

Thread ID being fetched.

Definition at line 514 of file fetch.hh.

Referenced by fetch(), and tick().

◆ timeBuffer

TimeBuffer<TimeStruct>* gem5::o3::Fetch::timeBuffer
private

Time buffer interface.

Definition at line 394 of file fetch.hh.

Referenced by setTimeBuffer().

◆ toDecode

TimeBuffer<FetchStruct>::wire gem5::o3::Fetch::toDecode
private

Wire used to write any information heading to decode.

Definition at line 410 of file fetch.hh.

Referenced by setFetchQueue(), and tick().

◆ wroteToTimeBuffer

bool gem5::o3::Fetch::wroteToTimeBuffer
private

Variable that tracks if fetch has written to the time buffer this cycle.

Used to tell CPU if there is activity this cycle.

Definition at line 430 of file fetch.hh.

Referenced by fetch(), finishTranslation(), resetStage(), and tick().


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

Generated on Tue Jun 18 2024 16:24:20 for gem5 by doxygen 1.11.0