Go to the documentation of this file.
29 #ifndef __BASE__CHUNK_GENERATOR_HH__
30 #define __BASE__CHUNK_GENERATOR_HH__
106 curSize = std::min(totalSize, left_in_chunk);
170 #endif // __BASE__CHUNK_GENERATOR_HH__
const unsigned chunkSize
The maximum chunk size, e.g., the cache block size or page size.
unsigned complete() const
Number of bytes we have already chunked up.
Addr curAddr
The starting address of the current chunk.
unsigned curSize
The size of the current chunk (in bytes).
unsigned size() const
Return size in bytes of current chunk.
Addr addr() const
Return starting address of current chunk.
unsigned sizeLeft
The number of bytes remaining in the region after the current chunk.
bool next()
Advance generator to next chunk.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
const Addr startAddr
The start address so we can calculate offset in writing block.
bool done() const
Are we done? That is, did the last call to next() advance past the end of the region?
T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
This class takes an arbitrary memory region (address/length pair) and generates a series of appropria...
Addr nextAddr
The starting address of the next chunk (after the current one).
bool last() const
Is this the last chunk?
bool isPowerOf2(const T &n)
ChunkGenerator(Addr _startAddr, unsigned totalSize, unsigned _chunkSize)
Constructor.
Generated on Wed Sep 30 2020 14:02:07 for gem5 by doxygen 1.8.17