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

Commit handles single threaded and SMT commit. More...

#include <commit.hh>

Classes

struct  CommitStats
 

Public Types

enum  CommitStatus { Active , Inactive }
 Overall commit status. More...
 
enum  ThreadStatus {
  Running , Idle , ROBSquashing , TrapPending ,
  FetchTrapPending , SquashAfterPending
}
 Individual thread status. More...
 

Public Member Functions

 Commit (CPU *_cpu, const BaseO3CPUParams &params)
 Construct a Commit with the given parameters.
 
std::string name () const
 Returns the name of the Commit.
 
void regProbePoints ()
 Registers probes.
 
void setThreads (std::vector< ThreadState * > &threads)
 Sets the list of threads.
 
void setTimeBuffer (TimeBuffer< TimeStruct > *tb_ptr)
 Sets the main time buffer pointer, used for backwards communication.
 
void setFetchQueue (TimeBuffer< FetchStruct > *fq_ptr)
 
void setRenameQueue (TimeBuffer< RenameStruct > *rq_ptr)
 Sets the pointer to the queue coming from rename.
 
void setIEWQueue (TimeBuffer< IEWStruct > *iq_ptr)
 Sets the pointer to the queue coming from IEW.
 
void setIEWStage (IEW *iew_stage)
 Sets the pointer to the IEW stage.
 
void setActiveThreads (std::list< ThreadID > *at_ptr)
 Sets pointer to list of active threads.
 
void setRenameMap (UnifiedRenameMap::PerThreadUnifiedRenameMap &rm_ptr)
 Sets pointer to the commited state rename map.
 
void setROB (ROB *rob_ptr)
 Sets pointer to the ROB.
 
void startupStage ()
 Initializes stage by sending back the number of free entries.
 
void clearStates (ThreadID tid)
 Clear all thread-specific states.
 
void drain ()
 Initializes the draining of commit.
 
void drainResume ()
 Resumes execution after draining.
 
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 deactivateThread (ThreadID tid)
 Deschedules a thread from scheduling.
 
bool executingHtmTransaction (ThreadID) const
 Is the CPU currently processing a HTM transaction?
 
void resetHtmStartsStops (ThreadID)
 
void tick ()
 Ticks the commit stage, which tries to commit instructions.
 
void commit ()
 Handles any squashes that are sent from IEW, and adds instructions to the ROB and tries to commit instructions.
 
size_t numROBFreeEntries (ThreadID tid)
 Returns the number of free ROB entries for a specific thread.
 
void generateTrapEvent (ThreadID tid, Fault inst_fault)
 Generates an event to schedule a squash due to a trap.
 
void generateTCEvent (ThreadID tid)
 Records that commit needs to initiate a squash due to an external state update through the TC.
 
const PCStateBasepcState (ThreadID tid)
 Reads the PC of a specific thread.
 
void pcState (const PCStateBase &val, ThreadID tid)
 Sets the PC of a specific thread.
 

Public Attributes

IEWiewStage
 The pointer to the IEW stage.
 
ROBrob
 ROB interface.
 

Private Member Functions

void processTrapEvent (ThreadID tid)
 Mark the thread as processing a trap.
 
void updateStatus ()
 Updates the overall status of commit with the nextStatus, and tell the CPU if commit is active/inactive.
 
bool changedROBEntries ()
 Returns if any of the threads have the number of ROB entries changed on this cycle.
 
void squashAll (ThreadID tid)
 Squashes all in flight instructions.
 
void squashFromTrap (ThreadID tid)
 Handles squashing due to a trap.
 
void squashFromTC (ThreadID tid)
 Handles squashing due to an TC write.
 
void squashFromSquashAfter (ThreadID tid)
 Handles a squash from a squashAfter() request.
 
void squashAfter (ThreadID tid, const DynInstPtr &head_inst)
 Handle squashing from instruction with SquashAfter set.
 
void handleInterrupt ()
 Handles processing an interrupt.
 
void propagateInterrupt ()
 Get fetch redirecting so we can handle an interrupt.
 
void commitInsts ()
 Commits as many instructions as possible.
 
bool commitHead (const DynInstPtr &head_inst, unsigned inst_num)
 Tries to commit the head ROB instruction passed in.
 
void getInsts ()
 Gets instructions from rename and inserts them into the ROB.
 
void markCompletedInsts ()
 Marks completed instructions using information sent from IEW.
 
ThreadID getCommittingThread ()
 Gets the thread to commit, based on the SMT policy.
 
ThreadID roundRobin ()
 Returns the thread ID to use based on a round robin policy.
 
ThreadID oldestReady ()
 Returns the thread ID to use based on an oldest instruction policy.
 
void updateComInstStats (const DynInstPtr &inst)
 Updates commit stats based on this instruction.
 

Private Attributes

CommitStatus _status
 Overall commit status.
 
CommitStatus _nextStatus
 Next commit status, to be set at the end of the cycle.
 
ThreadStatus commitStatus [MaxThreads]
 Per-thread status.
 
CommitPolicy commitPolicy
 Commit policy used in SMT mode.
 
ProbePointArg< DynInstPtr > * ppCommit
 Probe Points.
 
ProbePointArg< DynInstPtr > * ppCommitStall
 
ProbePointArg< DynInstPtr > * ppSquash
 To probe when an instruction is squashed.
 
TimeBuffer< TimeStruct > * timeBuffer
 Time buffer interface.
 
TimeBuffer< TimeStruct >::wire toIEW
 Wire to write information heading to previous stages.
 
TimeBuffer< TimeStruct >::wire robInfoFromIEW
 Wire to read information from IEW (for ROB).
 
TimeBuffer< FetchStruct > * fetchQueue
 
TimeBuffer< FetchStruct >::wire fromFetch
 
TimeBuffer< IEWStruct > * iewQueue
 IEW instruction queue interface.
 
TimeBuffer< IEWStruct >::wire fromIEW
 Wire to read information from IEW queue.
 
TimeBuffer< RenameStruct > * renameQueue
 Rename instruction queue interface, for ROB.
 
TimeBuffer< RenameStruct >::wire fromRename
 Wire to read information from rename queue.
 
CPUcpu
 Pointer to O3CPU.
 
std::vector< ThreadState * > thread
 Vector of all of the threads.
 
bool wroteToTimeBuffer
 Records that commit has written to the time buffer this cycle.
 
bool changedROBNumEntries [MaxThreads]
 Records if the number of ROB entries has changed this cycle.
 
bool trapSquash [MaxThreads]
 Records if a thread has to squash this cycle due to a trap.
 
bool tcSquash [MaxThreads]
 Records if a thread has to squash this cycle due to an XC write.
 
DynInstPtr squashAfterInst [MaxThreads]
 Instruction passed to squashAfter().
 
std::list< ThreadIDpriority_list
 Priority List used for Commit Policy.
 
const Cycles iewToCommitDelay
 IEW to Commit delay.
 
const Cycles commitToIEWDelay
 Commit to IEW delay.
 
const Cycles renameToROBDelay
 Rename to ROB delay.
 
const Cycles fetchToCommitDelay
 
const unsigned renameWidth
 Rename width, in instructions.
 
const unsigned commitWidth
 Commit width, in instructions.
 
const ThreadID numThreads
 Number of Active Threads.
 
bool drainPending
 Is a drain pending? Commit is looking for an instruction boundary while there are no pending interrupts.
 
bool drainImminent
 Is a drain imminent? Commit has found an instruction boundary while no interrupts were present or in flight.
 
const Cycles trapLatency
 The latency to handle a trap.
 
Fault interrupt
 The interrupt fault.
 
std::unique_ptr< PCStateBasepc [MaxThreads]
 The commit PC state of each thread.
 
InstSeqNum youngestSeqNum [MaxThreads]
 The sequence number of the youngest valid instruction in the ROB.
 
InstSeqNum lastCommitedSeqNum [MaxThreads]
 The sequence number of the last commited instruction.
 
bool trapInFlight [MaxThreads]
 Records if there is a trap currently in flight.
 
bool committedStores [MaxThreads]
 Records if there were any stores committed this cycle.
 
bool checkEmptyROB [MaxThreads]
 Records if commit should check if the ROB is truly empty (see commit_impl.hh).
 
std::list< ThreadID > * activeThreads
 Pointer to the list of active threads.
 
UnifiedRenameMaprenameMap [MaxThreads]
 Rename map interface.
 
bool canHandleInterrupts
 True if last committed microop can be followed by an interrupt.
 
bool avoidQuiesceLiveLock
 Have we had an interrupt pending and then seen it de-asserted because of a masking change? In this case the variable is set and the next time interrupts are enabled and pending the pipeline will squash to avoid a possible livelock senario.
 
int htmStarts [MaxThreads]
 
int htmStops [MaxThreads]
 
gem5::o3::Commit::CommitStats stats
 

Detailed Description

Commit handles single threaded and SMT commit.

Its width is specified by the parameters; each cycle it tries to commit that many instructions. The SMT policy decides which thread it tries to commit instructions from. Non- speculative instructions must reach the head of the ROB before they are ready to execute; once they reach the head, commit will broadcast the instruction's sequence number to the previous stages so that they can issue/ execute the instruction. Only one non-speculative instruction is handled per cycle. Commit is responsible for handling all back-end initiated redirects. It receives the redirect, and then broadcasts it to all stages, indicating the sequence number they should squash until, and any necessary branch misprediction information as well. It priortizes redirects by instruction's age, only broadcasting a redirect if it corresponds to an instruction that should currently be in the ROB. This is done by tracking the sequence number of the youngest instruction in the ROB, which gets updated to any squashing instruction's sequence number, and only broadcasting a redirect if it corresponds to an older instruction. Commit also supports multiple cycle squashing, to model a ROB that can only remove a certain number of instructions per cycle.

Definition at line 91 of file commit.hh.

Member Enumeration Documentation

◆ CommitStatus

Overall commit status.

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

Enumerator
Active 
Inactive 

Definition at line 97 of file commit.hh.

◆ ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
ROBSquashing 
TrapPending 
FetchTrapPending 
SquashAfterPending 

Definition at line 104 of file commit.hh.

Constructor & Destructor Documentation

◆ Commit()

Member Function Documentation

◆ changedROBEntries()

bool gem5::o3::Commit::changedROBEntries ( )
private

Returns if any of the threads have the number of ROB entries changed on this cycle.

Used to determine if the number of free ROB entries needs to be sent back to previous stages.

Definition at line 428 of file commit.cc.

References activeThreads, and changedROBNumEntries.

◆ clearStates()

◆ commit()

◆ commitHead()

◆ commitInsts()

◆ deactivateThread()

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

Deschedules a thread from scheduling.

Definition at line 367 of file commit.cc.

References priority_list.

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

◆ drain()

void gem5::o3::Commit::drain ( )

Initializes the draining of commit.

Definition at line 300 of file commit.cc.

References drainPending.

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

◆ drainResume()

void gem5::o3::Commit::drainResume ( )

Resumes execution after draining.

Definition at line 303 of file commit.cc.

References drainImminent, and drainPending.

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

◆ drainSanityCheck()

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

Perform sanity checks after a drain.

Definition at line 310 of file commit.cc.

References gem5::o3::ROB::drainSanityCheck(), executingHtmTransaction(), isDrained(), numThreads, panic, and rob.

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

◆ executingHtmTransaction()

bool gem5::o3::Commit::executingHtmTransaction ( ThreadID tid) const

Is the CPU currently processing a HTM transaction?

Definition at line 378 of file commit.cc.

References htmStarts, htmStops, and gem5::InvalidThreadID.

Referenced by commitInsts(), gem5::o3::CPU::deactivateThread(), and drainSanityCheck().

◆ generateTCEvent()

void gem5::o3::Commit::generateTCEvent ( ThreadID tid)

Records that commit needs to initiate a squash due to an external state update through the TC.

Definition at line 476 of file commit.cc.

References DPRINTF, tcSquash, and trapInFlight.

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

◆ generateTrapEvent()

void gem5::o3::Commit::generateTrapEvent ( ThreadID tid,
Fault inst_fault )

◆ getCommittingThread()

ThreadID gem5::o3::Commit::getCommittingThread ( )
private

◆ getInsts()

void gem5::o3::Commit::getInsts ( )
private

Gets instructions from rename and inserts them into the ROB.

Definition at line 1284 of file commit.cc.

References changedROBNumEntries, commitStatus, DPRINTF, fromRename, gem5::o3::ROB::getMaxEntries(), gem5::o3::ROB::getThreadEntries(), gem5::o3::ROB::insertInst(), renameWidth, rob, ROBSquashing, TrapPending, and youngestSeqNum.

Referenced by commit().

◆ handleInterrupt()

◆ isDrained()

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

Has the stage drained?

Definition at line 325 of file commit.cc.

References interrupt, gem5::o3::ROB::isEmpty(), gem5::NoFault, numThreads, pc, and rob.

Referenced by drainSanityCheck(), and gem5::o3::CPU::isCpuDrained().

◆ markCompletedInsts()

void gem5::o3::Commit::markCompletedInsts ( )
private

Marks completed instructions using information sent from IEW.

Definition at line 1317 of file commit.cc.

References DPRINTF, fromIEW, and pcState().

Referenced by tick().

◆ name()

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

Returns the name of the Commit.

Definition at line 135 of file commit.cc.

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

◆ numROBFreeEntries()

size_t gem5::o3::Commit::numROBFreeEntries ( ThreadID tid)

Returns the number of free ROB entries for a specific thread.

Definition at line 445 of file commit.cc.

References gem5::o3::ROB::numFreeEntries(), and rob.

Referenced by gem5::o3::Rename::clearStates(), and gem5::o3::Rename::resetStage().

◆ oldestReady()

ThreadID gem5::o3::Commit::oldestReady ( )
private

Returns the thread ID to use based on an oldest instruction policy.

Definition at line 1476 of file commit.cc.

References activeThreads, commitStatus, FetchTrapPending, Idle, gem5::InvalidThreadID, gem5::o3::ROB::isEmpty(), gem5::o3::ROB::isHeadReady(), gem5::o3::ROB::readHeadInst(), rob, and Running.

Referenced by getCommittingThread().

◆ pcState() [1/2]

void gem5::o3::Commit::pcState ( const PCStateBase & val,
ThreadID tid )
inline

Sets the PC of a specific thread.

Definition at line 312 of file commit.hh.

References pc, gem5::ArmISA::set, and gem5::X86ISA::val.

◆ pcState() [2/2]

const PCStateBase & gem5::o3::Commit::pcState ( ThreadID tid)
inline

Reads the PC of a specific thread.

Definition at line 309 of file commit.hh.

References pc.

Referenced by commit(), markCompletedInsts(), gem5::o3::CPU::pcState(), and gem5::o3::CPU::pcState().

◆ processTrapEvent()

void gem5::o3::Commit::processTrapEvent ( ThreadID tid)
private

Mark the thread as processing a trap.

Definition at line 77 of file commit.cc.

References trapSquash.

Referenced by generateTrapEvent().

◆ propagateInterrupt()

void gem5::o3::Commit::propagateInterrupt ( )
private

Get fetch redirecting so we can handle an interrupt.

Definition at line 712 of file commit.cc.

References commitStatus, cpu, drainImminent, gem5::o3::CPU::getInterrupts(), interrupt, gem5::NoFault, tcSquash, toIEW, TrapPending, and trapSquash.

Referenced by commit().

◆ regProbePoints()

void gem5::o3::Commit::regProbePoints ( )

Registers probes.

Definition at line 138 of file commit.cc.

References cpu, gem5::SimObject::getProbeManager(), ppCommit, ppCommitStall, and ppSquash.

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

◆ resetHtmStartsStops()

void gem5::o3::Commit::resetHtmStartsStops ( ThreadID tid)

Definition at line 387 of file commit.cc.

References htmStarts, htmStops, and gem5::InvalidThreadID.

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

◆ roundRobin()

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

Returns the thread ID to use based on a round robin policy.

Definition at line 1449 of file commit.cc.

References commitStatus, FetchTrapPending, Idle, gem5::InvalidThreadID, gem5::o3::ROB::isHeadReady(), priority_list, rob, and Running.

Referenced by getCommittingThread().

◆ setActiveThreads()

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

Sets pointer to list of active threads.

Definition at line 251 of file commit.cc.

References activeThreads.

◆ setFetchQueue()

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

Definition at line 218 of file commit.cc.

References fetchQueue, fetchToCommitDelay, fromFetch, and gem5::TimeBuffer< T >::getWire().

◆ setIEWQueue()

void gem5::o3::Commit::setIEWQueue ( TimeBuffer< IEWStruct > * iq_ptr)

Sets the pointer to the queue coming from IEW.

Definition at line 236 of file commit.cc.

References fromIEW, gem5::TimeBuffer< T >::getWire(), iewQueue, and iewToCommitDelay.

◆ setIEWStage()

void gem5::o3::Commit::setIEWStage ( IEW * iew_stage)

Sets the pointer to the IEW stage.

Definition at line 245 of file commit.cc.

References iewStage.

◆ setRenameMap()

void gem5::o3::Commit::setRenameMap ( UnifiedRenameMap::PerThreadUnifiedRenameMap & rm_ptr)

Sets pointer to the commited state rename map.

Definition at line 257 of file commit.cc.

References numThreads, and renameMap.

◆ setRenameQueue()

void gem5::o3::Commit::setRenameQueue ( TimeBuffer< RenameStruct > * rq_ptr)

Sets the pointer to the queue coming from rename.

Definition at line 227 of file commit.cc.

References fromRename, gem5::TimeBuffer< T >::getWire(), renameQueue, and renameToROBDelay.

◆ setROB()

void gem5::o3::Commit::setROB ( ROB * rob_ptr)

Sets pointer to the ROB.

Definition at line 263 of file commit.cc.

References rob.

◆ setThreads()

void gem5::o3::Commit::setThreads ( std::vector< ThreadState * > & threads)

Sets the list of threads.

Definition at line 200 of file commit.cc.

References thread.

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

◆ setTimeBuffer()

void gem5::o3::Commit::setTimeBuffer ( TimeBuffer< TimeStruct > * tb_ptr)

Sets the main time buffer pointer, used for backwards communication.

Definition at line 206 of file commit.cc.

References gem5::TimeBuffer< T >::getWire(), iewToCommitDelay, robInfoFromIEW, timeBuffer, and toIEW.

◆ squashAfter()

void gem5::o3::Commit::squashAfter ( ThreadID tid,
const DynInstPtr & head_inst )
private

Handle squashing from instruction with SquashAfter set.

This differs from the other squashes as it squashes following instructions instead of the current instruction and doesn't clean up various status bits about traps/tc writes pending. Since there might have been instructions committed by the commit stage before the squashing instruction was reached and we can't commit and squash in the same cycle, we have to squash in two steps:

  1. Immediately set the commit status of the thread of SquashAfterPending. This forces the thread to stop committing instructions in this cycle. The last instruction to be committed in this cycle will be the SquashAfter instruction.
  2. In the next cycle, commit() checks for the SquashAfterPending state and squashes all in-flight instructions. Since the SquashAfter instruction was the last instruction to be committed in the previous cycle, this causes all subsequent instructions to be squashed.
Parameters
tidID of the thread to squash.
head_instInstruction that requested the squash.

Definition at line 570 of file commit.cc.

References commitStatus, DPRINTF, squashAfterInst, and SquashAfterPending.

Referenced by commitInsts().

◆ squashAll()

void gem5::o3::Commit::squashAll ( ThreadID tid)
private

◆ squashFromSquashAfter()

void gem5::o3::Commit::squashFromSquashAfter ( ThreadID tid)
private

Handles a squash from a squashAfter() request.

Definition at line 553 of file commit.cc.

References gem5::o3::CPU::activityThisCycle(), commitStatus, cpu, DPRINTF, pc, ROBSquashing, squashAfterInst, squashAll(), and toIEW.

Referenced by commit().

◆ squashFromTC()

void gem5::o3::Commit::squashFromTC ( ThreadID tid)
private

Handles squashing due to an TC write.

Definition at line 537 of file commit.cc.

References gem5::o3::CPU::activityThisCycle(), commitStatus, cpu, DPRINTF, pc, ROBSquashing, squashAll(), tcSquash, and thread.

Referenced by commit().

◆ squashFromTrap()

void gem5::o3::Commit::squashFromTrap ( ThreadID tid)
private

Handles squashing due to a trap.

Definition at line 520 of file commit.cc.

References gem5::o3::CPU::activityThisCycle(), commitStatus, cpu, DPRINTF, pc, ROBSquashing, squashAll(), thread, trapInFlight, and trapSquash.

Referenced by commit().

◆ startupStage()

void gem5::o3::Commit::startupStage ( )

◆ takeOverFrom()

void gem5::o3::Commit::takeOverFrom ( )

◆ tick()

◆ updateComInstStats()

void gem5::o3::Commit::updateComInstStats ( const DynInstPtr & inst)
private

◆ updateStatus()

void gem5::o3::Commit::updateStatus ( )
private

Updates the overall status of commit with the nextStatus, and tell the CPU if commit is active/inactive.

Definition at line 398 of file commit.cc.

References _nextStatus, _status, gem5::o3::CPU::activateStage(), Active, activeThreads, changedROBNumEntries, gem5::o3::CPU::CommitIdx, commitStatus, cpu, gem5::o3::CPU::deactivateStage(), DPRINTF, FetchTrapPending, Inactive, and TrapPending.

Referenced by tick().

Member Data Documentation

◆ _nextStatus

CommitStatus gem5::o3::Commit::_nextStatus
private

Next commit status, to be set at the end of the cycle.

Definition at line 118 of file commit.hh.

Referenced by Commit(), commit(), takeOverFrom(), tick(), and updateStatus().

◆ _status

CommitStatus gem5::o3::Commit::_status
private

Overall commit status.

Definition at line 116 of file commit.hh.

Referenced by Commit(), takeOverFrom(), and updateStatus().

◆ activeThreads

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

Pointer to the list of active threads.

Definition at line 443 of file commit.hh.

Referenced by changedROBEntries(), commit(), getCommittingThread(), oldestReady(), setActiveThreads(), startupStage(), tick(), and updateStatus().

◆ avoidQuiesceLiveLock

bool gem5::o3::Commit::avoidQuiesceLiveLock
private

Have we had an interrupt pending and then seen it de-asserted because of a masking change? In this case the variable is set and the next time interrupts are enabled and pending the pipeline will squash to avoid a possible livelock senario.


Definition at line 455 of file commit.hh.

Referenced by commitInsts(), and handleInterrupt().

◆ canHandleInterrupts

bool gem5::o3::Commit::canHandleInterrupts
private

True if last committed microop can be followed by an interrupt.

Definition at line 449 of file commit.hh.

Referenced by commitInsts(), and handleInterrupt().

◆ changedROBNumEntries

bool gem5::o3::Commit::changedROBNumEntries[MaxThreads]
private

Records if the number of ROB entries has changed this cycle.

If it has, then the number of free entries must be re-broadcast.

Definition at line 359 of file commit.hh.

Referenced by changedROBEntries(), clearStates(), Commit(), commit(), commitInsts(), getInsts(), squashAll(), takeOverFrom(), and updateStatus().

◆ checkEmptyROB

bool gem5::o3::Commit::checkEmptyROB[MaxThreads]
private

Records if commit should check if the ROB is truly empty (see commit_impl.hh).

Definition at line 440 of file commit.hh.

Referenced by clearStates(), Commit(), and commit().

◆ commitPolicy

CommitPolicy gem5::o3::Commit::commitPolicy
private

Commit policy used in SMT mode.

Definition at line 122 of file commit.hh.

Referenced by Commit(), and getCommittingThread().

◆ commitStatus

◆ committedStores

bool gem5::o3::Commit::committedStores[MaxThreads]
private

Records if there were any stores committed this cycle.

Definition at line 436 of file commit.hh.

Referenced by clearStates(), Commit(), commit(), commitHead(), and tick().

◆ commitToIEWDelay

const Cycles gem5::o3::Commit::commitToIEWDelay
private

Commit to IEW delay.

Definition at line 383 of file commit.hh.

◆ commitWidth

const unsigned gem5::o3::Commit::commitWidth
private

Commit width, in instructions.

Definition at line 396 of file commit.hh.

Referenced by Commit(), and commitInsts().

◆ cpu

◆ drainImminent

bool gem5::o3::Commit::drainImminent
private

Is a drain imminent? Commit has found an instruction boundary while no interrupts were present or in flight.

This was the last architecturally committed instruction. Interrupts disabled and pipeline flushed. Waiting for structures to finish draining.

Definition at line 411 of file commit.hh.

Referenced by commitInsts(), drainResume(), and propagateInterrupt().

◆ drainPending

bool gem5::o3::Commit::drainPending
private

Is a drain pending? Commit is looking for an instruction boundary while there are no pending interrupts.

Definition at line 404 of file commit.hh.

Referenced by commitInsts(), drain(), and drainResume().

◆ fetchQueue

TimeBuffer<FetchStruct>* gem5::o3::Commit::fetchQueue
private

Definition at line 324 of file commit.hh.

Referenced by setFetchQueue().

◆ fetchToCommitDelay

const Cycles gem5::o3::Commit::fetchToCommitDelay
private

Definition at line 388 of file commit.hh.

Referenced by setFetchQueue().

◆ fromFetch

TimeBuffer<FetchStruct>::wire gem5::o3::Commit::fromFetch
private

Definition at line 326 of file commit.hh.

Referenced by setFetchQueue().

◆ fromIEW

TimeBuffer<IEWStruct>::wire gem5::o3::Commit::fromIEW
private

Wire to read information from IEW queue.

Definition at line 332 of file commit.hh.

Referenced by commit(), markCompletedInsts(), and setIEWQueue().

◆ fromRename

TimeBuffer<RenameStruct>::wire gem5::o3::Commit::fromRename
private

Wire to read information from rename queue.

Definition at line 338 of file commit.hh.

Referenced by getInsts(), and setRenameQueue().

◆ htmStarts

int gem5::o3::Commit::htmStarts[MaxThreads]
private

Definition at line 461 of file commit.hh.

Referenced by Commit(), commitInsts(), executingHtmTransaction(), and resetHtmStartsStops().

◆ htmStops

int gem5::o3::Commit::htmStops[MaxThreads]
private

Definition at line 462 of file commit.hh.

Referenced by Commit(), commitInsts(), executingHtmTransaction(), and resetHtmStartsStops().

◆ iewQueue

TimeBuffer<IEWStruct>* gem5::o3::Commit::iewQueue
private

IEW instruction queue interface.

Definition at line 329 of file commit.hh.

Referenced by setIEWQueue().

◆ iewStage

IEW* gem5::o3::Commit::iewStage

The pointer to the IEW stage.

Used solely to ensure that various events (traps, interrupts, syscalls) do not occur until all stores have written back.

Definition at line 164 of file commit.hh.

Referenced by commit(), commitHead(), and setIEWStage().

◆ iewToCommitDelay

const Cycles gem5::o3::Commit::iewToCommitDelay
private

IEW to Commit delay.

Definition at line 380 of file commit.hh.

Referenced by setIEWQueue(), and setTimeBuffer().

◆ interrupt

Fault gem5::o3::Commit::interrupt
private

The interrupt fault.

Definition at line 419 of file commit.hh.

Referenced by Commit(), commitInsts(), handleInterrupt(), isDrained(), and propagateInterrupt().

◆ lastCommitedSeqNum

InstSeqNum gem5::o3::Commit::lastCommitedSeqNum[MaxThreads]
private

The sequence number of the last commited instruction.

Definition at line 430 of file commit.hh.

Referenced by clearStates(), Commit(), commitInsts(), and squashAll().

◆ numThreads

const ThreadID gem5::o3::Commit::numThreads
private

Number of Active Threads.

Definition at line 399 of file commit.hh.

Referenced by Commit(), commit(), drainSanityCheck(), getCommittingThread(), isDrained(), setRenameMap(), startupStage(), and takeOverFrom().

◆ pc

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

The commit PC state of each thread.

Refers to the instruction that is currently being processed/committed.

Definition at line 424 of file commit.hh.

Referenced by clearStates(), Commit(), commit(), commitInsts(), isDrained(), pcState(), pcState(), squashAll(), squashFromSquashAfter(), squashFromTC(), and squashFromTrap().

◆ ppCommit

ProbePointArg<DynInstPtr>* gem5::o3::Commit::ppCommit
private

Probe Points.

Definition at line 125 of file commit.hh.

Referenced by commitInsts(), and regProbePoints().

◆ ppCommitStall

ProbePointArg<DynInstPtr>* gem5::o3::Commit::ppCommitStall
private

Definition at line 126 of file commit.hh.

Referenced by regProbePoints(), and tick().

◆ ppSquash

ProbePointArg<DynInstPtr>* gem5::o3::Commit::ppSquash
private

To probe when an instruction is squashed.

Definition at line 128 of file commit.hh.

Referenced by commitInsts(), and regProbePoints().

◆ priority_list

std::list<ThreadID> gem5::o3::Commit::priority_list
private

Priority List used for Commit Policy.

Definition at line 377 of file commit.hh.

Referenced by Commit(), deactivateThread(), and roundRobin().

◆ renameMap

UnifiedRenameMap* gem5::o3::Commit::renameMap[MaxThreads]
private

Rename map interface.

Definition at line 446 of file commit.hh.

Referenced by Commit(), commitHead(), and setRenameMap().

◆ renameQueue

TimeBuffer<RenameStruct>* gem5::o3::Commit::renameQueue
private

Rename instruction queue interface, for ROB.

Definition at line 335 of file commit.hh.

Referenced by setRenameQueue().

◆ renameToROBDelay

const Cycles gem5::o3::Commit::renameToROBDelay
private

Rename to ROB delay.

Definition at line 386 of file commit.hh.

Referenced by setRenameQueue().

◆ renameWidth

const unsigned gem5::o3::Commit::renameWidth
private

Rename width, in instructions.

Used so ROB knows how many instructions to get from the rename instruction queue.

Definition at line 393 of file commit.hh.

Referenced by getInsts().

◆ rob

◆ robInfoFromIEW

TimeBuffer<TimeStruct>::wire gem5::o3::Commit::robInfoFromIEW
private

Wire to read information from IEW (for ROB).

Definition at line 322 of file commit.hh.

Referenced by setTimeBuffer().

◆ squashAfterInst

DynInstPtr gem5::o3::Commit::squashAfterInst[MaxThreads]
private

Instruction passed to squashAfter().

The squash after implementation needs to buffer the instruction that caused a squash since this needs to be passed to the fetch stage once squashing starts.

Definition at line 374 of file commit.hh.

Referenced by clearStates(), Commit(), squashAfter(), squashFromSquashAfter(), and takeOverFrom().

◆ stats

gem5::o3::Commit::CommitStats gem5::o3::Commit::stats
private

◆ tcSquash

bool gem5::o3::Commit::tcSquash[MaxThreads]
private

Records if a thread has to squash this cycle due to an XC write.

Definition at line 365 of file commit.hh.

Referenced by clearStates(), Commit(), commit(), generateTCEvent(), propagateInterrupt(), squashFromTC(), and takeOverFrom().

◆ thread

std::vector<ThreadState *> gem5::o3::Commit::thread
private

Vector of all of the threads.

Definition at line 349 of file commit.hh.

Referenced by commitHead(), commitInsts(), generateTrapEvent(), handleInterrupt(), setThreads(), squashFromTC(), and squashFromTrap().

◆ timeBuffer

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

Time buffer interface.

Definition at line 316 of file commit.hh.

Referenced by setTimeBuffer().

◆ toIEW

TimeBuffer<TimeStruct>::wire gem5::o3::Commit::toIEW
private

Wire to write information heading to previous stages.

Definition at line 319 of file commit.hh.

Referenced by commit(), commitHead(), commitInsts(), handleInterrupt(), propagateInterrupt(), setTimeBuffer(), squashAll(), squashFromSquashAfter(), startupStage(), and tick().

◆ trapInFlight

bool gem5::o3::Commit::trapInFlight[MaxThreads]
private

Records if there is a trap currently in flight.

Definition at line 433 of file commit.hh.

Referenced by clearStates(), Commit(), generateTCEvent(), generateTrapEvent(), and squashFromTrap().

◆ trapLatency

const Cycles gem5::o3::Commit::trapLatency
private

The latency to handle a trap.

Used when scheduling trap squash event.

Definition at line 416 of file commit.hh.

Referenced by generateTrapEvent().

◆ trapSquash

bool gem5::o3::Commit::trapSquash[MaxThreads]
private

Records if a thread has to squash this cycle due to a trap.

Definition at line 362 of file commit.hh.

Referenced by clearStates(), Commit(), commit(), processTrapEvent(), propagateInterrupt(), squashFromTrap(), and takeOverFrom().

◆ wroteToTimeBuffer

bool gem5::o3::Commit::wroteToTimeBuffer
private

Records that commit has written to the time buffer this cycle.

Used for the CPU to determine if it can deschedule itself if there is no activity.

Definition at line 354 of file commit.hh.

Referenced by commit(), and tick().

◆ youngestSeqNum

InstSeqNum gem5::o3::Commit::youngestSeqNum[MaxThreads]
private

The sequence number of the youngest valid instruction in the ROB.

Definition at line 427 of file commit.hh.

Referenced by Commit(), commit(), getInsts(), and squashAll().


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