dev-amdgpu: Add memory manager readRequest method

This method reads arbitrary sized requests from *device* memory with the
ability to call a callback after the last chunk, similar to writeRequest
method.

Change-Id: I8fc22c45b650a632ea48dbed1e978ceeda34ffdd
Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/62712
Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com>
Maintainer: Matt Sinclair <mattdsinclair@gmail.com>
Reviewed-by: Jason Lowe-Power <power.jg@gmail.com>
Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
Matthew Poremba
2022-08-25 15:36:21 -07:00
parent 4211962f8c
commit a531ff64c3
2 changed files with 42 additions and 0 deletions

View File

@@ -89,6 +89,19 @@ class AMDGPUMemoryManager : public ClockedObject
void writeRequest(Addr addr, uint8_t *data, int size,
Request::Flags flag = 0, Event *callback = nullptr);
/**
* Read size amount of data from device memory at addr using flags and
* callback.
*
* @param addr Device address to read.
* @param data Pointer to data to read into.
* @param size Number of bytes to read.
* @param flag Additional request flags for read packets.
* @param callback Event callback to call after all bytes are read.
*/
void readRequest(Addr addr, uint8_t *data, int size,
Request::Flags flag = 0, Event *callback = nullptr);
/**
* Get the requestorID for the memory manager. This ID is used for all
* packets which should be routed through the device network.