gem5 [DEVELOP-FOR-25.0]
Loading...
Searching...
No Matches
The ChunkGenerator API.

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

Functions

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

Detailed Description

These methods relate to the ChunkGenerator interface.

Function Documentation

◆ addr()

◆ ChunkGenerator()

gem5::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 87 of file chunk_generator.hh.

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

◆ complete()

Addr gem5::ChunkGenerator::complete ( ) const
inline

◆ done()

bool gem5::ChunkGenerator::done ( ) const
inline

◆ last()

bool gem5::ChunkGenerator::last ( ) const
inline

Is this the last chunk?

Returns
True if yes, false if more to go.

Definition at line 149 of file chunk_generator.hh.

References sizeLeft.

Referenced by next(), gem5::AMDGPUMemoryManager::readRequest(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), TEST(), gem5::DmaPort::trySendTimingReq(), and gem5::AMDGPUMemoryManager::writeRequest().

◆ next()

bool gem5::ChunkGenerator::next ( )
inline

◆ setNext()

void gem5::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 158 of file chunk_generator.hh.

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

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

◆ size()

Addr gem5::ChunkGenerator::size ( ) const
inline

Generated on Mon May 26 2025 09:19:17 for gem5 by doxygen 1.13.2