Change-Id: I8dbcef360ec1c5539fc415781729fcb86112fdbc
Signed-off-by: Hoa Nguyen <hoanguyen@ucdavis.edu>
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/32935
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Maintainer: Bobby R. Bruce <bbruce@ucdavis.edu>
Tested-by: kokoro <noreply+kokoro@google.com>
* @param totalSize The total size of the region.
* @param _chunkSize The size/alignment of chunks into which
* the region should be decomposed.
* @param totalSize The total size of the region.
* @param _chunkSize The size/alignment of chunks into which
* the region should be decomposed.
+ *
+ * @ingroup api_chunk_generator
*/
ChunkGenerator(Addr _startAddr, unsigned totalSize, unsigned _chunkSize)
: startAddr(_startAddr), chunkSize(_chunkSize)
*/
ChunkGenerator(Addr _startAddr, unsigned totalSize, unsigned _chunkSize)
: startAddr(_startAddr), chunkSize(_chunkSize)
sizeLeft = totalSize - curSize;
}
sizeLeft = totalSize - curSize;
}
- /** Return starting address of current chunk. */
+ /**
+ * Return starting address of current chunk.
+ *
+ * @ingroup api_chunk_generator
+ */
Addr addr() const { return curAddr; }
Addr addr() const { return curAddr; }
- /** Return size in bytes of current chunk. */
+ /**
+ * Return size in bytes of current chunk.
+ *
+ * @ingroup api_chunk_generator
+ */
unsigned size() const { return curSize; }
unsigned size() const { return curSize; }
- /** Number of bytes we have already chunked up. */
+ /**
+ * Number of bytes we have already chunked up.
+ *
+ * @ingroup api_chunk_generator
+ */
unsigned complete() const { return curAddr - startAddr; }
/**
* Are we done? That is, did the last call to next() advance
* past the end of the region?
* @return True if yes, false if more to go.
unsigned complete() const { return curAddr - startAddr; }
/**
* Are we done? That is, did the last call to next() advance
* past the end of the region?
* @return True if yes, false if more to go.
+ *
+ * @ingroup api_chunk_generator
*/
bool done() const { return (curSize == 0); }
/**
* Is this the last chunk?
* @return True if yes, false if more to go.
*/
bool done() const { return (curSize == 0); }
/**
* Is this the last chunk?
* @return True if yes, false if more to go.
+ *
+ * @ingroup api_chunk_generator
*/
bool last() const { return (sizeLeft == 0); }
*/
bool last() const { return (sizeLeft == 0); }
* Advance generator to next chunk.
* @return True if successful, false if unsuccessful
* (because we were at the last chunk).
* Advance generator to next chunk.
* @return True if successful, false if unsuccessful
* (because we were at the last chunk).
+ *
+ * @ingroup api_chunk_generator