PMSIS BSP
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Ram

Content

 Hyperram
 

Data Structures

struct  pi_ram_conf
 RAM configuration structure. More...
 

Typedefs

typedef struct pi_cl_ram_req_s pi_cl_ram_req_t
 RAM cluster copy request structure. More...
 
typedef struct
pi_cl_ram_alloc_req_s 
pi_cl_ram_alloc_req_t
 RAM cluster alloc request structure. More...
 
typedef struct pi_cl_ram_free_req_s pi_cl_ram_free_req_t
 RAM cluster free request structure. More...
 

Functions

int32_t pi_ram_open (struct pi_device *device)
 Open a RAM device. More...
 
static void pi_ram_close (struct pi_device *device)
 Close an opened RAM device. More...
 
static int pi_ram_alloc (struct pi_device *device, uint32_t *addr, uint32_t size)
 Allocate RAM memory. More...
 
static int pi_ram_free (struct pi_device *device, uint32_t addr, uint32_t size)
 Free RAM memory. More...
 
static void pi_ram_read (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size)
 Enqueue a read copy to the RAM (from RAM to processor). More...
 
static void pi_ram_write (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size)
 Enqueue a write copy to the RAM (from processor to RAM). More...
 
static void pi_ram_copy (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, int ext2loc)
 Enqueue a copy with the RAM. More...
 
static void pi_ram_read_2d (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length)
 Enqueue a 2D read copy (rectangle area) to the RAM (from RAM to processor). More...
 
static void pi_ram_write_2d (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length)
 Enqueue a 2D write copy (rectangle area) to the RAM (from processor to RAM). More...
 
static void pi_ram_copy_2d (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length, int ext2loc)
 Enqueue a 2D copy (rectangle area) with the RAM. More...
 
static void pi_ram_read_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, pi_task_t *task)
 Enqueue an asynchronous read copy to the RAM (from RAM to processor). More...
 
static void pi_ram_write_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, pi_task_t *task)
 Enqueue an asynchronous write copy to the RAM (from processor to RAM). More...
 
static void pi_ram_copy_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, int ext2loc, pi_task_t *task)
 Enqueue an asynchronous copy with the RAM. More...
 
static void pi_ram_read_2d_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length, pi_task_t *task)
 Enqueue an asynchronous 2D read copy (rectangle area) to the RAM (from RAM to processor). More...
 
static void pi_ram_write_2d_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length, pi_task_t *task)
 Enqueue an asynchronous 2D write copy (rectangle area) to the RAM (from processor to RAM). More...
 
static void pi_ram_copy_2d_async (struct pi_device *device, uint32_t pi_ram_addr, void *data, uint32_t size, uint32_t stride, uint32_t length, int ext2loc, pi_task_t *task)
 Enqueue an asynchronous 2D copy (rectangle area) with the RAM. More...
 
void pi_cl_ram_alloc (struct pi_device *device, uint32_t size, pi_cl_ram_alloc_req_t *req)
 Allocate RAM memory from cluster side. More...
 
void pi_cl_ram_free (struct pi_device *device, uint32_t chunk, uint32_t size, pi_cl_ram_free_req_t *req)
 Free RAM memory from cluster side. More...
 
static int32_t pi_cl_ram_alloc_wait (pi_cl_ram_alloc_req_t *req, uint32_t *addr)
 Wait until the specified RAM alloc request has finished. More...
 
static int32_t pi_cl_ram_free_wait (pi_cl_ram_free_req_t *req)
 Wait until the specified RAM free request has finished. More...
 
static void pi_cl_ram_read (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, pi_cl_ram_req_t *req)
 Enqueue a read copy to the RAM from cluster side (from RAM to processor). More...
 
static void pi_cl_ram_write (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, pi_cl_ram_req_t *req)
 Enqueue a write copy to the RAM from cluster side (from RAM to processor). More...
 
void pi_cl_ram_copy (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, int ext2loc, pi_cl_ram_req_t *req)
 Enqueue a copy with the RAM from cluster side. More...
 
static void pi_cl_ram_read_2d (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, uint32_t stride, uint32_t length, pi_cl_ram_req_t *req)
 Enqueue a 2D read copy (rectangle area) to the RAM from cluste side (from RAM to processor). More...
 
static void pi_cl_ram_write_2d (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, uint32_t stride, uint32_t length, pi_cl_ram_req_t *req)
 Enqueue a 2D write copy (rectangle area) to the RAM from cluster side (from RAM to processor). More...
 
void pi_cl_ram_copy_2d (struct pi_device *device, uint32_t pi_ram_addr, void *addr, uint32_t size, uint32_t stride, uint32_t length, int ext2loc, pi_cl_ram_req_t *req)
 Enqueue a 2D copy (rectangle area) with the RAM from cluster side. More...
 
static void pi_cl_ram_read_wait (pi_cl_ram_req_t *req)
 Wait until the specified RAM request has finished. More...
 
static void pi_cl_ram_write_wait (pi_cl_ram_req_t *req)
 Wait until the specified RAM request has finished. More...
 
static void pi_cl_ram_copy_wait (pi_cl_ram_req_t *req)
 Wait until the specified RAM request has finished. More...
 

Description

The RAM driver provides support for transferring data between an external RAM chip (e.g. Hyperram or SPI ram) and the processor running this driver.

Typedef Documentation

typedef struct pi_cl_ram_alloc_req_s pi_cl_ram_alloc_req_t

This structure is used by the runtime to manage a cluster remote allocation in the RAM. It must be instantiated once for each allocation and must be kept alive until the allocation is done. It can be instantiated as a normal variable, for example as a global variable, a local one on the stack, or through a memory allocator.

typedef struct pi_cl_ram_free_req_s pi_cl_ram_free_req_t

This structure is used by the runtime to manage a cluster remote free in the RAM. It must be instantiated once for each free and must be kept alive until the free is done. It can be instantiated as a normal variable, for example as a global variable, a local one on the stack, or through a memory allocator.

typedef struct pi_cl_ram_req_s pi_cl_ram_req_t

This structure is used by the runtime to manage a cluster remote copy with the RAM. It must be instantiated once for each copy and must be kept alive until the copy is finished. It can be instantiated as a normal variable, for example as a global variable, a local one on the stack, or through a memory allocator.

Function Documentation

void pi_cl_ram_alloc ( struct pi_device *  device,
uint32_t  size,
pi_cl_ram_alloc_req_t req 
)

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM allocation. The allocated memory is 4-bytes aligned. The allocator uses some meta-data stored in the fabric controller memory for every allocation so it is advisable to do as few allocations as possible to lower the memory overhead.

Parameters
deviceThe device descriptor of the RAM chip for which the memory must be allocated.
sizeThe size in bytes of the memory to allocate.
reqThe request structure used for termination.
static int32_t pi_cl_ram_alloc_wait ( pi_cl_ram_alloc_req_t req,
uint32_t *  addr 
)
inlinestatic

This blocks the calling core until the specified cluster RAM allocation is finished.

Parameters
reqThe request structure used for termination.
addrA pointer to the variable where the allocated address must be returned.
Returns
0 if the allocation succeeded, -1 if not enough memory was available.
void pi_cl_ram_copy ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
int  ext2loc,
pi_cl_ram_req_t req 
)

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
void pi_cl_ram_copy_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
int  ext2loc,
pi_cl_ram_req_t req 
)

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
static void pi_cl_ram_copy_wait ( pi_cl_ram_req_t req)
inlinestatic

This blocks the calling core until the specified cluster remote copy is finished.

Parameters
reqThe request structure used for termination.
void pi_cl_ram_free ( struct pi_device *  device,
uint32_t  chunk,
uint32_t  size,
pi_cl_ram_free_req_t req 
)

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM allocation. The allocator does not store any information about the allocated chunks, thus the size of the allocated chunk to to be freed must be provided by the caller.

Parameters
deviceThe device descriptor of the RAM chip for which the memory must be freed.
chunkThe allocated chunk to free.
sizeThe size in bytes of the memory chunk which was allocated.
reqThe request structure used for termination.
static int32_t pi_cl_ram_free_wait ( pi_cl_ram_free_req_t req)
inlinestatic

This blocks the calling core until the specified cluster RAM free is finished.

Parameters
reqThe request structure used for termination.
Returns
0 if the operation was successful, -1 otherwise
static void pi_cl_ram_read ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
pi_cl_ram_req_t req 
)
inlinestatic

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM read copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
static void pi_cl_ram_read_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_cl_ram_req_t req 
)
inlinestatic

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM read copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy.
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
static void pi_cl_ram_read_wait ( pi_cl_ram_req_t req)
inlinestatic

This blocks the calling core until the specified cluster remote copy is finished.

Parameters
reqThe request structure used for termination.
static void pi_cl_ram_write ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
pi_cl_ram_req_t req 
)
inlinestatic

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM write copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
static void pi_cl_ram_write_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  addr,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_cl_ram_req_t req 
)
inlinestatic

This function is a remote call that the cluster can do to the fabric-controller in order to ask for a RAM write copy. The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A pointer to a request structure must be provided so that the runtime can properly do the remote call. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
addrThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
reqA pointer to the RAM request structure. It must be allocated by the caller and kept alive until the copy is finished.
static void pi_cl_ram_write_wait ( pi_cl_ram_req_t req)
inlinestatic

This blocks the calling core until the specified cluster remote copy is finished.

Parameters
reqThe request structure used for termination.
static int pi_ram_alloc ( struct pi_device *  device,
uint32_t *  addr,
uint32_t  size 
)
inlinestatic

The allocated memory is 4-bytes aligned. The allocator uses some meta-data stored in the chip memory for every allocation so it is advisable to do as few allocations as possible to lower the memory overhead.

Parameters
deviceThe device structure of the device where to allocate the memory.
addrA pointer to the variable where the allocated address must be returned.
sizeThe size in bytes of the memory to allocate
Returns
0 if the allocation succeeded, -1 if not enough memory was available.
static void pi_ram_close ( struct pi_device *  device)
inlinestatic

This function can be called to close an opened RAM device once it is not needed anymore, in order to free all allocated resources. Once this function is called, the device is not accessible anymore and must be opened again before being used.

Parameters
deviceThe device structure of the device to close.
static void pi_ram_copy ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
int  ext2loc 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The calller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
static void pi_ram_copy_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
int  ext2loc 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The calller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
static void pi_ram_copy_2d_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
int  ext2loc,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.
static void pi_ram_copy_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
int  ext2loc,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
ext2loc1 if the copy is from RAM to the chip or 0 for the contrary.
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.
static int pi_ram_free ( struct pi_device *  device,
uint32_t  addr,
uint32_t  size 
)
inlinestatic

The allocator does not store any information about the allocated chunks, thus the size of the allocated chunk to to be freed must be provided by the caller.

Parameters
deviceThe device structure of the device where to free the memory.
addrThe allocated chunk to free
sizeThe size in bytes of the memory chunk which was allocated
Returns
0 if the operation was successful, -1 otherwise
int32_t pi_ram_open ( struct pi_device *  device)

This function must be called before the RAM device can be used. It will do all the needed configuration to make it usable and initialize the handle used to refer to this opened device when calling other functions. The configuration associated to the device must specify the exact model of RAM which must be opened.

Parameters
deviceA pointer to the device structure of the device to open. This structure is allocated by the called and must be kept alive until the device is closed.
Returns
0 if the operation is successfull, -1 if there was an error.
static void pi_ram_read ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The caller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
static void pi_ram_read_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The calller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
static void pi_ram_read_2d_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.
static void pi_ram_read_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.
static void pi_ram_write ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The calller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
static void pi_ram_write_2d ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length 
)
inlinestatic

The copy will make a transfer between the RAM and one of the processor memory areas. The calller is blocked until the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
static void pi_ram_write_2d_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
uint32_t  stride,
uint32_t  length,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
stride2D stride, which is the number of bytes which are added to the beginning of the current line to switch to the next one.
length2D length, which is the number of transferred bytes after which the driver will switch to the next line.
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.
static void pi_ram_write_async ( struct pi_device *  device,
uint32_t  pi_ram_addr,
void *  data,
uint32_t  size,
pi_task_t *  task 
)
inlinestatic

The copy will make an asynchronous transfer between the RAM and one of the processor memory areas. A task must be specified in order to specify how the caller should be notified when the transfer is finished. Depending on the chip, there may be some restrictions on the memory which can be used. Check the chip-specific documentation for more details.

Parameters
deviceThe device descriptor of the RAM chip on which to do the copy.
pi_ram_addrThe address of the copy in the RAM.
dataThe address of the copy in the processor.
sizeThe size in bytes of the copy
taskThe task used to notify the end of transfer. See the documentation of pi_task_t for more details.