gem5 v24.0.0.0
Loading...
Searching...
No Matches
The ChunkGenerator API.

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? That is, did the last call to next() advance past the end of the region?
 
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 gem5::ChunkGenerator::chunkSize, gem5::ChunkGenerator::curAddr, gem5::ChunkGenerator::curSize, gem5::isPowerOf2(), gem5::ChunkGenerator::nextAddr, gem5::ChunkGenerator::nextSize, gem5::roundUp(), gem5::ChunkGenerator::sizeLeft, and gem5::ChunkGenerator::startAddr.

◆ complete()

◆ done()

◆ 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 gem5::ChunkGenerator::sizeLeft.

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

◆ next()

◆ 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 gem5::ChunkGenerator::chunkSize, gem5::ChunkGenerator::curSize, gem5::ChunkGenerator::next(), gem5::ChunkGenerator::nextAddr, gem5::ChunkGenerator::nextSize, gem5::roundUp(), and gem5::ChunkGenerator::sizeLeft.

Referenced by TEST().

◆ size()


Generated on Tue Jun 18 2024 16:24:09 for gem5 by doxygen 1.11.0