|
gem5 [DEVELOP-FOR-25.1]
|
#include <ftq.hh>
Classes | |
| struct | FTQStats |
Public Member Functions | |
| FTQ (CPU *_cpu, const BaseO3CPUParams ¶ms) | |
| FTQ constructor. | |
| std::string | name () const |
| void | regProbePoints () |
| Registers probes. | |
| void | resetState (ThreadID tid) |
| Reset the FTQ state. | |
| unsigned | numFreeEntries (ThreadID tid) |
| Returns the number of free entries in a specific FTQ paritition. | |
| unsigned | size (ThreadID tid) |
| Returns the size of the ftq for a specific partition. | |
| bool | isFull (ThreadID tid) |
| Returns whether or not a specific thread's queue is full. | |
| bool | isEmpty (ThreadID tid) const |
| Returns whether or not a specific thread's queue is empty. | |
| void | invalidate (ThreadID tid) |
| Invalidates all fetch targets in the FTQ. | |
| bool | isReady (ThreadID tid) |
| Returns if the FTQ is in a ready state and its safe to consmume fetch targets. | |
| void | lock (ThreadID tid) |
| Locks the fetch target queue for a given thread. | |
| bool | isLocked (ThreadID tid) |
| Check if the FTQ is locked. | |
| void | forAllForward (ThreadID tid, std::function< void(FetchTargetPtr &)> f) |
| Iterates forward over all fetch targets in the FTQ from head/front to tail/back and applies a given function. | |
| void | forAllBackward (ThreadID tid, std::function< void(FetchTargetPtr &)> f) |
| Iterates backward over all fetch targets in the FTQ from tail/back to head/front and applies a given function. | |
| void | insert (ThreadID tid, FetchTargetPtr fetchTarget) |
| Pushes a fetch target into the back/tail of the FTQ. | |
| void | squash (ThreadID tid) |
| Squashes all fetch targets in the FTQ for a specific thread. | |
| void | squashSanityCheck (ThreadID tid) |
| Sanity check to verify that the fetch targets in the ftq do not have a valid bpu_history. | |
| bool | isHeadReady (ThreadID tid) |
| Is the head entry ready for the fetch stage to be consumed. | |
| FetchTargetPtr | readHead (ThreadID tid) |
| Returns a pointer to the head fetch target of a specific thread within the FTQ. | |
| bool | popHead (ThreadID tid) |
| Pops the head fetch target once its fully processed. | |
| void | printFTQ (ThreadID tid) |
| Print the all fetch targets in the FTQ for debugging. | |
Private Types | |
| enum | Status { Invalid , Valid , Full , Locked } |
| Possible FTQ statuses. More... | |
Private Attributes | |
| std::array< Status, MaxThreads > | ftqStatus |
| Per-thread FTQ status. | |
| CPU * | cpu |
| Pointer to the CPU. | |
| const unsigned | numEntries |
| Number of fetch targets in the FTQ. | |
| ProbePointArg< FetchTargetPtr > * | ppFTQInsert |
| Probe points to attach the FDP prefetcher. | |
| ProbePointArg< FetchTargetPtr > * | ppFTQRemove |
| std::array< std::list< FetchTargetPtr >, MaxThreads > | ftq |
| FTQ List of Fetch targets. | |
| gem5::o3::FTQ::FTQStats | stats |
|
private |
| gem5::o3::FTQ::FTQ | ( | CPU * | _cpu, |
| const BaseO3CPUParams & | params ) |
FTQ constructor.
Fetch Target Queue Methods --------------------------—.
| _cpu | The cpu object pointer. |
| params | The cpu params incl. several FTQ-specific parameters. |
Definition at line 86 of file ftq.cc.
References cpu, gem5::o3::MaxThreads, numEntries, resetState(), and stats.
Referenced by insert(), popHead(), and printFTQ().
| void gem5::o3::FTQ::forAllBackward | ( | ThreadID | tid, |
| std::function< void(FetchTargetPtr &)> | f ) |
Iterates backward over all fetch targets in the FTQ from tail/back to head/front and applies a given function.
Definition at line 178 of file ftq.cc.
References gem5::ArmISA::f, and ftq.
| void gem5::o3::FTQ::forAllForward | ( | ThreadID | tid, |
| std::function< void(FetchTargetPtr &)> | f ) |
Iterates forward over all fetch targets in the FTQ from head/front to tail/back and applies a given function.
Definition at line 170 of file ftq.cc.
References gem5::ArmISA::f, and ftq.
| void gem5::o3::FTQ::insert | ( | ThreadID | tid, |
| FetchTargetPtr | fetchTarget ) |
Pushes a fetch target into the back/tail of the FTQ.
| fetchTarget | Pointer to the fetch target to be inserted. |
Definition at line 186 of file ftq.cc.
References DPRINTF, FTQ(), ftq, numEntries, ppFTQInsert, size(), and stats.
| void gem5::o3::FTQ::invalidate | ( | ThreadID | tid | ) |
| bool gem5::o3::FTQ::isEmpty | ( | ThreadID | tid | ) | const |
| bool gem5::o3::FTQ::isFull | ( | ThreadID | tid | ) |
Returns whether or not a specific thread's queue is full.
Definition at line 131 of file ftq.cc.
References ftq, and numEntries.
| bool gem5::o3::FTQ::isHeadReady | ( | ThreadID | tid | ) |
| bool gem5::o3::FTQ::isLocked | ( | ThreadID | tid | ) |
| bool gem5::o3::FTQ::isReady | ( | ThreadID | tid | ) |
| void gem5::o3::FTQ::lock | ( | ThreadID | tid | ) |
| unsigned gem5::o3::FTQ::numFreeEntries | ( | ThreadID | tid | ) |
Returns the number of free entries in a specific FTQ paritition.
Definition at line 119 of file ftq.cc.
References ftq, and numEntries.
| bool gem5::o3::FTQ::popHead | ( | ThreadID | tid | ) |
Pops the head fetch target once its fully processed.
In case there is still a branch history attached to the head fetch target the FTQ goes into invalid state.
Definition at line 238 of file ftq.cc.
References DPRINTF, FTQ(), ftq, ftqStatus, Invalid, Locked, ppFTQRemove, and stats.
| void gem5::o3::FTQ::printFTQ | ( | ThreadID | tid | ) |
| FetchTargetPtr gem5::o3::FTQ::readHead | ( | ThreadID | tid | ) |
| void gem5::o3::FTQ::regProbePoints | ( | ) |
Registers probes.
Definition at line 110 of file ftq.cc.
References cpu, ppFTQInsert, and ppFTQRemove.
| void gem5::o3::FTQ::resetState | ( | ThreadID | tid | ) |
| unsigned gem5::o3::FTQ::size | ( | ThreadID | tid | ) |
| void gem5::o3::FTQ::squash | ( | ThreadID | tid | ) |
| void gem5::o3::FTQ::squashSanityCheck | ( | ThreadID | tid | ) |
|
private |
Pointer to the CPU.
Definition at line 251 of file ftq.hh.
Referenced by FTQ(), gem5::o3::FTQ::FTQStats::FTQStats(), name(), and regProbePoints().
|
private |
Definition at line 261 of file ftq.hh.
Referenced by forAllBackward(), forAllForward(), insert(), invalidate(), isEmpty(), isFull(), isHeadReady(), numFreeEntries(), popHead(), printFTQ(), readHead(), resetState(), size(), squash(), and squashSanityCheck().
|
private |
Per-thread FTQ status.
Definition at line 248 of file ftq.hh.
Referenced by invalidate(), isHeadReady(), isLocked(), isReady(), lock(), popHead(), readHead(), resetState(), and squash().
|
private |
|
private |
Probe points to attach the FDP prefetcher.
Definition at line 257 of file ftq.hh.
Referenced by insert(), and regProbePoints().
|
private |
Definition at line 258 of file ftq.hh.
Referenced by popHead(), regProbePoints(), and squash().
|
private |