gem5  v22.1.0.0
Public Member Functions | Public Attributes | List of all members
gem5::minor::LSQ::StoreBuffer Class Reference

Store buffer. More...

#include <lsq.hh>

Inheritance diagram for gem5::minor::LSQ::StoreBuffer:
gem5::Named

Public Member Functions

 StoreBuffer (std::string name_, LSQ &lsq_, unsigned int store_buffer_size, unsigned int store_limit_per_cycle)
 
bool canInsert () const
 Can a new request be inserted into the queue? More...
 
void deleteRequest (LSQRequestPtr request)
 Delete the given request and free the slot it occupied. More...
 
void insert (LSQRequestPtr request)
 Insert a request at the back of the queue. More...
 
AddrRangeCoverage canForwardDataToLoad (LSQRequestPtr request, unsigned int &found_slot)
 Look for a store which satisfies the given load. More...
 
void forwardStoreData (LSQRequestPtr load, unsigned int slot_number)
 Fill the given packet with appropriate date from slot slot_number. More...
 
unsigned int numUnissuedStores ()
 Number of stores in the store buffer which have not been completely issued to the memory system. More...
 
void countIssuedStore (LSQRequestPtr request)
 Count a store being issued to memory by decrementing numUnissuedAccesses. More...
 
bool isDrained () const
 Drained if there is absolutely nothing left in the buffer. More...
 
void step ()
 Try to issue more stores to memory. More...
 
void minorTrace () const
 Report queue contents for MinorTrace. More...
 
- Public Member Functions inherited from gem5::Named
 Named (const std::string &name_)
 
virtual ~Named ()=default
 
virtual std::string name () const
 

Public Attributes

LSQlsq
 My owner. More...
 
const unsigned int numSlots
 Number of slots, this is a bound on the size of slots. More...
 
const unsigned int storeLimitPerCycle
 Maximum number of stores that can be issued per cycle. More...
 
std::deque< LSQRequestPtrslots
 Queue of store requests on their way to memory. More...
 
unsigned int numUnissuedAccesses
 Number of occupied slots which have not yet issued a memory access. More...
 

Detailed Description

Store buffer.

This contains stores which have been committed but whose memory transfers have not yet been issued. Load data can be forwarded out of the store buffer

Definition at line 472 of file lsq.hh.

Constructor & Destructor Documentation

◆ StoreBuffer()

gem5::minor::LSQ::StoreBuffer::StoreBuffer ( std::string  name_,
LSQ lsq_,
unsigned int  store_buffer_size,
unsigned int  store_limit_per_cycle 
)

Definition at line 1685 of file lsq.cc.

Member Function Documentation

◆ canForwardDataToLoad()

LSQ::AddrRangeCoverage gem5::minor::LSQ::StoreBuffer::canForwardDataToLoad ( LSQRequestPtr  request,
unsigned int &  found_slot 
)

Look for a store which satisfies the given load.

Returns an indication whether the forwarding request can be wholly, partly or not all all satisfied. If the request can be wholly satisfied, the store buffer slot number which can be used is returned in found_slot

Definition at line 764 of file lsq.cc.

References gem5::minor::LSQ::LSQRequest::containsAddrRangeOf(), DPRINTF, gem5::ArmISA::i, gem5::minor::LSQ::LSQRequest::inst, gem5::minor::LSQ::NoAddrRangeCoverage, gem5::minor::LSQ::LSQRequest::packet, gem5::Packet::req, and gem5::minor::LSQ::LSQRequest::request.

Referenced by gem5::minor::LSQ::tryToSendToTransfers().

◆ canInsert()

bool gem5::minor::LSQ::StoreBuffer::canInsert ( ) const

Can a new request be inserted into the queue?

Definition at line 721 of file lsq.cc.

Referenced by gem5::minor::LSQ::canPushIntoStoreBuffer(), and gem5::minor::LSQ::findResponse().

◆ countIssuedStore()

void gem5::minor::LSQ::StoreBuffer::countIssuedStore ( LSQRequestPtr  request)

Count a store being issued to memory by decrementing numUnissuedAccesses.

Does not count barrier requests as they will be handles as barriers are cleared from the buffer

Definition at line 835 of file lsq.cc.

References gem5::minor::LSQ::LSQRequest::isBarrier().

Referenced by gem5::minor::LSQ::recvReqRetry().

◆ deleteRequest()

void gem5::minor::LSQ::StoreBuffer::deleteRequest ( LSQRequestPtr  request)

Delete the given request and free the slot it occupied.

Definition at line 728 of file lsq.cc.

References DPRINTF, and gem5::minor::LSQ::LSQRequest::inst.

Referenced by gem5::minor::LSQ::recvTimingResp().

◆ forwardStoreData()

void gem5::minor::LSQ::StoreBuffer::forwardStoreData ( LSQRequestPtr  load,
unsigned int  slot_number 
)

◆ insert()

void gem5::minor::LSQ::StoreBuffer::insert ( LSQRequestPtr  request)

◆ isDrained()

bool gem5::minor::LSQ::StoreBuffer::isDrained ( ) const
inline

Drained if there is absolutely nothing left in the buffer.

Definition at line 529 of file lsq.hh.

References slots.

Referenced by gem5::minor::LSQ::isDrained(), and gem5::minor::LSQ::tryToSendToTransfers().

◆ minorTrace()

void gem5::minor::LSQ::StoreBuffer::minorTrace ( ) const

Report queue contents for MinorTrace.

Definition at line 931 of file lsq.cc.

References gem5::ArmISA::i, gem5::minor::minorTrace(), gem5::X86ISA::os, and gem5::minor::LSQ::LSQRequest::reportData().

Referenced by gem5::minor::LSQ::minorTrace().

◆ numUnissuedStores()

unsigned int gem5::minor::LSQ::StoreBuffer::numUnissuedStores ( )
inline

Number of stores in the store buffer which have not been completely issued to the memory system.

Definition at line 521 of file lsq.hh.

References numUnissuedAccesses.

Referenced by gem5::minor::LSQ::needsToTick().

◆ step()

void gem5::minor::LSQ::StoreBuffer::step ( )

Member Data Documentation

◆ lsq

LSQ& gem5::minor::LSQ::StoreBuffer::lsq

My owner.

Definition at line 476 of file lsq.hh.

◆ numSlots

const unsigned int gem5::minor::LSQ::StoreBuffer::numSlots

Number of slots, this is a bound on the size of slots.

Definition at line 479 of file lsq.hh.

◆ numUnissuedAccesses

unsigned int gem5::minor::LSQ::StoreBuffer::numUnissuedAccesses

Number of occupied slots which have not yet issued a memory access.

Definition at line 490 of file lsq.hh.

Referenced by numUnissuedStores().

◆ slots

std::deque<LSQRequestPtr> gem5::minor::LSQ::StoreBuffer::slots

Queue of store requests on their way to memory.

Definition at line 486 of file lsq.hh.

Referenced by isDrained().

◆ storeLimitPerCycle

const unsigned int gem5::minor::LSQ::StoreBuffer::storeLimitPerCycle

Maximum number of stores that can be issued per cycle.

Definition at line 482 of file lsq.hh.


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

Generated on Wed Dec 21 2022 10:24:16 for gem5 by doxygen 1.9.1