gem5  v20.1.0.0
Functions
The ChunkGenerator API.

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

Functions

 ChunkGenerator::ChunkGenerator (Addr _startAddr, unsigned totalSize, unsigned _chunkSize)
 Constructor. More...
 
Addr ChunkGenerator::addr () const
 Return starting address of current chunk. More...
 
unsigned ChunkGenerator::size () const
 Return size in bytes of current chunk. More...
 
unsigned 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...
 
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

Return starting address of current chunk.

Definition at line 115 of file chunk_generator.hh.

References ChunkGenerator::curAddr.

Referenced by IdeDisk::doDmaRead(), IdeDisk::doDmaWrite(), and TEST().

◆ ChunkGenerator()

ChunkGenerator::ChunkGenerator ( Addr  _startAddr,
unsigned  totalSize,
unsigned  _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 81 of file chunk_generator.hh.

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

◆ complete()

unsigned ChunkGenerator::complete ( ) const
inline

Number of bytes we have already chunked up.

Definition at line 128 of file chunk_generator.hh.

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

Referenced by IdeDisk::doDmaRead(), IdeDisk::doDmaWrite(), 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 145 of file chunk_generator.hh.

References ChunkGenerator::sizeLeft.

Referenced by TEST().

◆ next()

bool ChunkGenerator::next ( )
inline

Advance generator to next chunk.

Returns
True if successful, false if unsuccessful (because we were at the last chunk).

Definition at line 155 of file chunk_generator.hh.

References ChunkGenerator::chunkSize, ChunkGenerator::curAddr, ChunkGenerator::curSize, ChunkGenerator::nextAddr, and ChunkGenerator::sizeLeft.

Referenced by IdeDisk::doDmaRead(), IdeDisk::doDmaWrite(), and TEST().

◆ size()

unsigned ChunkGenerator::size ( ) const
inline

Return size in bytes of current chunk.

Definition at line 121 of file chunk_generator.hh.

References ChunkGenerator::curSize.

Referenced by IdeDisk::doDmaRead(), IdeDisk::doDmaWrite(), and TEST().


Generated on Wed Sep 30 2020 14:02:20 for gem5 by doxygen 1.8.17