Go to the documentation of this file.
29 #ifndef __BASE_CHUNK_GENERATOR_HH__
30 #define __BASE_CHUNK_GENERATOR_HH__
203 #endif // __BASE_CHUNK_GENERATOR_HH__
const Addr chunkSize
The maximum chunk size, e.g., the cache block size or page size.
Addr nextAddr
The starting address of the next chunk (after the current one).
Addr curAddr
The starting address of the current chunk.
bool next()
Advance generator to next chunk.
Addr complete() const
Number of bytes we have already chunked up.
Addr nextSize
The size of the next chunk (in bytes).
Addr sizeLeft
The number of bytes remaining in the region after the current chunk.
static constexpr bool isPowerOf2(const T &n)
bool last() const
Is this the last chunk?
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 curSize
The size of the current chunk (in bytes).
bool done() const
Are we done? That is, did the last call to next() advance past the end of the region?
const Addr startAddr
The start address so we can calculate offset in writing block.
ChunkGenerator(Addr _startAddr, Addr totalSize, Addr _chunkSize)
Constructor.
uint64_t Addr
Address type This will probably be moved somewhere else in the near future.
void setNext(Addr next)
Grow this chunk to cover additional bytes which are already handled.
Addr addr() const
Return starting address of current chunk.
static constexpr T roundUp(const T &val, const U &align)
This function is used to align addresses in memory.
Reference material can be found at the JEDEC website: UFS standard http://www.jedec....
Generated on Sun Jul 30 2023 01:56:50 for gem5 by doxygen 1.8.17