gem5  v21.0.0.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Functions
The ChunkGenerator API.

These methods relate to the ChunkGenerator interface. More...

Functions

 ChunkGenerator::ChunkGenerator (Addr _startAddr, Addr totalSize, Addr _chunkSize)
 Constructor. More...
 
Addr ChunkGenerator::addr () const
 Return starting address of current chunk. More...
 
Addr ChunkGenerator::size () const
 Return size in bytes of current chunk. More...
 
Addr ChunkGenerator::complete () const
 Number of bytes we have already chunked up. More...
 
bool ChunkGenerator::done () const
 Are we done? That is, did the last call to next() advance past the end of the region? More...
 
bool ChunkGenerator::last () const
 Is this the last chunk? More...
 
void ChunkGenerator::setNext (Addr next)
 Grow this chunk to cover additional bytes which are already handled. More...
 
bool ChunkGenerator::next ()
 Advance generator to next chunk. More...
 

Detailed Description

These methods relate to the ChunkGenerator interface.

Function Documentation

◆ addr()

Addr ChunkGenerator::addr ( ) const
inline

◆ ChunkGenerator()

ChunkGenerator::ChunkGenerator ( Addr  _startAddr,
Addr  totalSize,
Addr  _chunkSize 
)
inline

Constructor.

Parameters
_startAddrThe starting address of the region.
totalSizeThe total size of the region.
_chunkSizeThe size/alignment of chunks into which the region should be decomposed.

Definition at line 84 of file chunk_generator.hh.

References ChunkGenerator::chunkSize, ChunkGenerator::curAddr, ChunkGenerator::curSize, isPowerOf2(), ChunkGenerator::nextAddr, ChunkGenerator::nextSize, roundUp(), ChunkGenerator::sizeLeft, and ChunkGenerator::startAddr.

◆ complete()

Addr ChunkGenerator::complete ( ) const
inline

Number of bytes we have already chunked up.

Definition at line 129 of file chunk_generator.hh.

References ChunkGenerator::curAddr, and ChunkGenerator::startAddr.

Referenced by DmaPort::DmaReqState::createPacket(), IdeDisk::doDmaRead(), IdeDisk::doDmaWrite(), DmaPort::sendAtomicBdReq(), and TEST().

◆ done()

bool ChunkGenerator::done ( ) const
inline

◆ last()

bool ChunkGenerator::last ( ) const
inline

Is this the last chunk?

Returns
True if yes, false if more to go.

Definition at line 146 of file chunk_generator.hh.

References ChunkGenerator::sizeLeft.

Referenced by ChunkGenerator::next(), TEST(), and DmaPort::trySendTimingReq().

◆ next()

bool ChunkGenerator::next ( )
inline

◆ setNext()

void ChunkGenerator::setNext ( Addr  next)
inline

Grow this chunk to cover additional bytes which are already handled.

Parameters
nextThe first byte of the next chunk.

Definition at line 155 of file chunk_generator.hh.

References ChunkGenerator::chunkSize, ChunkGenerator::curSize, ChunkGenerator::next(), ChunkGenerator::nextAddr, ChunkGenerator::nextSize, roundUp(), and ChunkGenerator::sizeLeft.

Referenced by DmaPort::sendAtomicBdReq(), and TEST().

◆ size()

Addr ChunkGenerator::size ( ) const
inline

Generated on Tue Mar 23 2021 19:41:32 for gem5 by doxygen 1.8.17