gem5  v21.1.0.2
Classes | Public Member Functions | Public Attributes | Static Protected Member Functions | Protected Attributes | List of all members
gem5::o3::LSQ Class Reference

#include <lsq.hh>

Classes

class  DcachePort
 DcachePort class for the load/store queue. More...
 
class  HtmCmdRequest
 
class  LSQRequest
 Memory operation metadata. More...
 
class  LSQSenderState
 Derived class to hold any sender state the LSQ needs. More...
 
class  SingleDataRequest
 
class  SplitDataRequest
 

Public Member Functions

 LSQ (CPU *cpu_ptr, IEW *iew_ptr, const O3CPUParams &params)
 Constructs an LSQ with the given parameters. More...
 
std::string name () const
 Returns the name of the LSQ. More...
 
void setActiveThreads (std::list< ThreadID > *at_ptr)
 Sets the pointer to the list of active threads. More...
 
void drainSanityCheck () const
 Perform sanity checks after a drain. More...
 
bool isDrained () const
 Has the LSQ drained? More...
 
void takeOverFrom ()
 Takes over execution from another CPU's thread. More...
 
int entryAmount (ThreadID num_threads)
 Number of entries needed for the given amount of threads. More...
 
void tick ()
 Ticks the LSQ. More...
 
void insertLoad (const DynInstPtr &load_inst)
 Inserts a load into the LSQ. More...
 
void insertStore (const DynInstPtr &store_inst)
 Inserts a store into the LSQ. More...
 
Fault executeLoad (const DynInstPtr &inst)
 Executes a load. More...
 
Fault executeStore (const DynInstPtr &inst)
 Executes a store. More...
 
void commitLoads (InstSeqNum &youngest_inst, ThreadID tid)
 Commits loads up until the given sequence number for a specific thread. More...
 
void commitStores (InstSeqNum &youngest_inst, ThreadID tid)
 Commits stores up until the given sequence number for a specific thread. More...
 
void writebackStores ()
 Attempts to write back stores until all cache ports are used or the interface becomes blocked. More...
 
void writebackStores (ThreadID tid)
 Same as above, but only for one thread. More...
 
void squash (const InstSeqNum &squashed_num, ThreadID tid)
 Squash instructions from a thread until the specified sequence number. More...
 
bool violation ()
 Returns whether or not there was a memory ordering violation. More...
 
bool violation (ThreadID tid)
 Returns whether or not there was a memory ordering violation for a specific thread. More...
 
DynInstPtr getMemDepViolator (ThreadID tid)
 Gets the instruction that caused the memory ordering violation. More...
 
int getLoadHead (ThreadID tid)
 Returns the head index of the load queue for a specific thread. More...
 
InstSeqNum getLoadHeadSeqNum (ThreadID tid)
 Returns the sequence number of the head of the load queue. More...
 
int getStoreHead (ThreadID tid)
 Returns the head index of the store queue. More...
 
InstSeqNum getStoreHeadSeqNum (ThreadID tid)
 Returns the sequence number of the head of the store queue. More...
 
int getCount ()
 Returns the number of instructions in all of the queues. More...
 
int getCount (ThreadID tid)
 Returns the number of instructions in the queues of one thread. More...
 
int numLoads ()
 Returns the total number of loads in the load queue. More...
 
int numLoads (ThreadID tid)
 Returns the total number of loads for a single thread. More...
 
int numStores ()
 Returns the total number of stores in the store queue. More...
 
int numStores (ThreadID tid)
 Returns the total number of stores for a single thread. More...
 
int numHtmStarts (ThreadID tid) const
 
int numHtmStops (ThreadID tid) const
 
void resetHtmStartsStops (ThreadID tid)
 
uint64_t getLatestHtmUid (ThreadID tid) const
 
void setLastRetiredHtmUid (ThreadID tid, uint64_t htmUid)
 
unsigned numFreeLoadEntries ()
 Returns the number of free load entries. More...
 
unsigned numFreeStoreEntries ()
 Returns the number of free store entries. More...
 
unsigned numFreeEntries (ThreadID tid)
 Returns the number of free entries for a specific thread. More...
 
unsigned numFreeLoadEntries (ThreadID tid)
 Returns the number of free entries in the LQ for a specific thread. More...
 
unsigned numFreeStoreEntries (ThreadID tid)
 Returns the number of free entries in the SQ for a specific thread. More...
 
bool isFull ()
 Returns if the LSQ is full (either LQ or SQ is full). More...
 
bool isFull (ThreadID tid)
 Returns if the LSQ is full for a specific thread (either LQ or SQ is full). More...
 
bool isEmpty () const
 Returns if the LSQ is empty (both LQ and SQ are empty). More...
 
bool lqEmpty () const
 Returns if all of the LQs are empty. More...
 
bool sqEmpty () const
 Returns if all of the SQs are empty. More...
 
bool lqFull ()
 Returns if any of the LQs are full. More...
 
bool lqFull (ThreadID tid)
 Returns if the LQ of a given thread is full. More...
 
bool sqFull ()
 Returns if any of the SQs are full. More...
 
bool sqFull (ThreadID tid)
 Returns if the SQ of a given thread is full. More...
 
bool isStalled ()
 Returns if the LSQ is stalled due to a memory operation that must be replayed. More...
 
bool isStalled (ThreadID tid)
 Returns if the LSQ of a specific thread is stalled due to a memory operation that must be replayed. More...
 
bool hasStoresToWB ()
 Returns whether or not there are any stores to write back to memory. More...
 
bool hasStoresToWB (ThreadID tid)
 Returns whether or not a specific thread has any stores to write back to memory. More...
 
int numStoresToWB (ThreadID tid)
 Returns the number of stores a specific thread has to write back. More...
 
bool willWB ()
 Returns if the LSQ will write back to memory this cycle. More...
 
bool willWB (ThreadID tid)
 Returns if the LSQ of a specific thread will write back to memory this cycle. More...
 
void dumpInsts () const
 Debugging function to print out all instructions. More...
 
void dumpInsts (ThreadID tid) const
 Debugging function to print out instructions from a specific thread. More...
 
Fault read (LSQRequest *req, int load_idx)
 Executes a read operation, using the load specified at the load index. More...
 
Fault write (LSQRequest *req, uint8_t *data, int store_idx)
 Executes a store operation, using the store specified at the store index. More...
 
void recvReqRetry ()
 Retry the previous send that failed. More...
 
void completeDataAccess (PacketPtr pkt)
 
bool recvTimingResp (PacketPtr pkt)
 Handles writing back and completing the load or store that has returned from memory. More...
 
void recvTimingSnoopReq (PacketPtr pkt)
 
Fault pushRequest (const DynInstPtr &inst, bool isLoad, uint8_t *data, unsigned int size, Addr addr, Request::Flags flags, uint64_t *res, AtomicOpFunctorPtr amo_op, const std::vector< bool > &byte_enable)
 
bool cacheBlocked () const
 Is D-cache blocked? More...
 
void cacheBlocked (bool v)
 Set D-cache blocked status. More...
 
bool cachePortAvailable (bool is_load) const
 Is any store port available to use? More...
 
void cachePortBusy (bool is_load)
 Another store port is in use. More...
 
RequestPortgetDataPort ()
 

Public Attributes

CPUcpu
 The CPU pointer. More...
 
IEWiewStage
 The IEW stage pointer. More...
 

Static Protected Member Functions

static uint32_t maxLSQAllocation (SMTQueuePolicy pol, uint32_t entries, uint32_t numThreads, uint32_t SMTThreshold)
 Auxiliary function to calculate per-thread max LSQ allocation limit. More...
 

Protected Attributes

bool _cacheBlocked
 D-cache is blocked. More...
 
int cacheStorePorts
 The number of cache ports available each cycle (stores only). More...
 
int usedStorePorts
 The number of used cache ports in this cycle by stores. More...
 
int cacheLoadPorts
 The number of cache ports available each cycle (loads only). More...
 
int usedLoadPorts
 The number of used cache ports in this cycle by loads. More...
 
SMTQueuePolicy lsqPolicy
 The LSQ policy for SMT mode. More...
 
std::list< ThreadID > * activeThreads
 List of Active Threads in System. More...
 
unsigned LQEntries
 Total Size of LQ Entries. More...
 
unsigned SQEntries
 Total Size of SQ Entries. More...
 
unsigned maxLQEntries
 Max LQ Size - Used to Enforce Sharing Policies. More...
 
unsigned maxSQEntries
 Max SQ Size - Used to Enforce Sharing Policies. More...
 
DcachePort dcachePort
 Data port. More...
 
std::vector< LSQUnitthread
 The LSQ units for individual threads. More...
 
ThreadID numThreads
 Number of Threads. More...
 

Detailed Description

Definition at line 75 of file lsq.hh.

Constructor & Destructor Documentation

◆ LSQ()

gem5::o3::LSQ::LSQ ( CPU cpu_ptr,
IEW iew_ptr,
const O3CPUParams &  params 
)

Constructs an LSQ with the given parameters.

Definition at line 81 of file lsq.cc.

References cpu, dcachePort, DPRINTF, lsqPolicy, maxLQEntries, maxSQEntries, gem5::o3::MaxThreads, numThreads, panic, and thread.

Member Function Documentation

◆ cacheBlocked() [1/2]

bool gem5::o3::LSQ::cacheBlocked ( ) const

Is D-cache blocked?

Definition at line 194 of file lsq.cc.

References _cacheBlocked.

Referenced by recvReqRetry(), and gem5::o3::LSQUnit::trySendPacket().

◆ cacheBlocked() [2/2]

void gem5::o3::LSQ::cacheBlocked ( bool  v)

Set D-cache blocked status.

Definition at line 200 of file lsq.cc.

References _cacheBlocked, and gem5::ArmISA::v.

◆ cachePortAvailable()

bool gem5::o3::LSQ::cachePortAvailable ( bool  is_load) const

Is any store port available to use?

Definition at line 206 of file lsq.cc.

References cacheLoadPorts, cacheStorePorts, usedLoadPorts, and usedStorePorts.

Referenced by cachePortBusy(), gem5::o3::LSQUnit::trySendPacket(), and gem5::o3::LSQUnit::writebackStores().

◆ cachePortBusy()

void gem5::o3::LSQ::cachePortBusy ( bool  is_load)

Another store port is in use.

Definition at line 218 of file lsq.cc.

References cachePortAvailable(), usedLoadPorts, and usedStorePorts.

Referenced by gem5::o3::LSQUnit::trySendPacket().

◆ commitLoads()

void gem5::o3::LSQ::commitLoads ( InstSeqNum youngest_inst,
ThreadID  tid 
)

Commits loads up until the given sequence number for a specific thread.

Definition at line 261 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::tick().

◆ commitStores()

void gem5::o3::LSQ::commitStores ( InstSeqNum youngest_inst,
ThreadID  tid 
)

Commits stores up until the given sequence number for a specific thread.

Definition at line 267 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::tick().

◆ completeDataAccess()

void gem5::o3::LSQ::completeDataAccess ( PacketPtr  pkt)

Definition at line 403 of file lsq.cc.

References gem5::BaseCPU::contextToThread(), cpu, gem5::Packet::senderState, and thread.

◆ drainSanityCheck()

void gem5::o3::LSQ::drainSanityCheck ( ) const

Perform sanity checks after a drain.

Definition at line 145 of file lsq.cc.

References isDrained(), numThreads, and thread.

Referenced by gem5::o3::IEW::drainSanityCheck().

◆ dumpInsts() [1/2]

void gem5::o3::LSQ::dumpInsts ( ) const

Debugging function to print out all instructions.

Definition at line 755 of file lsq.cc.

References activeThreads, and thread.

◆ dumpInsts() [2/2]

void gem5::o3::LSQ::dumpInsts ( ThreadID  tid) const

Debugging function to print out instructions from a specific thread.

Definition at line 768 of file lsq.cc.

References thread.

◆ entryAmount()

int gem5::o3::LSQ::entryAmount ( ThreadID  num_threads)

Number of entries needed for the given amount of threads.

◆ executeLoad()

Fault gem5::o3::LSQ::executeLoad ( const DynInstPtr inst)

Executes a load.

Definition at line 245 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::executeInsts().

◆ executeStore()

Fault gem5::o3::LSQ::executeStore ( const DynInstPtr inst)

Executes a store.

Definition at line 253 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::executeInsts().

◆ getCount() [1/2]

int gem5::o3::LSQ::getCount ( )

Returns the number of instructions in all of the queues.

Definition at line 464 of file lsq.cc.

References activeThreads, and gem5::statistics::total.

Referenced by gem5::o3::CPU::removeThread(), and gem5::o3::IEW::tick().

◆ getCount() [2/2]

int gem5::o3::LSQ::getCount ( ThreadID  tid)

Returns the number of instructions in the queues of one thread.

Definition at line 345 of file lsq.cc.

References thread.

◆ getDataPort()

RequestPort& gem5::o3::LSQ::getDataPort ( )
inline

◆ getLatestHtmUid()

uint64_t gem5::o3::LSQ::getLatestHtmUid ( ThreadID  tid) const

Definition at line 376 of file lsq.cc.

References gem5::InvalidThreadID, and thread.

Referenced by gem5::o3::IEW::dispatchInsts().

◆ getLoadHead()

int gem5::o3::LSQ::getLoadHead ( ThreadID  tid)

Returns the head index of the load queue for a specific thread.

Definition at line 322 of file lsq.cc.

References thread.

◆ getLoadHeadSeqNum()

InstSeqNum gem5::o3::LSQ::getLoadHeadSeqNum ( ThreadID  tid)

Returns the sequence number of the head of the load queue.

Definition at line 328 of file lsq.cc.

References thread.

◆ getMemDepViolator()

DynInstPtr gem5::o3::LSQ::getMemDepViolator ( ThreadID  tid)

Gets the instruction that caused the memory ordering violation.

Definition at line 316 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::executeInsts().

◆ getStoreHead()

int gem5::o3::LSQ::getStoreHead ( ThreadID  tid)

Returns the head index of the store queue.

Definition at line 334 of file lsq.cc.

References thread.

◆ getStoreHeadSeqNum()

InstSeqNum gem5::o3::LSQ::getStoreHeadSeqNum ( ThreadID  tid)

Returns the sequence number of the head of the store queue.

Definition at line 340 of file lsq.cc.

References thread.

◆ hasStoresToWB() [1/2]

bool gem5::o3::LSQ::hasStoresToWB ( )

Returns whether or not there are any stores to write back to memory.

Definition at line 705 of file lsq.cc.

References activeThreads.

Referenced by gem5::o3::IEW::hasStoresToWB().

◆ hasStoresToWB() [2/2]

bool gem5::o3::LSQ::hasStoresToWB ( ThreadID  tid)

Returns whether or not a specific thread has any stores to write back to memory.

Definition at line 721 of file lsq.cc.

References thread.

◆ insertLoad()

void gem5::o3::LSQ::insertLoad ( const DynInstPtr load_inst)

Inserts a load into the LSQ.

Definition at line 229 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::dispatchInsts().

◆ insertStore()

void gem5::o3::LSQ::insertStore ( const DynInstPtr store_inst)

Inserts a store into the LSQ.

Definition at line 237 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::dispatchInsts().

◆ isDrained()

bool gem5::o3::LSQ::isDrained ( ) const

Has the LSQ drained?

Definition at line 154 of file lsq.cc.

References DPRINTF, lqEmpty(), and sqEmpty().

Referenced by drainSanityCheck(), and gem5::o3::IEW::isDrained().

◆ isEmpty()

bool gem5::o3::LSQ::isEmpty ( ) const

Returns if the LSQ is empty (both LQ and SQ are empty).

Definition at line 588 of file lsq.cc.

References lqEmpty(), and sqEmpty().

◆ isFull() [1/2]

bool gem5::o3::LSQ::isFull ( )

Returns if the LSQ is full (either LQ or SQ is full).

Definition at line 561 of file lsq.cc.

References activeThreads, lqFull(), sqFull(), and thread.

Referenced by isFull().

◆ isFull() [2/2]

bool gem5::o3::LSQ::isFull ( ThreadID  tid)

Returns if the LSQ is full for a specific thread (either LQ or SQ is full).

Definition at line 577 of file lsq.cc.

References isFull(), lsqPolicy, and thread.

◆ isStalled() [1/2]

bool gem5::o3::LSQ::isStalled ( )

Returns if the LSQ is stalled due to a memory operation that must be replayed.

Definition at line 680 of file lsq.cc.

References activeThreads, and thread.

Referenced by isStalled().

◆ isStalled() [2/2]

bool gem5::o3::LSQ::isStalled ( ThreadID  tid)

Returns if the LSQ of a specific thread is stalled due to a memory operation that must be replayed.

Definition at line 696 of file lsq.cc.

References isStalled(), lsqPolicy, and thread.

◆ lqEmpty()

bool gem5::o3::LSQ::lqEmpty ( ) const

Returns if all of the LQs are empty.

Definition at line 594 of file lsq.cc.

References activeThreads, and thread.

Referenced by isDrained(), and isEmpty().

◆ lqFull() [1/2]

bool gem5::o3::LSQ::lqFull ( )

Returns if any of the LQs are full.

Definition at line 626 of file lsq.cc.

References activeThreads, and thread.

Referenced by gem5::o3::IEW::dispatchInsts(), isFull(), and lqFull().

◆ lqFull() [2/2]

bool gem5::o3::LSQ::lqFull ( ThreadID  tid)

Returns if the LQ of a given thread is full.

Definition at line 642 of file lsq.cc.

References lqFull(), lsqPolicy, and thread.

◆ maxLSQAllocation()

static uint32_t gem5::o3::LSQ::maxLSQAllocation ( SMTQueuePolicy  pol,
uint32_t  entries,
uint32_t  numThreads,
uint32_t  SMTThreshold 
)
inlinestaticprotected

Auxiliary function to calculate per-thread max LSQ allocation limit.

Depending on a policy, number of entries and possibly number of threads and threshold, this function calculates how many resources each thread can occupy at most.

Definition at line 1034 of file lsq.hh.

References numThreads.

◆ name()

std::string gem5::o3::LSQ::name ( ) const

Returns the name of the LSQ.

Definition at line 132 of file lsq.cc.

References iewStage, and gem5::o3::IEW::name().

◆ numFreeEntries()

unsigned gem5::o3::LSQ::numFreeEntries ( ThreadID  tid)

Returns the number of free entries for a specific thread.

◆ numFreeLoadEntries() [1/2]

unsigned gem5::o3::LSQ::numFreeLoadEntries ( )

◆ numFreeLoadEntries() [2/2]

unsigned gem5::o3::LSQ::numFreeLoadEntries ( ThreadID  tid)

Returns the number of free entries in the LQ for a specific thread.

Definition at line 549 of file lsq.cc.

References thread.

◆ numFreeStoreEntries() [1/2]

unsigned gem5::o3::LSQ::numFreeStoreEntries ( )

◆ numFreeStoreEntries() [2/2]

unsigned gem5::o3::LSQ::numFreeStoreEntries ( ThreadID  tid)

Returns the number of free entries in the SQ for a specific thread.

Definition at line 555 of file lsq.cc.

References thread.

◆ numHtmStarts()

int gem5::o3::LSQ::numHtmStarts ( ThreadID  tid) const

Definition at line 352 of file lsq.cc.

References gem5::InvalidThreadID, and thread.

Referenced by gem5::o3::IEW::dispatchInsts().

◆ numHtmStops()

int gem5::o3::LSQ::numHtmStops ( ThreadID  tid) const

Definition at line 360 of file lsq.cc.

References gem5::InvalidThreadID, and thread.

Referenced by gem5::o3::IEW::dispatchInsts().

◆ numLoads() [1/2]

int gem5::o3::LSQ::numLoads ( )

Returns the total number of loads in the load queue.

Definition at line 481 of file lsq.cc.

References activeThreads, and gem5::statistics::total.

◆ numLoads() [2/2]

int gem5::o3::LSQ::numLoads ( ThreadID  tid)

Returns the total number of loads for a single thread.

Definition at line 347 of file lsq.cc.

References thread.

◆ numStores() [1/2]

int gem5::o3::LSQ::numStores ( )

Returns the total number of stores in the store queue.

Definition at line 498 of file lsq.cc.

References activeThreads, thread, and gem5::statistics::total.

◆ numStores() [2/2]

int gem5::o3::LSQ::numStores ( ThreadID  tid)

Returns the total number of stores for a single thread.

Definition at line 349 of file lsq.cc.

References thread.

◆ numStoresToWB()

int gem5::o3::LSQ::numStoresToWB ( ThreadID  tid)

Returns the number of stores a specific thread has to write back.

Definition at line 727 of file lsq.cc.

References thread.

Referenced by writebackStores().

◆ pushRequest()

Fault gem5::o3::LSQ::pushRequest ( const DynInstPtr inst,
bool  isLoad,
uint8_t *  data,
unsigned int  size,
Addr  addr,
Request::Flags  flags,
uint64_t *  res,
AtomicOpFunctorPtr  amo_op,
const std::vector< bool > &  byte_enable 
)

◆ read()

Fault gem5::o3::LSQ::read ( LSQRequest req,
int  load_idx 
)

Executes a read operation, using the load specified at the load index.

Definition at line 1424 of file lsq.cc.

References gem5::BaseCPU::contextToThread(), cpu, gem5::o3::LSQ::LSQRequest::request(), and thread.

Referenced by gem5::o3::CPU::read().

◆ recvReqRetry()

void gem5::o3::LSQ::recvReqRetry ( )

Retry the previous send that failed.

Definition at line 392 of file lsq.cc.

References activeThreads, cacheBlocked(), gem5::o3::IEW::cacheUnblocked(), iewStage, and thread.

◆ recvTimingResp()

bool gem5::o3::LSQ::recvTimingResp ( PacketPtr  pkt)

Handles writing back and completing the load or store that has returned from memory.

Parameters
pktResponse packet from the memory sub-system

Definition at line 411 of file lsq.cc.

References gem5::BaseCPU::contextToThread(), cpu, DPRINTF, gem5::Packet::getAddr(), gem5::Packet::isError(), gem5::Packet::isInvalidate(), numThreads, panic_if, gem5::Packet::senderState, and thread.

◆ recvTimingSnoopReq()

void gem5::o3::LSQ::recvTimingSnoopReq ( PacketPtr  pkt)

◆ resetHtmStartsStops()

void gem5::o3::LSQ::resetHtmStartsStops ( ThreadID  tid)

Definition at line 369 of file lsq.cc.

References gem5::InvalidThreadID, and thread.

Referenced by gem5::o3::CPU::htmSendAbortSignal().

◆ setActiveThreads()

void gem5::o3::LSQ::setActiveThreads ( std::list< ThreadID > *  at_ptr)

Sets the pointer to the list of active threads.

Definition at line 138 of file lsq.cc.

References activeThreads.

Referenced by gem5::o3::IEW::setActiveThreads().

◆ setLastRetiredHtmUid()

void gem5::o3::LSQ::setLastRetiredHtmUid ( ThreadID  tid,
uint64_t  htmUid 
)

Definition at line 385 of file lsq.cc.

References gem5::InvalidThreadID, and thread.

Referenced by gem5::o3::IEW::setLastRetiredHtmUid().

◆ sqEmpty()

bool gem5::o3::LSQ::sqEmpty ( ) const

Returns if all of the SQs are empty.

Definition at line 610 of file lsq.cc.

References activeThreads, and thread.

Referenced by isDrained(), and isEmpty().

◆ sqFull() [1/2]

bool gem5::o3::LSQ::sqFull ( )

Returns if any of the SQs are full.

Definition at line 653 of file lsq.cc.

References activeThreads.

Referenced by gem5::o3::IEW::dispatchInsts(), isFull(), and sqFull().

◆ sqFull() [2/2]

bool gem5::o3::LSQ::sqFull ( ThreadID  tid)

Returns if the SQ of a given thread is full.

Definition at line 669 of file lsq.cc.

References lsqPolicy, sqFull(), and thread.

◆ squash()

void gem5::o3::LSQ::squash ( const InstSeqNum squashed_num,
ThreadID  tid 
)

Squash instructions from a thread until the specified sequence number.

Definition at line 291 of file lsq.cc.

References thread.

Referenced by gem5::o3::IEW::squash().

◆ takeOverFrom()

void gem5::o3::LSQ::takeOverFrom ( )

Takes over execution from another CPU's thread.

Definition at line 172 of file lsq.cc.

References _cacheBlocked, numThreads, thread, and usedStorePorts.

Referenced by gem5::o3::IEW::takeOverFrom().

◆ tick()

void gem5::o3::LSQ::tick ( )

Ticks the LSQ.

Definition at line 183 of file lsq.cc.

References _cacheBlocked, cacheLoadPorts, gem5::o3::IEW::cacheUnblocked(), iewStage, usedLoadPorts, and usedStorePorts.

Referenced by gem5::o3::IEW::tick().

◆ violation() [1/2]

bool gem5::o3::LSQ::violation ( )

Returns whether or not there was a memory ordering violation.

Definition at line 297 of file lsq.cc.

References activeThreads, and thread.

Referenced by gem5::o3::IEW::executeInsts().

◆ violation() [2/2]

bool gem5::o3::LSQ::violation ( ThreadID  tid)

Returns whether or not there was a memory ordering violation for a specific thread.

Definition at line 313 of file lsq.cc.

References thread.

◆ willWB() [1/2]

bool gem5::o3::LSQ::willWB ( )

Returns if the LSQ will write back to memory this cycle.

Definition at line 733 of file lsq.cc.

References activeThreads.

Referenced by gem5::o3::IEW::updateStatus().

◆ willWB() [2/2]

bool gem5::o3::LSQ::willWB ( ThreadID  tid)

Returns if the LSQ of a specific thread will write back to memory this cycle.

Definition at line 749 of file lsq.cc.

References thread.

◆ write()

Fault gem5::o3::LSQ::write ( LSQRequest req,
uint8_t *  data,
int  store_idx 
)

Executes a store operation, using the store specified at the store index.

Definition at line 1432 of file lsq.cc.

References gem5::BaseCPU::contextToThread(), cpu, data, gem5::o3::LSQ::LSQRequest::request(), and thread.

Referenced by gem5::o3::CPU::write().

◆ writebackStores() [1/2]

void gem5::o3::LSQ::writebackStores ( )

Attempts to write back stores until all cache ports are used or the interface becomes blocked.

Definition at line 273 of file lsq.cc.

References activeThreads, DPRINTF, numStoresToWB(), and thread.

Referenced by gem5::o3::IEW::tick().

◆ writebackStores() [2/2]

void gem5::o3::LSQ::writebackStores ( ThreadID  tid)

Same as above, but only for one thread.

Member Data Documentation

◆ _cacheBlocked

bool gem5::o3::LSQ::_cacheBlocked
protected

D-cache is blocked.

Definition at line 1014 of file lsq.hh.

Referenced by cacheBlocked(), takeOverFrom(), and tick().

◆ activeThreads

std::list<ThreadID>* gem5::o3::LSQ::activeThreads
protected

◆ cacheLoadPorts

int gem5::o3::LSQ::cacheLoadPorts
protected

The number of cache ports available each cycle (loads only).

Definition at line 1020 of file lsq.hh.

Referenced by cachePortAvailable(), and tick().

◆ cacheStorePorts

int gem5::o3::LSQ::cacheStorePorts
protected

The number of cache ports available each cycle (stores only).

Definition at line 1016 of file lsq.hh.

Referenced by cachePortAvailable().

◆ cpu

CPU* gem5::o3::LSQ::cpu

◆ dcachePort

DcachePort gem5::o3::LSQ::dcachePort
protected

Data port.

Definition at line 1066 of file lsq.hh.

Referenced by getDataPort(), and LSQ().

◆ iewStage

IEW* gem5::o3::LSQ::iewStage

The IEW stage pointer.

Definition at line 999 of file lsq.hh.

Referenced by name(), recvReqRetry(), and tick().

◆ LQEntries

unsigned gem5::o3::LSQ::LQEntries
protected

Total Size of LQ Entries.

Definition at line 1055 of file lsq.hh.

◆ lsqPolicy

SMTQueuePolicy gem5::o3::LSQ::lsqPolicy
protected

The LSQ policy for SMT mode.

Definition at line 1026 of file lsq.hh.

Referenced by isFull(), isStalled(), lqFull(), LSQ(), and sqFull().

◆ maxLQEntries

unsigned gem5::o3::LSQ::maxLQEntries
protected

Max LQ Size - Used to Enforce Sharing Policies.

Definition at line 1060 of file lsq.hh.

Referenced by LSQ().

◆ maxSQEntries

unsigned gem5::o3::LSQ::maxSQEntries
protected

Max SQ Size - Used to Enforce Sharing Policies.

Definition at line 1063 of file lsq.hh.

Referenced by LSQ().

◆ numThreads

ThreadID gem5::o3::LSQ::numThreads
protected

Number of Threads.

Definition at line 1072 of file lsq.hh.

Referenced by drainSanityCheck(), LSQ(), maxLSQAllocation(), recvTimingResp(), recvTimingSnoopReq(), and takeOverFrom().

◆ SQEntries

unsigned gem5::o3::LSQ::SQEntries
protected

Total Size of SQ Entries.

Definition at line 1057 of file lsq.hh.

◆ thread

std::vector<LSQUnit> gem5::o3::LSQ::thread
protected

◆ usedLoadPorts

int gem5::o3::LSQ::usedLoadPorts
protected

The number of used cache ports in this cycle by loads.

Definition at line 1022 of file lsq.hh.

Referenced by cachePortAvailable(), cachePortBusy(), and tick().

◆ usedStorePorts

int gem5::o3::LSQ::usedStorePorts
protected

The number of used cache ports in this cycle by stores.

Definition at line 1018 of file lsq.hh.

Referenced by cachePortAvailable(), cachePortBusy(), takeOverFrom(), and tick().


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

Generated on Tue Sep 21 2021 12:31:45 for gem5 by doxygen 1.8.17