Go to the documentation of this file.
29 #ifndef __BASE_CHUNK_GENERATOR_HH__
30 #define __BASE_CHUNK_GENERATOR_HH__
198 #endif // __BASE_CHUNK_GENERATOR_HH__
Addr complete() const
Number of bytes we have already chunked up.
Addr sizeLeft
The number of bytes remaining in the region after the current chunk.
Addr curAddr
The starting address of the current chunk.
Addr nextSize
The size of the next chunk (in bytes).
void setNext(Addr next)
Grow this chunk to cover additional bytes which are already handled.
const Addr chunkSize
The maximum chunk size, e.g., the cache block size or page size.
Addr addr() const
Return starting address of current chunk.
bool next()
Advance generator to next chunk.
Addr curSize
The size of the current chunk (in bytes).
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.
Addr size() const
Return size in bytes of current chunk.
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, Addr totalSize, Addr _chunkSize)
Constructor.
Generated on Tue Mar 23 2021 19:41:23 for gem5 by doxygen 1.8.17