Go to the documentation of this file.
41 #ifndef __CPU_O3_IEW_HH__
42 #define __CPU_O3_IEW_HH__
52 #include "debug/IEW.hh"
55 struct DerivO3CPUParams;
82 typedef typename Impl::CPUPol
CPUPol;
84 typedef typename Impl::O3CPU
O3CPU;
86 typedef typename CPUPol::IQ
IQ;
88 typedef typename CPUPol::LSQ
LSQ;
137 std::string
name()
const;
345 std::queue<DynInstPtr>
insts[Impl::MaxThreads];
495 #endif // __CPU_O3_IEW_HH__
void wakeCPU()
Tells the CPU to wakeup if it has descheduled itself due to no activity.
TimeBuffer< IssueStruct > issueToExecQueue
Issue stage queue.
unsigned wbCycle
Cycle number within the queue of instructions being written back.
Stats::Scalar iewExecSquashedInsts
Stat for total number of executed store instructions.
Stats::Formula wbRate
Number of instructions per cycle written back.
void takeOverFrom()
Takes over from another CPU's thread.
void emptyRenameInsts(ThreadID tid)
Removes instructions from rename from a thread's instruction list.
void checkSignalsAndUpdate(ThreadID tid)
Processes inputs and changes state accordingly.
unsigned wbWidth
Writeback width.
Stats::Scalar iewDispSquashedInsts
Stat for total number of squashed instructions dispatch skips.
void replayMemInst(const DynInstPtr &inst)
Re-executes all rescheduled memory instructions.
bool updateLSQNextCycle
Records if the LSQ needs to be updated on the next cycle, so that IEW knows if there will be activity...
CPUPol::TimeStruct TimeStruct
Stats::Vector producerInst
Number of instructions that wake consumers.
Stats::Scalar predictedTakenIncorrect
Stat for total number of incorrect predicted taken branches.
void activityThisCycle()
Reports to the CPU that there is activity this cycle.
int16_t ThreadID
Thread index/ID type.
void setActiveThreads(std::list< ThreadID > *at_ptr)
Sets pointer to list of active threads.
Stats::Vector iewExecutedNop
Number of executed nops.
Stats::Scalar memOrderViolationEvents
Stat for total number of memory ordering violation events.
void regStats()
Registers statistics.
void updateExeInstStats(const DynInstPtr &inst)
Updates execution stats based on the instruction.
void setScoreboard(Scoreboard *sb_ptr)
Sets pointer to the scoreboard.
bool wroteToTimeBuffer
Records if IEW has written to the time buffer this cycle, so that the CPU can deschedule itself if th...
Cycles commitToIEWDelay
Commit to IEW delay.
StageStatus
Status for Issue, Execute, and Writeback stages.
Stats::Formula iewExecStoreInsts
Number of executed store instructions.
TimeBuffer< RenameStruct > * renameQueue
Rename instruction queue interface.
bool isDrained() const
Has the stage drained?
void writebackInsts()
Writebacks instructions.
std::string name() const
Returns the name of the DefaultIEW stage.
void setLastRetiredHtmUid(ThreadID tid, uint64_t htmUid)
void wakeDependents(const DynInstPtr &inst)
Wakes all dependents of a completed instruction.
int skidCount()
Returns the max of the number of entries in all of the skid buffers.
TimeBuffer< IEWStruct >::wire toCommit
Wire to write infromation heading to commit.
CPUPol::RenameStruct RenameStruct
Pool of FU's, specific to the new CPU model.
void squashDueToBranch(const DynInstPtr &inst, ThreadID tid)
Sends commit proper information for a squash due to a branch mispredict.
A vector of scalar stats.
void executeInsts()
Executes instructions.
void blockMemInst(const DynInstPtr &inst)
Moves memory instruction onto the list of cache blocked instructions.
Impl::DynInstPtr DynInstPtr
void sortInsts()
Sorts instructions coming from rename into lists separated by thread.
TimeBuffer< TimeStruct >::wire toRename
Wire to write information heading to previous stages.
void checkMisprediction(const DynInstPtr &inst)
Check misprediction
void clearStates(ThreadID tid)
Clear all thread-specific states.
ProbePointArg< DynInstPtr > * ppMispredict
Probe points.
Stats::Vector iewInstsToCommit
Number of instructions sent to commit.
void dispatch(ThreadID tid)
Determines proper actions to take given Dispatch's status.
void block(ThreadID tid)
Sets Dispatch to blocked, and signals back to other stages to block.
Stats::Scalar predictedNotTakenIncorrect
Stat for total number of incorrect predicted not taken branches.
This is a simple scalar statistic, like a counter.
void skidInsert(ThreadID tid)
Inserts unused instructions of a thread into the skid buffer.
TimeBuffer< RenameStruct >::wire fromRename
Wire to get rename's output from rename queue.
Stats::Formula branchMispredicts
Stat for total number of mispredicted branches detected at execute.
void setLastRetiredHtmUid(ThreadID tid, uint64_t htmUid)
LSQ ldstQueue
Load / store queue.
CPUPol::IEWStruct IEWStruct
void deactivateStage()
Tells CPU that the IEW stage is inactive and idle.
bool skidsEmpty()
Returns if all of the skid buffers are empty.
unsigned skidBufferMax
Maximum size of the skid buffer.
CPUPol::RenameMap RenameMap
void squashDueToMemOrder(const DynInstPtr &inst, ThreadID tid)
Sends commit proper information for a squash due to a memory order violation.
ProbePointArg< DynInstPtr > * ppExecute
To probe when instruction execution begins.
void resetEntries()
Resets entries of the IQ and the LSQ.
Stats::Scalar iewBlockCycles
Stat for total number of blocking cycles.
Stats::Formula wbFanout
Average number of woken instructions per writeback.
StageStatus dispatchStatus[Impl::MaxThreads]
Dispatch status.
void drainSanityCheck() const
Perform sanity checks after a drain.
unsigned issueWidth
Width of issue, in instructions.
bool fetchRedirect[Impl::MaxThreads]
Records if there is a fetch redirect on this cycle for each thread.
StageStatus exeStatus
Execute status.
Stats::Vector iewExecLoadInsts
Stat for total number of executed load instructions.
Stats::Vector consumerInst
Number of instructions that wake up from producers.
void regProbePoints()
Registers probes.
Stats::Scalar iewDispStoreInsts
Stat for total number of dispatched store instructions.
void updateStatus()
Updates overall IEW status based on all of the stages' statuses.
void setIEWQueue(TimeBuffer< IEWStruct > *iq_ptr)
Sets time buffer to pass on instructions to commit.
Status
Overall IEW stage status.
FUPool * fuPool
Pointer to the functional unit pool.
void setRenameQueue(TimeBuffer< RenameStruct > *rq_ptr)
Sets time buffer for getting instructions coming from rename.
Cycles renameToIEWDelay
Rename to IEW delay.
Stats::Vector iewExecutedBranches
Number of executed branches.
void setTimeBuffer(TimeBuffer< TimeStruct > *tb_ptr)
Sets main time buffer used for backwards communication.
void startupStage()
Initializes stage; sends back the number of free IQ and LSQ entries.
Scoreboard * scoreboard
Scoreboard pointer.
Stats::Scalar iewExecutedInsts
Stat for total number of executed instructions.
bool hasStoresToWB(ThreadID tid)
Returns if the LSQ has any stores to writeback.
void rescheduleMemInst(const DynInstPtr &inst)
Tells memory dependence unit that a memory instruction needs to be rescheduled.
void printAvailableInsts()
Debug function to print instructions that are issued this cycle.
Stats::Scalar iewIdleCycles
Stat for total number of idle cycles.
bool updatedQueues
Records if the queues have been changed (inserted or issued insts), so that IEW knows to broadcast th...
Stats::Scalar iewUnblockCycles
Stat for total number of unblocking cycles.
Stats::Vector iewExecutedRefs
Number of executed meomory references.
Stats::Scalar iewSquashCycles
Stat for total number of squashing cycles.
Stats::Formula iewExecRate
Number of instructions executed per cycle.
Stats::Scalar iewLSQFullEvents
Stat for number of times the LSQ becomes full.
void unblock(ThreadID tid)
Unblocks Dispatch if the skid buffer is empty, and signals back to other stages to unblock.
void squash(ThreadID tid)
Squashes instructions in IEW for a specific thread.
std::queue< DynInstPtr > insts[Impl::MaxThreads]
Queue of all instructions coming from rename this cycle.
bool checkStall(ThreadID tid)
Checks if any of the stall conditions are currently true.
Stats::Scalar iewIQFullEvents
Stat for number of times the IQ becomes full.
unsigned wbNumInst
Index into queue of instructions being written back.
std::list< ThreadID > * activeThreads
Pointer to list of active threads.
ThreadID numThreads
Number of active threads.
unsigned dispatchWidth
Width of dispatch, in instructions.
bool hasStoresToWB()
Returns whether or not there are any stores to write back to memory.
TimeBuffer< TimeStruct >::wire toFetch
Wire to write information heading to previous stages.
Cycles issueToExecuteDelay
Issue to execute delay.
TimeBuffer< TimeStruct > * timeBuffer
Pointer to main time buffer used for backwards communication.
DefaultIEW(O3CPU *_cpu, DerivO3CPUParams *params)
Constructs a DefaultIEW with the given parameters.
unsigned validInstsFromRename()
Returns the number of valid, non-squashed instructions coming from rename to dispatch.
TimeBuffer< IEWStruct > * iewQueue
IEW stage time buffer.
Stats::Vector iewExecutedSwp
Number of executed software prefetches.
Cycles is a wrapper class for representing cycle counts, i.e.
ProbePointArg< DynInstPtr > * ppToCommit
To probe when instruction execution is complete.
Stats::Vector writebackCount
Number of instructions that writeback.
IQ instQueue
Instruction queue.
bool hasStoresToWB()
Returns if the LSQ has any stores to writeback.
StageStatus wbStatus
Writeback status.
void instToCommit(const DynInstPtr &inst)
Sends an instruction to commit through the time buffer.
void activateStage()
Tells CPU that the IEW stage is active and running.
CPUPol::IssueStruct IssueStruct
void dispatchInsts(ThreadID tid)
Dispatches instructions to IQ and LSQ.
std::queue< DynInstPtr > skidBuffer[Impl::MaxThreads]
Skid buffer between rename and IEW.
ProbePointArg< DynInstPtr > * ppDispatch
Status _status
Overall stage status.
Stats::Scalar iewDispNonSpecInsts
Stat for total number of dispatched non speculative instructions.
void cacheUnblocked()
Notifies that the cache has become unblocked.
TimeBuffer< TimeStruct >::wire fromCommit
Wire to get commit's output from backwards time buffer.
Stats::Scalar iewDispLoadInsts
Stat for total number of dispatched load instructions.
TimeBuffer< IssueStruct >::wire fromIssue
Wire to read information from the issue stage time queue.
Implements a simple scoreboard to track which registers are ready.
Stats::Scalar iewDispatchedInsts
Stat for total number of instructions dispatched.
void tick()
Ticks IEW stage, causing Dispatch, the IQ, the LSQ, Execute, and Writeback to run for one cycle.
DefaultIEW handles both single threaded and SMT IEW (issue/execute/writeback).
Generated on Wed Sep 30 2020 14:02:09 for gem5 by doxygen 1.8.17