gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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

class  TrapEvent
 Event class used to schedule a squash due to a trap (fault or interrupt) to happen on a specific cycle. More...
 

Public Types

enum  CommitStatus { Active, Inactive }
 Overall commit status. More...
 
enum  ThreadStatus {
  Running, Idle, ROBSquashing, TrapPending,
  FetchTrapPending, SquashAfterPending
}
 Individual thread status. More...
 
enum  CommitPolicy { Aggressive, RoundRobin, OldestReady }
 Commit policy for SMT mode. 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 regStats ()
 Registers statistics. 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 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...
 
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 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, 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 (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 (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...
 
Stats::Scalar commitSquashedInsts
 Stat for the total number of squashed instructions discarded by commit. More...
 
Stats::Scalar commitNonSpecStalls
 Stat for the total number of times commit has had to stall due to a non- speculative instruction reaching the head of the ROB. More...
 
Stats::Scalar branchMispredicts
 Stat for the total number of branch mispredicts that caused a squash. More...
 
Stats::Distribution numCommittedDist
 Distribution of the number of committed instructions each cycle. More...
 
Stats::Vector instsCommitted
 Total number of instructions committed. More...
 
Stats::Vector opsCommitted
 Total number of ops (including micro ops) committed. More...
 
Stats::Vector statComSwp
 Total number of software prefetches committed. More...
 
Stats::Vector statComRefs
 Stat for the total number of committed memory references. More...
 
Stats::Vector statComLoads
 Stat for the total number of committed loads. More...
 
Stats::Vector statComMembars
 Total number of committed memory barriers. More...
 
Stats::Vector statComBranches
 Total number of committed branches. More...
 
Stats::Vector statComFloating
 Total number of floating point instructions. More...
 
Stats::Vector statComInteger
 Total number of integer instructions. More...
 
Stats::Vector statComFunctionCalls
 Total number of function calls. More...
 
Stats::Vector2d statCommittedInstType
 Committed instructions by instruction type (OpClass) More...
 
Stats::Scalar commitEligibleSamples
 Number of cycles where the commit bandwidth limit is reached. More...
 

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

Member Typedef Documentation

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

Definition at line 89 of file commit.hh.

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

Definition at line 88 of file commit.hh.

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

Definition at line 99 of file commit.hh.

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

Definition at line 95 of file commit.hh.

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

Definition at line 100 of file commit.hh.

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

Definition at line 96 of file commit.hh.

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

Definition at line 87 of file commit.hh.

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

Definition at line 91 of file commit.hh.

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

Definition at line 97 of file commit.hh.

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

Definition at line 92 of file commit.hh.

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

Definition at line 102 of file commit.hh.

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

Definition at line 94 of file commit.hh.

Member Enumeration Documentation

template<class Impl>
enum DefaultCommit::CommitPolicy

Commit policy for SMT mode.

Enumerator
Aggressive 
RoundRobin 
OldestReady 

Definition at line 138 of file commit.hh.

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

template<class Impl>
enum DefaultCommit::ThreadStatus

Individual thread status.

Enumerator
Running 
Idle 
ROBSquashing 
TrapPending 
FetchTrapPending 
SquashAfterPending 

Definition at line 128 of file commit.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

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 504 of file commit_impl.hh.

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

Handles any squashes that are sent from IEW, and adds instructions to the ROB and tries to commit instructions.

Definition at line 814 of file commit_impl.hh.

References DPRINTF, and FullSystem.

Referenced by DefaultCommit< Impl >::TrapEvent::process().

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

Tries to commit the head ROB instruction passed in.

Parameters
head_instThe instruction to be committed.

Definition at line 1138 of file commit_impl.hh.

References CPA::available(), CPA::cpa(), curTick(), DPRINTF, DTRACE, FullSystem, ArmISA::i, ThreadContext::nextInstAddr(), NoFault, panic, and CPA::swAutoBegin().

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

Commits as many instructions as possible.

Definition at line 969 of file commit_impl.hh.

References AlphaISA::advancePC(), X86ISA::count, DPRINTF, interrupt, NoFault, and pc.

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

Deschedules a thread from scheduling.

Definition at line 460 of file commit_impl.hh.

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

Initializes the draining of commit.

Definition at line 393 of file commit_impl.hh.

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

Resumes execution after draining.

Definition at line 400 of file commit_impl.hh.

template<class Impl >
void DefaultCommit< Impl >::drainSanityCheck ( ) const

Perform sanity checks after a drain.

Definition at line 408 of file commit_impl.hh.

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.

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

Generates an event to schedule a squash due to a trap.

Definition at line 529 of file commit_impl.hh.

References DPRINTF.

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

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

Definition at line 1421 of file commit_impl.hh.

References InvalidThreadID, and Running.

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

Gets instructions from rename and inserts them into the ROB.

Definition at line 1308 of file commit_impl.hh.

References DPRINTF.

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

Handles processing an interrupt.

Definition at line 735 of file commit_impl.hh.

References DPRINTF, interrupt, and NoFault.

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

Returns the PC of a specific thread.

Definition at line 337 of file commit.hh.

References DefaultCommit< Impl >::pc.

template<class Impl >
bool DefaultCommit< Impl >::isDrained ( ) const

Has the stage drained?

Definition at line 416 of file commit_impl.hh.

References interrupt, NoFault, and pc.

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

Marks completed instructions using information sent from IEW.

Definition at line 1344 of file commit_impl.hh.

References DPRINTF.

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

Reads the micro PC of a specific thread.

Definition at line 343 of file commit.hh.

References DefaultCommit< Impl >::pc.

template<class Impl >
std::string DefaultCommit< Impl >::name ( ) const

Returns the name of the DefaultCommit.

Definition at line 165 of file commit_impl.hh.

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

Returns the next PC of a specific thread.

Definition at line 340 of file commit.hh.

References DefaultCommit< Impl >::pc.

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

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

Definition at line 522 of file commit_impl.hh.

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

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

Definition at line 1485 of file commit_impl.hh.

References InvalidThreadID, and Running.

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

Reads the PC of a specific thread.

Definition at line 330 of file commit.hh.

References DefaultCommit< Impl >::pc.

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

Sets the PC of a specific thread.

Definition at line 333 of file commit.hh.

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

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

Get fetch redirecting so we can handle an interrupt.

Definition at line 789 of file commit_impl.hh.

References interrupt, and NoFault.

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

Registers probes.

Definition at line 172 of file commit_impl.hh.

template<class Impl >
void DefaultCommit< Impl >::regStats ( )

Registers statistics.

Definition at line 181 of file commit_impl.hh.

References Stats::dist, name(), Stats::pdf, and Stats::total.

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

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

Definition at line 1457 of file commit_impl.hh.

References InvalidThreadID, and Running.

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

Sets pointer to list of active threads.

Definition at line 350 of file commit_impl.hh.

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

Definition at line 313 of file commit_impl.hh.

References TimeBuffer< T >::getWire().

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

Sets the pointer to the queue coming from IEW.

Definition at line 333 of file commit_impl.hh.

References TimeBuffer< T >::getWire().

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

Sets the pointer to the IEW stage.

Definition at line 343 of file commit_impl.hh.

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

Sets pointer to the commited state rename map.

Definition at line 357 of file commit_impl.hh.

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

Sets the pointer to the queue coming from rename.

Definition at line 323 of file commit_impl.hh.

References TimeBuffer< T >::getWire().

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

Sets pointer to the ROB.

Definition at line 365 of file commit_impl.hh.

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

Sets the list of threads.

Definition at line 293 of file commit_impl.hh.

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

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

Definition at line 300 of file commit_impl.hh.

References TimeBuffer< T >::getWire().

template<class Impl >
void DefaultCommit< Impl >::squashAfter ( ThreadID  tid,
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 DPRINTF.

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

Squashes all in flight instructions.

Definition at line 555 of file commit_impl.hh.

References pc.

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

Handles a squash from a squashAfter() request.

Definition at line 626 of file commit_impl.hh.

References DPRINTF, and pc.

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

Handles squashing due to an TC write.

Definition at line 609 of file commit_impl.hh.

References DPRINTF, and pc.

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

Handles squashing due to a trap.

Definition at line 591 of file commit_impl.hh.

References DPRINTF, and pc.

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

Initializes stage by sending back the number of free entries.

Definition at line 372 of file commit_impl.hh.

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

Takes over from another CPU's thread.

Definition at line 444 of file commit_impl.hh.

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

Ticks the commit stage, which tries to commit instructions.

Definition at line 656 of file commit_impl.hh.

References DPRINTF, and Running.

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

Updates commit stats based on this instruction.

Definition at line 1365 of file commit_impl.hh.

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

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

Definition at line 473 of file commit_impl.hh.

References DPRINTF.

Member Data Documentation

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

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

Definition at line 148 of file commit.hh.

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

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

Overall commit status.

Definition at line 146 of file commit.hh.

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

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

Pointer to the list of active threads.

Definition at line 477 of file commit.hh.

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

template<class Impl>
Stats::Scalar DefaultCommit< Impl >::branchMispredicts
private

Stat for the total number of branch mispredicts that caused a squash.

Definition at line 502 of file commit.hh.

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

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

Definition at line 483 of file commit.hh.

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

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

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

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

template<class Impl>
Stats::Scalar DefaultCommit< Impl >::commitEligibleSamples
private

Number of cycles where the commit bandwidth limit is reached.

Definition at line 530 of file commit.hh.

template<class Impl>
Stats::Scalar DefaultCommit< Impl >::commitNonSpecStalls
private

Stat for the total number of times commit has had to stall due to a non- speculative instruction reaching the head of the ROB.

Definition at line 500 of file commit.hh.

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

Commit policy used in SMT mode.

Definition at line 152 of file commit.hh.

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

template<class Impl>
Stats::Scalar DefaultCommit< Impl >::commitSquashedInsts
private

Stat for the total number of squashed instructions discarded by commit.

Definition at line 496 of file commit.hh.

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

Per-thread status.

Definition at line 150 of file commit.hh.

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

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

Records if there were any stores committed this cycle.

Definition at line 470 of file commit.hh.

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

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

Commit to IEW delay.

Definition at line 414 of file commit.hh.

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

Commit width, in instructions.

Definition at line 427 of file commit.hh.

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

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

Pointer to O3CPU.

Definition at line 377 of file commit.hh.

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

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

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

Definition at line 355 of file commit.hh.

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

Definition at line 419 of file commit.hh.

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

Definition at line 357 of file commit.hh.

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

Wire to read information from IEW queue.

Definition at line 363 of file commit.hh.

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

Wire to read information from rename queue.

Definition at line 369 of file commit.hh.

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

IEW instruction queue interface.

Definition at line 360 of file commit.hh.

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

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

IEW to Commit delay.

Definition at line 411 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::instsCommitted
private

Total number of instructions committed.

Definition at line 507 of file commit.hh.

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

The interrupt fault.

Definition at line 453 of file commit.hh.

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

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

The sequence number of the last commited instruction.

Definition at line 464 of file commit.hh.

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

template<class Impl>
Stats::Distribution DefaultCommit< Impl >::numCommittedDist
private

Distribution of the number of committed instructions each cycle.

Definition at line 504 of file commit.hh.

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

Number of Reorder Buffers.

Definition at line 430 of file commit.hh.

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

Number of Active Threads.

Definition at line 433 of file commit.hh.

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

template<class Impl>
Stats::Vector DefaultCommit< Impl >::opsCommitted
private

Total number of ops (including micro ops) committed.

Definition at line 509 of file commit.hh.

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

The commit PC state of each thread.

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

Definition at line 458 of file commit.hh.

Referenced by DefaultCommit< Impl >::DefaultCommit(), DefaultCommit< Impl >::instAddr(), DefaultCommit< Impl >::microPC(), DefaultCommit< Impl >::nextInstAddr(), and DefaultCommit< Impl >::pcState().

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

Probe Points.

Definition at line 155 of file commit.hh.

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

Definition at line 156 of file commit.hh.

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

To probe when an instruction is squashed.

Definition at line 158 of file commit.hh.

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

Priority List used for Commit Policy.

Definition at line 408 of file commit.hh.

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

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

Rename map interface.

Definition at line 480 of file commit.hh.

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

Rename instruction queue interface, for ROB.

Definition at line 366 of file commit.hh.

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

Rename to ROB delay.

Definition at line 417 of file commit.hh.

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

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

ROB interface.

Definition at line 373 of file commit.hh.

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

Wire to read information from IEW (for ROB).

Definition at line 353 of file commit.hh.

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

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

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComBranches
private

Total number of committed branches.

Definition at line 519 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComFloating
private

Total number of floating point instructions.

Definition at line 521 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComFunctionCalls
private

Total number of function calls.

Definition at line 525 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComInteger
private

Total number of integer instructions.

Definition at line 523 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComLoads
private

Stat for the total number of committed loads.

Definition at line 515 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComMembars
private

Total number of committed memory barriers.

Definition at line 517 of file commit.hh.

template<class Impl>
Stats::Vector2d DefaultCommit< Impl >::statCommittedInstType
private

Committed instructions by instruction type (OpClass)

Definition at line 527 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComRefs
private

Stat for the total number of committed memory references.

Definition at line 513 of file commit.hh.

template<class Impl>
Stats::Vector DefaultCommit< Impl >::statComSwp
private

Total number of software prefetches committed.

Definition at line 511 of file commit.hh.

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

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

Definition at line 396 of file commit.hh.

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

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

Vector of all of the threads.

Definition at line 380 of file commit.hh.

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

Time buffer interface.

Definition at line 347 of file commit.hh.

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

Wire to write information heading to previous stages.

Definition at line 350 of file commit.hh.

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

Records if there is a trap currently in flight.

Definition at line 467 of file commit.hh.

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

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

The latency to handle a trap.

Used when scheduling trap squash event.

Definition at line 450 of file commit.hh.

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

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

Definition at line 393 of file commit.hh.

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

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

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

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

Definition at line 461 of file commit.hh.


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

Generated on Fri Jun 9 2017 13:04:07 for gem5 by doxygen 1.8.6