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

Public Attributes

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

Private Member Functions

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

Private Attributes

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

gem5::o3::Commit::Commit ( CPU _cpu,
const BaseO3CPUParams &  params 
)

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 475 of file commit.cc.

References activeThreads, and changedROBNumEntries.

◆ clearStates()

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

◆ commit()

void gem5::o3::Commit::commit ( )

◆ commitHead()

bool gem5::o3::Commit::commitHead ( const DynInstPtr head_inst,
unsigned  inst_num 
)
private

◆ commitInsts()

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

◆ deactivateThread()

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

Deschedules a thread from scheduling.

Definition at line 414 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 347 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 350 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 357 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 425 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 523 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

Gets the thread to commit, based on the SMT policy.

Definition at line 1444 of file commit.cc.

References activeThreads, commitPolicy, commitStatus, FetchTrapPending, Idle, gem5::InvalidThreadID, numThreads, oldestReady(), roundRobin(), and Running.

Referenced by commitInsts().

◆ getInsts()

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

Gets instructions from rename and inserts them into the ROB.

Definition at line 1329 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()

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

◆ isDrained()

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

Has the stage drained?

Definition at line 372 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 1362 of file commit.cc.

References DPRINTF, and fromIEW.

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 492 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 1499 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 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 759 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 434 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 1472 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 298 of file commit.cc.

References activeThreads.

◆ setFetchQueue()

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

Definition at line 265 of file commit.cc.

References fetchQueue, fetchToCommitDelay, and fromFetch.

◆ setIEWQueue()

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

Sets the pointer to the queue coming from IEW.

Definition at line 283 of file commit.cc.

References fromIEW, iewQueue, and iewToCommitDelay.

◆ setIEWStage()

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

Sets the pointer to the IEW stage.

Definition at line 292 of file commit.cc.

References iewStage.

◆ setRenameMap()

void gem5::o3::Commit::setRenameMap ( UnifiedRenameMap  rm_ptr[MaxThreads])

Sets pointer to the commited state rename map.

Definition at line 304 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 274 of file commit.cc.

References fromRename, renameQueue, and renameToROBDelay.

◆ setROB()

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

Sets pointer to the ROB.

Definition at line 310 of file commit.cc.

References rob.

◆ setThreads()

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

Sets the list of threads.

Definition at line 247 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 253 of file commit.cc.

References 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 617 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 600 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 584 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 567 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()

void gem5::o3::Commit::tick ( )

◆ updateComInstStats()

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

Updates commit stats based on this instruction.

Definition at line 1382 of file commit.cc.

References cpu, gem5::o3::CPU::instDone(), and gem5::statistics::Group::stats.

Referenced by commitHead().

◆ 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 445 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

ThreadStatus gem5::o3::Commit::commitStatus[MaxThreads]
private

◆ 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

CPU* gem5::o3::Commit::cpu
private

◆ 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(), commitInsts(), isDrained(), 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

ROB* gem5::o3::Commit::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 Wed Dec 21 2022 10:24:17 for gem5 by doxygen 1.9.1