gem5
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | List of all members
DefaultIEW< Impl > Class Template Reference

DefaultIEW handles both single threaded and SMT IEW (issue/execute/writeback). More...

#include <iew.hh>

Public Types

enum  Status { Active, Inactive }
 Overall IEW stage status. More...
 
enum  StageStatus {
  Running, Blocked, Idle, StartSquash,
  Squashing, Unblocking
}
 Status for Issue, Execute, and Writeback stages. More...
 

Public Member Functions

 DefaultIEW (O3CPU *_cpu, DerivO3CPUParams *params)
 Constructs a DefaultIEW with the given parameters. More...
 
std::string name () const
 Returns the name of the DefaultIEW stage. More...
 
void regStats ()
 Registers statistics. More...
 
void regProbePoints ()
 Registers probes. More...
 
void startupStage ()
 Initializes stage; sends back the number of free IQ and LSQ entries. More...
 
void setTimeBuffer (TimeBuffer< TimeStruct > *tb_ptr)
 Sets main time buffer used for backwards communication. More...
 
void setRenameQueue (TimeBuffer< RenameStruct > *rq_ptr)
 Sets time buffer for getting instructions coming from rename. More...
 
void setIEWQueue (TimeBuffer< IEWStruct > *iq_ptr)
 Sets time buffer to pass on instructions to commit. More...
 
void setActiveThreads (std::list< ThreadID > *at_ptr)
 Sets pointer to list of active threads. More...
 
void setScoreboard (Scoreboard *sb_ptr)
 Sets pointer to the scoreboard. 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 squash (ThreadID tid)
 Squashes instructions in IEW for a specific thread. More...
 
void wakeDependents (DynInstPtr &inst)
 Wakes all dependents of a completed instruction. More...
 
void rescheduleMemInst (DynInstPtr &inst)
 Tells memory dependence unit that a memory instruction needs to be rescheduled. More...
 
void replayMemInst (DynInstPtr &inst)
 Re-executes all rescheduled memory instructions. More...
 
void blockMemInst (DynInstPtr &inst)
 Moves memory instruction onto the list of cache blocked instructions. More...
 
void cacheUnblocked ()
 Notifies that the cache has become unblocked. More...
 
void instToCommit (DynInstPtr &inst)
 Sends an instruction to commit through the time buffer. More...
 
void skidInsert (ThreadID tid)
 Inserts unused instructions of a thread into the skid buffer. More...
 
int skidCount ()
 Returns the max of the number of entries in all of the skid buffers. More...
 
bool skidsEmpty ()
 Returns if all of the skid buffers are empty. More...
 
void updateStatus ()
 Updates overall IEW status based on all of the stages' statuses. More...
 
void resetEntries ()
 Resets entries of the IQ and the LSQ. More...
 
void wakeCPU ()
 Tells the CPU to wakeup if it has descheduled itself due to no activity. More...
 
void activityThisCycle ()
 Reports to the CPU that there is activity this cycle. More...
 
void activateStage ()
 Tells CPU that the IEW stage is active and running. More...
 
void deactivateStage ()
 Tells CPU that the IEW stage is inactive and idle. More...
 
bool hasStoresToWB ()
 Returns if the LSQ has any stores to writeback. More...
 
bool hasStoresToWB (ThreadID tid)
 Returns if the LSQ has any stores to writeback. More...
 
void checkMisprediction (DynInstPtr &inst)
 Check misprediction. More...
 
void tick ()
 Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and Writeback to run for one cycle. More...
 

Public Attributes

IQ instQueue
 Instruction queue. More...
 
LSQ ldstQueue
 Load / store queue. More...
 
FUPoolfuPool
 Pointer to the functional unit pool. More...
 
bool updateLSQNextCycle
 Records if the LSQ needs to be updated on the next cycle, so that IEW knows if there will be activity on the next cycle. More...
 

Private Types

typedef Impl::CPUPol CPUPol
 
typedef Impl::DynInstPtr DynInstPtr
 
typedef Impl::O3CPU O3CPU
 
typedef CPUPol::IQ IQ
 
typedef CPUPol::RenameMap RenameMap
 
typedef CPUPol::LSQ LSQ
 
typedef CPUPol::TimeStruct TimeStruct
 
typedef CPUPol::IEWStruct IEWStruct
 
typedef CPUPol::RenameStruct RenameStruct
 
typedef CPUPol::IssueStruct IssueStruct
 

Private Member Functions

void squashDueToBranch (DynInstPtr &inst, ThreadID tid)
 Sends commit proper information for a squash due to a branch mispredict. More...
 
void squashDueToMemOrder (DynInstPtr &inst, ThreadID tid)
 Sends commit proper information for a squash due to a memory order violation. More...
 
void block (ThreadID tid)
 Sets Dispatch to blocked, and signals back to other stages to block. More...
 
void unblock (ThreadID tid)
 Unblocks Dispatch if the skid buffer is empty, and signals back to other stages to unblock. More...
 
void dispatch (ThreadID tid)
 Determines proper actions to take given Dispatch's status. More...
 
void dispatchInsts (ThreadID tid)
 Dispatches instructions to IQ and LSQ. More...
 
void executeInsts ()
 Executes instructions. More...
 
void writebackInsts ()
 Writebacks instructions. More...
 
unsigned validInstsFromRename ()
 Returns the number of valid, non-squashed instructions coming from rename to dispatch. More...
 
bool checkStall (ThreadID tid)
 Checks if any of the stall conditions are currently true. More...
 
void checkSignalsAndUpdate (ThreadID tid)
 Processes inputs and changes state accordingly. More...
 
void emptyRenameInsts (ThreadID tid)
 Removes instructions from rename from a thread's instruction list. More...
 
void sortInsts ()
 Sorts instructions coming from rename into lists separated by thread. More...
 
void updateExeInstStats (DynInstPtr &inst)
 Updates execution stats based on the instruction. More...
 
void printAvailableInsts ()
 Debug function to print instructions that are issued this cycle. More...
 

Private Attributes

Status _status
 Overall stage status. More...
 
StageStatus dispatchStatus [Impl::MaxThreads]
 Dispatch status. More...
 
StageStatus exeStatus
 Execute status. More...
 
StageStatus wbStatus
 Writeback status. More...
 
ProbePointArg< DynInstPtr > * ppMispredict
 Probe points. More...
 
ProbePointArg< DynInstPtr > * ppDispatch
 
ProbePointArg< DynInstPtr > * ppExecute
 To probe when instruction execution begins. More...
 
ProbePointArg< DynInstPtr > * ppToCommit
 To probe when instruction execution is complete. More...
 
TimeBuffer< TimeStruct > * timeBuffer
 Pointer to main time buffer used for backwards communication. More...
 
TimeBuffer< TimeStruct >::wire toFetch
 Wire to write information heading to previous stages. More...
 
TimeBuffer< TimeStruct >::wire fromCommit
 Wire to get commit's output from backwards time buffer. More...
 
TimeBuffer< TimeStruct >::wire toRename
 Wire to write information heading to previous stages. More...
 
TimeBuffer< RenameStruct > * renameQueue
 Rename instruction queue interface. More...
 
TimeBuffer< RenameStruct >::wire fromRename
 Wire to get rename's output from rename queue. More...
 
TimeBuffer< IssueStructissueToExecQueue
 Issue stage queue. More...
 
TimeBuffer< IssueStruct >::wire fromIssue
 Wire to read information from the issue stage time queue. More...
 
TimeBuffer< IEWStruct > * iewQueue
 IEW stage time buffer. More...
 
TimeBuffer< IEWStruct >::wire toCommit
 Wire to write infromation heading to commit. More...
 
std::queue< DynInstPtrinsts [Impl::MaxThreads]
 Queue of all instructions coming from rename this cycle. More...
 
std::queue< DynInstPtrskidBuffer [Impl::MaxThreads]
 Skid buffer between rename and IEW. More...
 
Scoreboardscoreboard
 Scoreboard pointer. More...
 
O3CPUcpu
 CPU pointer. More...
 
bool wroteToTimeBuffer
 Records if IEW has written to the time buffer this cycle, so that the CPU can deschedule itself if there is no activity. More...
 
bool fetchRedirect [Impl::MaxThreads]
 Records if there is a fetch redirect on this cycle for each thread. More...
 
bool updatedQueues
 Records if the queues have been changed (inserted or issued insts), so that IEW knows to broadcast the updated amount of free entries. More...
 
Cycles commitToIEWDelay
 Commit to IEW delay. More...
 
Cycles renameToIEWDelay
 Rename to IEW delay. More...
 
Cycles issueToExecuteDelay
 Issue to execute delay. More...
 
unsigned dispatchWidth
 Width of dispatch, in instructions. More...
 
unsigned issueWidth
 Width of issue, in instructions. More...
 
unsigned wbNumInst
 Index into queue of instructions being written back. More...
 
unsigned wbCycle
 Cycle number within the queue of instructions being written back. More...
 
unsigned wbWidth
 Writeback width. More...
 
ThreadID numThreads
 Number of active threads. More...
 
std::list< ThreadID > * activeThreads
 Pointer to list of active threads. More...
 
unsigned skidBufferMax
 Maximum size of the skid buffer. More...
 
Stats::Scalar iewIdleCycles
 Stat for total number of idle cycles. More...
 
Stats::Scalar iewSquashCycles
 Stat for total number of squashing cycles. More...
 
Stats::Scalar iewBlockCycles
 Stat for total number of blocking cycles. More...
 
Stats::Scalar iewUnblockCycles
 Stat for total number of unblocking cycles. More...
 
Stats::Scalar iewDispatchedInsts
 Stat for total number of instructions dispatched. More...
 
Stats::Scalar iewDispSquashedInsts
 Stat for total number of squashed instructions dispatch skips. More...
 
Stats::Scalar iewDispLoadInsts
 Stat for total number of dispatched load instructions. More...
 
Stats::Scalar iewDispStoreInsts
 Stat for total number of dispatched store instructions. More...
 
Stats::Scalar iewDispNonSpecInsts
 Stat for total number of dispatched non speculative instructions. More...
 
Stats::Scalar iewIQFullEvents
 Stat for number of times the IQ becomes full. More...
 
Stats::Scalar iewLSQFullEvents
 Stat for number of times the LSQ becomes full. More...
 
Stats::Scalar memOrderViolationEvents
 Stat for total number of memory ordering violation events. More...
 
Stats::Scalar predictedTakenIncorrect
 Stat for total number of incorrect predicted taken branches. More...
 
Stats::Scalar predictedNotTakenIncorrect
 Stat for total number of incorrect predicted not taken branches. More...
 
Stats::Formula branchMispredicts
 Stat for total number of mispredicted branches detected at execute. More...
 
Stats::Scalar iewExecutedInsts
 Stat for total number of executed instructions. More...
 
Stats::Vector iewExecLoadInsts
 Stat for total number of executed load instructions. More...
 
Stats::Scalar iewExecSquashedInsts
 Stat for total number of executed store instructions. More...
 
Stats::Vector iewExecutedSwp
 Number of executed software prefetches. More...
 
Stats::Vector iewExecutedNop
 Number of executed nops. More...
 
Stats::Vector iewExecutedRefs
 Number of executed meomory references. More...
 
Stats::Vector iewExecutedBranches
 Number of executed branches. More...
 
Stats::Formula iewExecStoreInsts
 Number of executed store instructions. More...
 
Stats::Formula iewExecRate
 Number of instructions executed per cycle. More...
 
Stats::Vector iewInstsToCommit
 Number of instructions sent to commit. More...
 
Stats::Vector writebackCount
 Number of instructions that writeback. More...
 
Stats::Vector producerInst
 Number of instructions that wake consumers. More...
 
Stats::Vector consumerInst
 Number of instructions that wake up from producers. More...
 
Stats::Formula wbRate
 Number of instructions per cycle written back. More...
 
Stats::Formula wbFanout
 Average number of woken instructions per writeback. More...
 

Detailed Description

template<class Impl>
class DefaultIEW< Impl >

DefaultIEW handles both single threaded and SMT IEW (issue/execute/writeback).

It handles the dispatching of instructions to the LSQ/IQ as part of the issue stage, and has the IQ try to issue instructions each cycle. The execute latency is actually tied into the issue latency to allow the IQ to be able to do back-to-back scheduling without having to speculatively schedule instructions. This happens by having the IQ have access to the functional units, and the IQ gets the execution latencies from the FUs when it issues instructions. Instructions reach the execute stage on the last cycle of their execution, which is when the IQ knows to wake up any dependent instructions, allowing back to back scheduling. The execute portion of IEW separates memory instructions from non-memory instructions, either telling the LSQ to execute the instruction, or executing the instruction directly. The writeback portion of IEW completes the instructions by waking up any dependents, and marking the register ready on the scoreboard.

Definition at line 80 of file iew.hh.

Member Typedef Documentation

template<class Impl >
typedef Impl::CPUPol DefaultIEW< Impl >::CPUPol
private

Definition at line 84 of file iew.hh.

template<class Impl >
typedef Impl::DynInstPtr DefaultIEW< Impl >::DynInstPtr
private

Definition at line 85 of file iew.hh.

template<class Impl >
typedef CPUPol::IEWStruct DefaultIEW< Impl >::IEWStruct
private

Definition at line 93 of file iew.hh.

template<class Impl >
typedef CPUPol::IQ DefaultIEW< Impl >::IQ
private

Definition at line 88 of file iew.hh.

template<class Impl >
typedef CPUPol::IssueStruct DefaultIEW< Impl >::IssueStruct
private

Definition at line 95 of file iew.hh.

template<class Impl >
typedef CPUPol::LSQ DefaultIEW< Impl >::LSQ
private

Definition at line 90 of file iew.hh.

template<class Impl >
typedef Impl::O3CPU DefaultIEW< Impl >::O3CPU
private

Definition at line 86 of file iew.hh.

template<class Impl >
typedef CPUPol::RenameMap DefaultIEW< Impl >::RenameMap
private

Definition at line 89 of file iew.hh.

template<class Impl >
typedef CPUPol::RenameStruct DefaultIEW< Impl >::RenameStruct
private

Definition at line 94 of file iew.hh.

template<class Impl >
typedef CPUPol::TimeStruct DefaultIEW< Impl >::TimeStruct
private

Definition at line 92 of file iew.hh.

Member Enumeration Documentation

template<class Impl >
enum DefaultIEW::StageStatus

Status for Issue, Execute, and Writeback stages.

Enumerator
Running 
Blocked 
Idle 
StartSquash 
Squashing 
Unblocking 

Definition at line 107 of file iew.hh.

template<class Impl >
enum DefaultIEW::Status

Overall IEW stage status.

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

Enumerator
Active 
Inactive 

Definition at line 101 of file iew.hh.

Constructor & Destructor Documentation

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

Member Function Documentation

template<class Impl >
void DefaultIEW< Impl >::activateStage ( )
inline

Tells CPU that the IEW stage is active and running.

Definition at line 885 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::activityThisCycle ( )

Reports to the CPU that there is activity this cycle.

Definition at line 877 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::block ( ThreadID  tid)
private

Sets Dispatch to blocked, and signals back to other stages to block.

Definition at line 533 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::blockMemInst ( DynInstPtr inst)

Moves memory instruction onto the list of cache blocked instructions.

Definition at line 590 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::cacheUnblocked ( )

Notifies that the cache has become unblocked.

Definition at line 597 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::checkMisprediction ( DynInstPtr inst)

Check misprediction.

Definition at line 1612 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::checkSignalsAndUpdate ( ThreadID  tid)
private

Processes inputs and changes state accordingly.

Definition at line 771 of file iew_impl.hh.

References DPRINTF, and Running.

template<class Impl >
bool DefaultIEW< Impl >::checkStall ( ThreadID  tid)
private

Checks if any of the stall conditions are currently true.

Definition at line 754 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::deactivateStage ( )
inline

Tells CPU that the IEW stage is inactive and idle.

Definition at line 893 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::dispatch ( ThreadID  tid)
private

Determines proper actions to take given Dispatch's status.

Definition at line 901 of file iew_impl.hh.

References DPRINTF, and Running.

template<class Impl >
void DefaultIEW< Impl >::dispatchInsts ( ThreadID  tid)
private

Dispatches instructions to IQ and LSQ.

Definition at line 949 of file iew_impl.hh.

References curTick(), DPRINTF, and Running.

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

Perform sanity checks after a drain.

Definition at line 410 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::emptyRenameInsts ( ThreadID  tid)
private

Removes instructions from rename from a thread's instruction list.

Definition at line 849 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::executeInsts ( )
private

Executes instructions.

In the case of memory operations, it informs the LSQ to execute the instructions. Also handles any redirects that occur due to the executed instructions.

Definition at line 1176 of file iew_impl.hh.

References DPRINTF, NoFault, panic, and Running.

template<class Impl >
bool DefaultIEW< Impl >::hasStoresToWB ( )
inline

Returns if the LSQ has any stores to writeback.

Definition at line 227 of file iew.hh.

References LSQ< Impl >::hasStoresToWB(), and DefaultIEW< Impl >::ldstQueue.

template<class Impl >
bool DefaultIEW< Impl >::hasStoresToWB ( ThreadID  tid)
inline

Returns if the LSQ has any stores to writeback.

Definition at line 230 of file iew.hh.

References LSQ< Impl >::hasStoresToWB(), and DefaultIEW< Impl >::ldstQueue.

template<class Impl >
void DefaultIEW< Impl >::instToCommit ( DynInstPtr inst)

Sends an instruction to commit through the time buffer.

Definition at line 604 of file iew_impl.hh.

References DPRINTF.

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

Has the stage drained?

Definition at line 381 of file iew_impl.hh.

References DPRINTF, and Running.

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

Returns the name of the DefaultIEW stage.

Definition at line 117 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::printAvailableInsts ( )
private

Debug function to print instructions that are issued this cycle.

Definition at line 1153 of file iew_impl.hh.

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

Registers probes.

Probe point with dynamic instruction as the argument used to probe when an instruction starts to execute.

Probe point with dynamic instruction as the argument used to probe when an instruction execution completes and it is marked ready to commit.

Definition at line 124 of file iew_impl.hh.

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

Registers statistics.

Definition at line 144 of file iew_impl.hh.

References name(), and Stats::total.

template<class Impl >
void DefaultIEW< Impl >::replayMemInst ( DynInstPtr inst)

Re-executes all rescheduled memory instructions.

Definition at line 583 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::rescheduleMemInst ( DynInstPtr inst)

Tells memory dependence unit that a memory instruction needs to be rescheduled.

It will re-execute once replayMemInst() is called.

Definition at line 576 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::resetEntries ( )

Resets entries of the IQ and the LSQ.

Definition at line 746 of file iew_impl.hh.

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

Sets pointer to list of active threads.

Definition at line 364 of file iew_impl.hh.

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

Sets time buffer to pass on instructions to commit.

Definition at line 354 of file iew_impl.hh.

References TimeBuffer< T >::getWire().

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

Sets time buffer for getting instructions coming from rename.

Definition at line 344 of file iew_impl.hh.

References TimeBuffer< T >::getWire().

template<class Impl >
void DefaultIEW< Impl >::setScoreboard ( Scoreboard sb_ptr)

Sets pointer to the scoreboard.

Definition at line 374 of file iew_impl.hh.

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

Sets main time buffer used for backwards communication.

Definition at line 326 of file iew_impl.hh.

References TimeBuffer< T >::getWire().

template<class Impl >
int DefaultIEW< Impl >::skidCount ( )

Returns the max of the number of entries in all of the skid buffers.

Definition at line 669 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::skidInsert ( ThreadID  tid)

Inserts unused instructions of a thread into the skid buffer.

Definition at line 647 of file iew_impl.hh.

References DPRINTF, and X86ISA::size().

template<class Impl >
bool DefaultIEW< Impl >::skidsEmpty ( )

Returns if all of the skid buffers are empty.

Definition at line 688 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::sortInsts ( )
private

Sorts instructions coming from rename into lists separated by thread.

Definition at line 835 of file iew_impl.hh.

References ArmISA::i.

template<class Impl >
void DefaultIEW< Impl >::squash ( ThreadID  tid)

Squashes instructions in IEW for a specific thread.

Definition at line 448 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
void DefaultIEW< Impl >::squashDueToBranch ( DynInstPtr inst,
ThreadID  tid 
)
private

Sends commit proper information for a squash due to a branch mispredict.

Definition at line 481 of file iew_impl.hh.

References AlphaISA::advancePC(), DPRINTF, and pc.

template<class Impl >
void DefaultIEW< Impl >::squashDueToMemOrder ( DynInstPtr inst,
ThreadID  tid 
)
private

Sends commit proper information for a squash due to a memory order violation.

Definition at line 506 of file iew_impl.hh.

References DPRINTF.

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

Initializes stage; sends back the number of free IQ and LSQ entries.

Definition at line 304 of file iew_impl.hh.

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

Takes over from another CPU's thread.

Definition at line 420 of file iew_impl.hh.

References ArmISA::i, and Running.

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

Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and Writeback to run for one cycle.

Definition at line 1452 of file iew_impl.hh.

References DPRINTF, and Running.

template<class Impl >
void DefaultIEW< Impl >::unblock ( ThreadID  tid)
private

Unblocks Dispatch if the skid buffer is empty, and signals back to other stages to unblock.

Definition at line 552 of file iew_impl.hh.

References DPRINTF, and Running.

template<class Impl >
void DefaultIEW< Impl >::updateExeInstStats ( DynInstPtr inst)
private

Updates execution stats based on the instruction.

Definition at line 1580 of file iew_impl.hh.

References curTick(), and DTRACE.

template<class Impl >
void DefaultIEW< Impl >::updateStatus ( )

Updates overall IEW status based on all of the stages' statuses.

Definition at line 705 of file iew_impl.hh.

References DPRINTF.

template<class Impl >
unsigned DefaultIEW< Impl >::validInstsFromRename ( )
private

Returns the number of valid, non-squashed instructions coming from rename to dispatch.

Definition at line 633 of file iew_impl.hh.

References ArmISA::i.

template<class Impl >
void DefaultIEW< Impl >::wakeCPU ( )

Tells the CPU to wakeup if it has descheduled itself due to no activity.

Used mainly by the LdWritebackEvent.

Definition at line 870 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::wakeDependents ( DynInstPtr inst)

Wakes all dependents of a completed instruction.

Definition at line 569 of file iew_impl.hh.

template<class Impl >
void DefaultIEW< Impl >::writebackInsts ( )
private

Writebacks instructions.

In our model, the instruction's execute() function atomically reads registers, executes, and writes registers. Thus this writeback only wakes up dependent instructions, and informs the scoreboard of registers becoming ready.

Definition at line 1406 of file iew_impl.hh.

References DPRINTF, ArmISA::i, and NoFault.

Member Data Documentation

template<class Impl >
Status DefaultIEW< Impl >::_status
private

Overall stage status.

Definition at line 118 of file iew.hh.

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

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

Pointer to list of active threads.

Definition at line 413 of file iew.hh.

template<class Impl >
Stats::Formula DefaultIEW< Impl >::branchMispredicts
private

Stat for total number of mispredicted branches detected at execute.

Definition at line 447 of file iew.hh.

template<class Impl >
Cycles DefaultIEW< Impl >::commitToIEWDelay
private

Commit to IEW delay.

Definition at line 378 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::consumerInst
private

Number of instructions that wake up from producers.

Definition at line 477 of file iew.hh.

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

CPU pointer.

Definition at line 344 of file iew.hh.

template<class Impl >
StageStatus DefaultIEW< Impl >::dispatchStatus[Impl::MaxThreads]
private

Dispatch status.

Definition at line 120 of file iew.hh.

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

template<class Impl >
unsigned DefaultIEW< Impl >::dispatchWidth
private

Width of dispatch, in instructions.

Definition at line 391 of file iew.hh.

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

template<class Impl >
StageStatus DefaultIEW< Impl >::exeStatus
private

Execute status.

Definition at line 122 of file iew.hh.

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

template<class Impl >
bool DefaultIEW< Impl >::fetchRedirect[Impl::MaxThreads]
private

Records if there is a fetch redirect on this cycle for each thread.

Definition at line 370 of file iew.hh.

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

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultIEW< Impl >::fromCommit
private

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

Definition at line 307 of file iew.hh.

template<class Impl >
TimeBuffer<IssueStruct>::wire DefaultIEW< Impl >::fromIssue
private

Wire to read information from the issue stage time queue.

Definition at line 322 of file iew.hh.

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

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

Wire to get rename's output from rename queue.

Definition at line 316 of file iew.hh.

template<class Impl >
FUPool* DefaultIEW< Impl >::fuPool

Pointer to the functional unit pool.

Definition at line 362 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewBlockCycles
private

Stat for total number of blocking cycles.

Definition at line 423 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewDispatchedInsts
private

Stat for total number of instructions dispatched.

Definition at line 427 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewDispLoadInsts
private

Stat for total number of dispatched load instructions.

Definition at line 431 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewDispNonSpecInsts
private

Stat for total number of dispatched non speculative instructions.

Definition at line 435 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewDispSquashedInsts
private

Stat for total number of squashed instructions dispatch skips.

Definition at line 429 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewDispStoreInsts
private

Stat for total number of dispatched store instructions.

Definition at line 433 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewExecLoadInsts
private

Stat for total number of executed load instructions.

Definition at line 452 of file iew.hh.

template<class Impl >
Stats::Formula DefaultIEW< Impl >::iewExecRate
private

Number of instructions executed per cycle.

Definition at line 468 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewExecSquashedInsts
private

Stat for total number of executed store instructions.

Stat for total number of squashed instructions skipped at execute.

Definition at line 456 of file iew.hh.

template<class Impl >
Stats::Formula DefaultIEW< Impl >::iewExecStoreInsts
private

Number of executed store instructions.

Definition at line 466 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewExecutedBranches
private

Number of executed branches.

Definition at line 464 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewExecutedInsts
private

Stat for total number of executed instructions.

Definition at line 450 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewExecutedNop
private

Number of executed nops.

Definition at line 460 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewExecutedRefs
private

Number of executed meomory references.

Definition at line 462 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewExecutedSwp
private

Number of executed software prefetches.

Definition at line 458 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewIdleCycles
private

Stat for total number of idle cycles.

Definition at line 419 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::iewInstsToCommit
private

Number of instructions sent to commit.

Definition at line 471 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewIQFullEvents
private

Stat for number of times the IQ becomes full.

Definition at line 437 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewLSQFullEvents
private

Stat for number of times the LSQ becomes full.

Definition at line 439 of file iew.hh.

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

IEW stage time buffer.

Holds ROB indices of instructions that can be marked as completed.

Definition at line 328 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewSquashCycles
private

Stat for total number of squashing cycles.

Definition at line 421 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::iewUnblockCycles
private

Stat for total number of unblocking cycles.

Definition at line 425 of file iew.hh.

template<class Impl >
IQ DefaultIEW< Impl >::instQueue

Instruction queue.

Definition at line 356 of file iew.hh.

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

template<class Impl >
std::queue<DynInstPtr> DefaultIEW< Impl >::insts[Impl::MaxThreads]
private

Queue of all instructions coming from rename this cycle.

Definition at line 334 of file iew.hh.

template<class Impl >
TimeBuffer<IssueStruct> DefaultIEW< Impl >::issueToExecQueue
private

Issue stage queue.

Definition at line 319 of file iew.hh.

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

template<class Impl >
Cycles DefaultIEW< Impl >::issueToExecuteDelay
private

Issue to execute delay.

What this actually represents is the amount of time it takes for an instruction to wake up, be scheduled, and sent to a FU for execution.

Definition at line 388 of file iew.hh.

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

template<class Impl >
unsigned DefaultIEW< Impl >::issueWidth
private

Width of issue, in instructions.

Definition at line 394 of file iew.hh.

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

template<class Impl >
LSQ DefaultIEW< Impl >::ldstQueue

Load / store queue.

Definition at line 359 of file iew.hh.

Referenced by DefaultIEW< Impl >::hasStoresToWB().

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::memOrderViolationEvents
private

Stat for total number of memory ordering violation events.

Definition at line 441 of file iew.hh.

template<class Impl >
ThreadID DefaultIEW< Impl >::numThreads
private

Number of active threads.

Definition at line 410 of file iew.hh.

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

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultIEW< Impl >::ppDispatch
private

Definition at line 128 of file iew.hh.

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultIEW< Impl >::ppExecute
private

To probe when instruction execution begins.

Definition at line 130 of file iew.hh.

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultIEW< Impl >::ppMispredict
private

Probe points.

Definition at line 127 of file iew.hh.

template<class Impl >
ProbePointArg<DynInstPtr>* DefaultIEW< Impl >::ppToCommit
private

To probe when instruction execution is complete.

Definition at line 132 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::predictedNotTakenIncorrect
private

Stat for total number of incorrect predicted not taken branches.

Definition at line 445 of file iew.hh.

template<class Impl >
Stats::Scalar DefaultIEW< Impl >::predictedTakenIncorrect
private

Stat for total number of incorrect predicted taken branches.

Definition at line 443 of file iew.hh.

template<class Impl >
Stats::Vector DefaultIEW< Impl >::producerInst
private

Number of instructions that wake consumers.

Definition at line 475 of file iew.hh.

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

Rename instruction queue interface.

Definition at line 313 of file iew.hh.

template<class Impl >
Cycles DefaultIEW< Impl >::renameToIEWDelay
private

Rename to IEW delay.

Definition at line 381 of file iew.hh.

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

template<class Impl >
Scoreboard* DefaultIEW< Impl >::scoreboard
private

Scoreboard pointer.

Definition at line 340 of file iew.hh.

template<class Impl >
std::queue<DynInstPtr> DefaultIEW< Impl >::skidBuffer[Impl::MaxThreads]
private

Skid buffer between rename and IEW.

Definition at line 337 of file iew.hh.

template<class Impl >
unsigned DefaultIEW< Impl >::skidBufferMax
private

Maximum size of the skid buffer.

Definition at line 416 of file iew.hh.

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

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

Pointer to main time buffer used for backwards communication.

Definition at line 301 of file iew.hh.

template<class Impl >
TimeBuffer<IEWStruct>::wire DefaultIEW< Impl >::toCommit
private

Wire to write infromation heading to commit.

Definition at line 331 of file iew.hh.

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultIEW< Impl >::toFetch
private

Wire to write information heading to previous stages.

Definition at line 304 of file iew.hh.

template<class Impl >
TimeBuffer<TimeStruct>::wire DefaultIEW< Impl >::toRename
private

Wire to write information heading to previous stages.

Definition at line 310 of file iew.hh.

template<class Impl >
bool DefaultIEW< Impl >::updatedQueues
private

Records if the queues have been changed (inserted or issued insts), so that IEW knows to broadcast the updated amount of free entries.

Definition at line 375 of file iew.hh.

template<class Impl >
bool DefaultIEW< Impl >::updateLSQNextCycle

Records if the LSQ needs to be updated on the next cycle, so that IEW knows if there will be activity on the next cycle.

Definition at line 366 of file iew.hh.

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

template<class Impl >
unsigned DefaultIEW< Impl >::wbCycle
private

Cycle number within the queue of instructions being written back.

Used in case there are too many instructions writing back at the current cycle and writesbacks need to be scheduled for the future. See comments in instToCommit().

Definition at line 404 of file iew.hh.

template<class Impl >
Stats::Formula DefaultIEW< Impl >::wbFanout
private

Average number of woken instructions per writeback.

Definition at line 481 of file iew.hh.

template<class Impl >
unsigned DefaultIEW< Impl >::wbNumInst
private

Index into queue of instructions being written back.

Definition at line 397 of file iew.hh.

template<class Impl >
Stats::Formula DefaultIEW< Impl >::wbRate
private

Number of instructions per cycle written back.

Definition at line 479 of file iew.hh.

template<class Impl >
StageStatus DefaultIEW< Impl >::wbStatus
private

Writeback status.

Definition at line 124 of file iew.hh.

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

template<class Impl >
unsigned DefaultIEW< Impl >::wbWidth
private

Writeback width.

Definition at line 407 of file iew.hh.

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

template<class Impl >
Stats::Vector DefaultIEW< Impl >::writebackCount
private

Number of instructions that writeback.

Definition at line 473 of file iew.hh.

template<class Impl >
bool DefaultIEW< Impl >::wroteToTimeBuffer
private

Records if IEW has written to the time buffer this cycle, so that the CPU can deschedule itself if there is no activity.

Definition at line 349 of file iew.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