gem5  v20.1.0.0
Classes | Public Types | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
DefaultCommit< Impl > Class Template Reference

DefaultCommit 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...
 
typedef Impl::O3CPU O3CPU
 
typedef Impl::DynInstPtr DynInstPtr
 
typedef Impl::CPUPol CPUPol
 
typedef CPUPol::RenameMap RenameMap
 
typedef CPUPol::ROB ROB
 
typedef CPUPol::TimeStruct TimeStruct
 
typedef CPUPol::FetchStruct FetchStruct
 
typedef CPUPol::IEWStruct IEWStruct
 
typedef CPUPol::RenameStruct RenameStruct
 
typedef CPUPol::Fetch Fetch
 
typedef CPUPol::IEW IEW
 
typedef O3ThreadState< Impl > Thread
 

Public Member Functions

 DefaultCommit (O3CPU *_cpu, DerivO3CPUParams *params)
 Construct a DefaultCommit with the given parameters. More...
 
std::string name () const
 Returns the name of the DefaultCommit. More...
 
void regProbePoints ()
 Registers probes. More...
 
void setThreads (std::vector< Thread * > &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 (RenameMap rm_ptr[Impl::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...
 
TheISA::PCState pcState (ThreadID tid)
 Reads the PC of a specific thread. More...
 
void pcState (const TheISA::PCState &val, ThreadID tid)
 Sets the PC of a specific thread. More...
 
Addr instAddr (ThreadID tid)
 Returns the PC of a specific thread. More...
 
Addr nextInstAddr (ThreadID tid)
 Returns the next PC of a specific thread. More...
 
Addr microPC (ThreadID tid)
 Reads the micro 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 [Impl::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...
 
O3CPUcpu
 Pointer to O3CPU. More...
 
std::vector< Thread * > thread
 Vector of all of the threads. More...
 
bool wroteToTimeBuffer
 Records that commit has written to the time buffer this cycle. More...
 
bool changedROBNumEntries [Impl::MaxThreads]
 Records if the number of ROB entries has changed this cycle. More...
 
bool trapSquash [Impl::MaxThreads]
 Records if a thread has to squash this cycle due to a trap. More...
 
bool tcSquash [Impl::MaxThreads]
 Records if a thread has to squash this cycle due to an XC write. More...
 
DynInstPtr squashAfterInst [Impl::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...
 
unsigned numRobs
 Number of Reorder Buffers. 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...
 
TheISA::PCState pc [Impl::MaxThreads]
 The commit PC state of each thread. More...
 
InstSeqNum youngestSeqNum [Impl::MaxThreads]
 The sequence number of the youngest valid instruction in the ROB. More...
 
InstSeqNum lastCommitedSeqNum [Impl::MaxThreads]
 The sequence number of the last commited instruction. More...
 
bool trapInFlight [Impl::MaxThreads]
 Records if there is a trap currently in flight. More...
 
bool committedStores [Impl::MaxThreads]
 Records if there were any stores committed this cycle. More...
 
bool checkEmptyROB [Impl::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...
 
RenameMaprenameMap [Impl::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 [Impl::MaxThreads]
 
int htmStops [Impl::MaxThreads]
 
DefaultCommit::CommitStats stats
 

Detailed Description

template<class Impl>
class DefaultCommit< Impl >

DefaultCommit 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 81 of file commit.hh.

Member Typedef Documentation

◆ CPUPol

template<class Impl >
typedef Impl::CPUPol DefaultCommit< Impl >::CPUPol

Definition at line 87 of file commit.hh.

◆ DynInstPtr

template<class Impl >
typedef Impl::DynInstPtr DefaultCommit< Impl >::DynInstPtr

Definition at line 86 of file commit.hh.

◆ Fetch

template<class Impl >
typedef CPUPol::Fetch DefaultCommit< Impl >::Fetch

Definition at line 97 of file commit.hh.

◆ FetchStruct

template<class Impl >
typedef CPUPol::FetchStruct DefaultCommit< Impl >::FetchStruct

Definition at line 93 of file commit.hh.

◆ IEW

template<class Impl >
typedef CPUPol::IEW DefaultCommit< Impl >::IEW

Definition at line 98 of file commit.hh.

◆ IEWStruct

template<class Impl >
typedef CPUPol::IEWStruct DefaultCommit< Impl >::IEWStruct

Definition at line 94 of file commit.hh.

◆ O3CPU

template<class Impl >
typedef Impl::O3CPU DefaultCommit< Impl >::O3CPU

Definition at line 85 of file commit.hh.

◆ RenameMap

template<class Impl >
typedef CPUPol::RenameMap DefaultCommit< Impl >::RenameMap

Definition at line 89 of file commit.hh.

◆ RenameStruct

template<class Impl >
typedef CPUPol::RenameStruct DefaultCommit< Impl >::RenameStruct

Definition at line 95 of file commit.hh.

◆ ROB

template<class Impl >
typedef CPUPol::ROB DefaultCommit< Impl >::ROB

Definition at line 90 of file commit.hh.

◆ Thread

template<class Impl >
typedef O3ThreadState<Impl> DefaultCommit< Impl >::Thread

Definition at line 100 of file commit.hh.

◆ TimeStruct

template<class Impl >
typedef CPUPol::TimeStruct DefaultCommit< Impl >::TimeStruct

Definition at line 92 of file commit.hh.

Member Enumeration Documentation

◆ CommitStatus

template<class Impl >
enum DefaultCommit::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 105 of file commit.hh.

◆ ThreadStatus

template<class Impl >
enum DefaultCommit::ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
ROBSquashing 
TrapPending 
FetchTrapPending 
SquashAfterPending 

Definition at line 111 of file commit.hh.

Constructor & Destructor Documentation

◆ DefaultCommit()

template<class Impl >
DefaultCommit< Impl >::DefaultCommit ( O3CPU _cpu,
DerivO3CPUParams *  params 
)

Member Function Documentation

◆ changedROBEntries()

template<class Impl >
bool DefaultCommit< Impl >::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 494 of file commit_impl.hh.

References DefaultCommit< Impl >::activeThreads, and DefaultCommit< Impl >::changedROBNumEntries.

◆ clearStates()

template<class Impl >
void DefaultCommit< Impl >::clearStates ( ThreadID  tid)

◆ commit()

template<class Impl >
void DefaultCommit< Impl >::commit

◆ commitHead()

template<class Impl >
bool DefaultCommit< Impl >::commitHead ( const DynInstPtr head_inst,
unsigned  inst_num 
)
private

◆ commitInsts()

template<class Impl >
void DefaultCommit< Impl >::commitInsts
private

◆ deactivateThread()

template<class Impl >
void DefaultCommit< Impl >::deactivateThread ( ThreadID  tid)

Deschedules a thread from scheduling.

Definition at line 429 of file commit_impl.hh.

References DefaultCommit< Impl >::priority_list.

◆ drain()

template<class Impl >
void DefaultCommit< Impl >::drain

Initializes the draining of commit.

Definition at line 354 of file commit_impl.hh.

References DefaultCommit< Impl >::drainPending.

◆ drainResume()

template<class Impl >
void DefaultCommit< Impl >::drainResume

Resumes execution after draining.

Definition at line 361 of file commit_impl.hh.

References DefaultCommit< Impl >::drainImminent, and DefaultCommit< Impl >::drainPending.

◆ drainSanityCheck()

template<class Impl >
void DefaultCommit< Impl >::drainSanityCheck

◆ executingHtmTransaction()

template<class Impl >
bool DefaultCommit< Impl >::executingHtmTransaction ( ThreadID  tid) const

Is the CPU currently processing a HTM transaction?

Definition at line 441 of file commit_impl.hh.

References DefaultCommit< Impl >::htmStarts, DefaultCommit< Impl >::htmStops, and InvalidThreadID.

Referenced by DefaultCommit< Impl >::commitInsts(), and DefaultCommit< Impl >::drainSanityCheck().

◆ generateTCEvent()

template<class Impl >
void DefaultCommit< Impl >::generateTCEvent ( ThreadID  tid)

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

Definition at line 545 of file commit_impl.hh.

References DPRINTF, DefaultCommit< Impl >::tcSquash, and DefaultCommit< Impl >::trapInFlight.

◆ generateTrapEvent()

template<class Impl >
void DefaultCommit< Impl >::generateTrapEvent ( ThreadID  tid,
Fault  inst_fault 
)

◆ getCommittingThread()

template<class Impl >
ThreadID DefaultCommit< Impl >::getCommittingThread
private

◆ getInsts()

template<class Impl >
void DefaultCommit< Impl >::getInsts
private

◆ handleInterrupt()

template<class Impl >
void DefaultCommit< Impl >::handleInterrupt
private

◆ instAddr()

template<class Impl >
Addr DefaultCommit< Impl >::instAddr ( ThreadID  tid)
inline

Returns the PC of a specific thread.

Definition at line 322 of file commit.hh.

References DefaultCommit< Impl >::pc.

Referenced by DefaultCommit< Impl >::commitInsts().

◆ isDrained()

template<class Impl >
bool DefaultCommit< Impl >::isDrained

◆ markCompletedInsts()

template<class Impl >
void DefaultCommit< Impl >::markCompletedInsts
private

Marks completed instructions using information sent from IEW.

Definition at line 1414 of file commit_impl.hh.

References DPRINTF, DefaultCommit< Impl >::fromIEW, and TimeBuffer< T >::size.

Referenced by DefaultCommit< Impl >::tick().

◆ microPC()

template<class Impl >
Addr DefaultCommit< Impl >::microPC ( ThreadID  tid)
inline

Reads the micro PC of a specific thread.

Definition at line 328 of file commit.hh.

References DefaultCommit< Impl >::pc.

Referenced by DefaultCommit< Impl >::commitInsts(), and DefaultCommit< Impl >::isDrained().

◆ name()

template<class Impl >
std::string DefaultCommit< Impl >::name

Returns the name of the DefaultCommit.

Definition at line 134 of file commit_impl.hh.

◆ nextInstAddr()

template<class Impl >
Addr DefaultCommit< Impl >::nextInstAddr ( ThreadID  tid)
inline

Returns the next PC of a specific thread.

Definition at line 325 of file commit.hh.

References DefaultCommit< Impl >::pc.

◆ numROBFreeEntries()

template<class Impl >
size_t DefaultCommit< Impl >::numROBFreeEntries ( ThreadID  tid)

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

Definition at line 512 of file commit_impl.hh.

References ROB< Impl >::numFreeEntries(), and DefaultCommit< Impl >::rob.

◆ oldestReady()

template<class Impl >
ThreadID DefaultCommit< Impl >::oldestReady
private

◆ pcState() [1/2]

template<class Impl >
void DefaultCommit< Impl >::pcState ( const TheISA::PCState &  val,
ThreadID  tid 
)
inline

Sets the PC of a specific thread.

Definition at line 318 of file commit.hh.

References DefaultCommit< Impl >::pc, and X86ISA::val.

◆ pcState() [2/2]

template<class Impl >
TheISA::PCState DefaultCommit< Impl >::pcState ( ThreadID  tid)
inline

Reads the PC of a specific thread.

Definition at line 315 of file commit.hh.

References DefaultCommit< Impl >::pc.

◆ processTrapEvent()

template<class Impl >
void DefaultCommit< Impl >::processTrapEvent ( ThreadID  tid)
private

Mark the thread as processing a trap.

Definition at line 73 of file commit_impl.hh.

Referenced by DefaultCommit< Impl >::generateTrapEvent().

◆ propagateInterrupt()

template<class Impl >
void DefaultCommit< Impl >::propagateInterrupt
private

◆ regProbePoints()

template<class Impl >
void DefaultCommit< Impl >::regProbePoints

Registers probes.

Definition at line 141 of file commit_impl.hh.

◆ resetHtmStartsStops()

template<class Impl >
void DefaultCommit< Impl >::resetHtmStartsStops ( ThreadID  tid)

◆ roundRobin()

template<class Impl >
ThreadID DefaultCommit< Impl >::roundRobin
private

◆ setActiveThreads()

template<class Impl >
void DefaultCommit< Impl >::setActiveThreads ( std::list< ThreadID > *  at_ptr)

Sets pointer to list of active threads.

Definition at line 295 of file commit_impl.hh.

References DefaultCommit< Impl >::activeThreads.

◆ setFetchQueue()

template<class Impl >
void DefaultCommit< Impl >::setFetchQueue ( TimeBuffer< FetchStruct > *  fq_ptr)

◆ setIEWQueue()

template<class Impl >
void DefaultCommit< Impl >::setIEWQueue ( TimeBuffer< IEWStruct > *  iq_ptr)

Sets the pointer to the queue coming from IEW.

Definition at line 278 of file commit_impl.hh.

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

◆ setIEWStage()

template<class Impl >
void DefaultCommit< Impl >::setIEWStage ( IEW iew_stage)

Sets the pointer to the IEW stage.

Definition at line 288 of file commit_impl.hh.

References DefaultCommit< Impl >::iewStage.

◆ setRenameMap()

template<class Impl >
void DefaultCommit< Impl >::setRenameMap ( RenameMap  rm_ptr[Impl::MaxThreads])

Sets pointer to the commited state rename map.

Definition at line 302 of file commit_impl.hh.

References DefaultCommit< Impl >::numThreads, and DefaultCommit< Impl >::renameMap.

◆ setRenameQueue()

template<class Impl >
void DefaultCommit< Impl >::setRenameQueue ( TimeBuffer< RenameStruct > *  rq_ptr)

Sets the pointer to the queue coming from rename.

Definition at line 268 of file commit_impl.hh.

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

◆ setROB()

template<class Impl >
void DefaultCommit< Impl >::setROB ( ROB rob_ptr)

Sets pointer to the ROB.

Definition at line 310 of file commit_impl.hh.

References DefaultCommit< Impl >::rob.

◆ setThreads()

template<class Impl >
void DefaultCommit< Impl >::setThreads ( std::vector< Thread * > &  threads)

Sets the list of threads.

Definition at line 238 of file commit_impl.hh.

References DefaultCommit< Impl >::thread.

◆ setTimeBuffer()

template<class Impl >
void DefaultCommit< Impl >::setTimeBuffer ( TimeBuffer< TimeStruct > *  tb_ptr)

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

Definition at line 245 of file commit_impl.hh.

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

◆ squashAfter()

template<class Impl >
void DefaultCommit< Impl >::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 644 of file commit_impl.hh.

References DefaultCommit< Impl >::commitStatus, DPRINTF, DefaultCommit< Impl >::squashAfterInst, and DefaultCommit< Impl >::SquashAfterPending.

Referenced by DefaultCommit< Impl >::commitInsts().

◆ squashAll()

template<class Impl >
void DefaultCommit< Impl >::squashAll ( ThreadID  tid)
private

◆ squashFromSquashAfter()

template<class Impl >
void DefaultCommit< Impl >::squashFromSquashAfter ( ThreadID  tid)
private

◆ squashFromTC()

template<class Impl >
void DefaultCommit< Impl >::squashFromTC ( ThreadID  tid)
private

◆ squashFromTrap()

template<class Impl >
void DefaultCommit< Impl >::squashFromTrap ( ThreadID  tid)
private

◆ startupStage()

template<class Impl >
void DefaultCommit< Impl >::startupStage

◆ takeOverFrom()

template<class Impl >
void DefaultCommit< Impl >::takeOverFrom

◆ tick()

template<class Impl >
void DefaultCommit< Impl >::tick

◆ updateComInstStats()

template<class Impl >
void DefaultCommit< Impl >::updateComInstStats ( const DynInstPtr inst)
private

Updates commit stats based on this instruction.

Definition at line 1435 of file commit_impl.hh.

References DefaultCommit< Impl >::cpu, and Stats::Group::stats.

Referenced by DefaultCommit< Impl >::commitHead().

◆ updateStatus()

template<class Impl >
void DefaultCommit< Impl >::updateStatus
private

Member Data Documentation

◆ _nextStatus

template<class Impl >
CommitStatus DefaultCommit< Impl >::_nextStatus
private

◆ _status

template<class Impl >
CommitStatus DefaultCommit< Impl >::_status
private

◆ activeThreads

template<class Impl >
std::list<ThreadID>* DefaultCommit< Impl >::activeThreads
private

◆ avoidQuiesceLiveLock

template<class Impl >
bool DefaultCommit< Impl >::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 474 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts(), and DefaultCommit< Impl >::handleInterrupt().

◆ canHandleInterrupts

template<class Impl >
bool DefaultCommit< Impl >::canHandleInterrupts
private

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

Definition at line 468 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts(), and DefaultCommit< Impl >::handleInterrupt().

◆ changedROBNumEntries

template<class Impl >
bool DefaultCommit< Impl >::changedROBNumEntries[Impl::MaxThreads]
private

◆ checkEmptyROB

template<class Impl >
bool DefaultCommit< Impl >::checkEmptyROB[Impl::MaxThreads]
private

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

Definition at line 459 of file commit.hh.

Referenced by DefaultCommit< Impl >::clearStates(), DefaultCommit< Impl >::commit(), and DefaultCommit< Impl >::DefaultCommit().

◆ commitPolicy

template<class Impl >
CommitPolicy DefaultCommit< Impl >::commitPolicy
private

Commit policy used in SMT mode.

Definition at line 128 of file commit.hh.

Referenced by DefaultCommit< Impl >::DefaultCommit(), and DefaultCommit< Impl >::getCommittingThread().

◆ commitStatus

template<class Impl >
ThreadStatus DefaultCommit< Impl >::commitStatus[Impl::MaxThreads]
private

◆ committedStores

template<class Impl >
bool DefaultCommit< Impl >::committedStores[Impl::MaxThreads]
private

◆ commitToIEWDelay

template<class Impl >
const Cycles DefaultCommit< Impl >::commitToIEWDelay
private

Commit to IEW delay.

Definition at line 399 of file commit.hh.

◆ commitWidth

template<class Impl >
const unsigned DefaultCommit< Impl >::commitWidth
private

Commit width, in instructions.

Definition at line 412 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts(), and DefaultCommit< Impl >::DefaultCommit().

◆ cpu

template<class Impl >
O3CPU* DefaultCommit< Impl >::cpu
private

◆ drainImminent

template<class Impl >
bool DefaultCommit< Impl >::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 430 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts(), DefaultCommit< Impl >::drainResume(), and DefaultCommit< Impl >::propagateInterrupt().

◆ drainPending

template<class Impl >
bool DefaultCommit< Impl >::drainPending
private

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

Definition at line 423 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts(), DefaultCommit< Impl >::drain(), and DefaultCommit< Impl >::drainResume().

◆ fetchQueue

template<class Impl >
TimeBuffer<FetchStruct>* DefaultCommit< Impl >::fetchQueue
private

Definition at line 340 of file commit.hh.

Referenced by DefaultCommit< Impl >::setFetchQueue().

◆ fetchToCommitDelay

template<class Impl >
const Cycles DefaultCommit< Impl >::fetchToCommitDelay
private

Definition at line 404 of file commit.hh.

Referenced by DefaultCommit< Impl >::setFetchQueue().

◆ fromFetch

template<class Impl >
TimeBuffer<FetchStruct>::wire DefaultCommit< Impl >::fromFetch
private

Definition at line 342 of file commit.hh.

Referenced by DefaultCommit< Impl >::setFetchQueue().

◆ fromIEW

template<class Impl >
TimeBuffer<IEWStruct>::wire DefaultCommit< Impl >::fromIEW
private

Wire to read information from IEW queue.

Definition at line 348 of file commit.hh.

Referenced by DefaultCommit< Impl >::commit(), DefaultCommit< Impl >::markCompletedInsts(), and DefaultCommit< Impl >::setIEWQueue().

◆ fromRename

template<class Impl >
TimeBuffer<RenameStruct>::wire DefaultCommit< Impl >::fromRename
private

Wire to read information from rename queue.

Definition at line 354 of file commit.hh.

Referenced by DefaultCommit< Impl >::getInsts(), and DefaultCommit< Impl >::setRenameQueue().

◆ htmStarts

template<class Impl >
int DefaultCommit< Impl >::htmStarts[Impl::MaxThreads]
private

◆ htmStops

template<class Impl >
int DefaultCommit< Impl >::htmStops[Impl::MaxThreads]
private

◆ iewQueue

template<class Impl >
TimeBuffer<IEWStruct>* DefaultCommit< Impl >::iewQueue
private

IEW instruction queue interface.

Definition at line 345 of file commit.hh.

Referenced by DefaultCommit< Impl >::setIEWQueue().

◆ iewStage

template<class Impl >
IEW* DefaultCommit< Impl >::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 170 of file commit.hh.

Referenced by DefaultCommit< Impl >::commit(), DefaultCommit< Impl >::commitHead(), and DefaultCommit< Impl >::setIEWStage().

◆ iewToCommitDelay

template<class Impl >
const Cycles DefaultCommit< Impl >::iewToCommitDelay
private

IEW to Commit delay.

Definition at line 396 of file commit.hh.

Referenced by DefaultCommit< Impl >::setIEWQueue(), and DefaultCommit< Impl >::setTimeBuffer().

◆ interrupt

template<class Impl >
Fault DefaultCommit< Impl >::interrupt
private

◆ lastCommitedSeqNum

template<class Impl >
InstSeqNum DefaultCommit< Impl >::lastCommitedSeqNum[Impl::MaxThreads]
private

The sequence number of the last commited instruction.

Definition at line 449 of file commit.hh.

Referenced by DefaultCommit< Impl >::clearStates(), DefaultCommit< Impl >::commitInsts(), DefaultCommit< Impl >::DefaultCommit(), and DefaultCommit< Impl >::squashAll().

◆ numRobs

template<class Impl >
unsigned DefaultCommit< Impl >::numRobs
private

Number of Reorder Buffers.

Definition at line 415 of file commit.hh.

◆ numThreads

template<class Impl >
const ThreadID DefaultCommit< Impl >::numThreads
private

◆ pc

template<class Impl >
TheISA::PCState DefaultCommit< Impl >::pc[Impl::MaxThreads]
private

◆ ppCommit

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultCommit< Impl >::ppCommit
private

Probe Points.

Definition at line 131 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts().

◆ ppCommitStall

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultCommit< Impl >::ppCommitStall
private

Definition at line 132 of file commit.hh.

Referenced by DefaultCommit< Impl >::tick().

◆ ppSquash

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultCommit< Impl >::ppSquash
private

To probe when an instruction is squashed.

Definition at line 134 of file commit.hh.

Referenced by DefaultCommit< Impl >::commitInsts().

◆ priority_list

template<class Impl >
std::list<ThreadID> DefaultCommit< Impl >::priority_list
private

Priority List used for Commit Policy.

Definition at line 393 of file commit.hh.

Referenced by DefaultCommit< Impl >::deactivateThread(), DefaultCommit< Impl >::DefaultCommit(), and DefaultCommit< Impl >::roundRobin().

◆ renameMap

template<class Impl >
RenameMap* DefaultCommit< Impl >::renameMap[Impl::MaxThreads]
private

◆ renameQueue

template<class Impl >
TimeBuffer<RenameStruct>* DefaultCommit< Impl >::renameQueue
private

Rename instruction queue interface, for ROB.

Definition at line 351 of file commit.hh.

Referenced by DefaultCommit< Impl >::setRenameQueue().

◆ renameToROBDelay

template<class Impl >
const Cycles DefaultCommit< Impl >::renameToROBDelay
private

Rename to ROB delay.

Definition at line 402 of file commit.hh.

Referenced by DefaultCommit< Impl >::setRenameQueue().

◆ renameWidth

template<class Impl >
const unsigned DefaultCommit< Impl >::renameWidth
private

Rename width, in instructions.

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

Definition at line 409 of file commit.hh.

Referenced by DefaultCommit< Impl >::getInsts().

◆ rob

template<class Impl >
ROB* DefaultCommit< Impl >::rob

◆ robInfoFromIEW

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultCommit< Impl >::robInfoFromIEW
private

Wire to read information from IEW (for ROB).

Definition at line 338 of file commit.hh.

Referenced by DefaultCommit< Impl >::setTimeBuffer().

◆ squashAfterInst

template<class Impl >
DynInstPtr DefaultCommit< Impl >::squashAfterInst[Impl::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 390 of file commit.hh.

Referenced by DefaultCommit< Impl >::clearStates(), DefaultCommit< Impl >::DefaultCommit(), DefaultCommit< Impl >::squashAfter(), DefaultCommit< Impl >::squashFromSquashAfter(), and DefaultCommit< Impl >::takeOverFrom().

◆ stats

template<class Impl >
DefaultCommit::CommitStats DefaultCommit< Impl >::stats
private

◆ tcSquash

template<class Impl >
bool DefaultCommit< Impl >::tcSquash[Impl::MaxThreads]
private

◆ thread

template<class Impl >
std::vector<Thread *> DefaultCommit< Impl >::thread
private

◆ timeBuffer

template<class Impl >
TimeBuffer<TimeStruct>* DefaultCommit< Impl >::timeBuffer
private

Time buffer interface.

Definition at line 332 of file commit.hh.

Referenced by DefaultCommit< Impl >::setTimeBuffer().

◆ toIEW

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultCommit< Impl >::toIEW
private

◆ trapInFlight

template<class Impl >
bool DefaultCommit< Impl >::trapInFlight[Impl::MaxThreads]
private

◆ trapLatency

template<class Impl >
const Cycles DefaultCommit< Impl >::trapLatency
private

The latency to handle a trap.

Used when scheduling trap squash event.

Definition at line 435 of file commit.hh.

Referenced by DefaultCommit< Impl >::generateTrapEvent().

◆ trapSquash

template<class Impl >
bool DefaultCommit< Impl >::trapSquash[Impl::MaxThreads]
private

◆ wroteToTimeBuffer

template<class Impl >
bool DefaultCommit< Impl >::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 370 of file commit.hh.

Referenced by DefaultCommit< Impl >::commit(), and DefaultCommit< Impl >::tick().

◆ youngestSeqNum

template<class Impl >
InstSeqNum DefaultCommit< Impl >::youngestSeqNum[Impl::MaxThreads]
private

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

Definition at line 446 of file commit.hh.

Referenced by DefaultCommit< Impl >::commit(), DefaultCommit< Impl >::DefaultCommit(), DefaultCommit< Impl >::getInsts(), and DefaultCommit< Impl >::squashAll().


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

Generated on Wed Sep 30 2020 14:02:23 for gem5 by doxygen 1.8.17