CO_MEMORY_WRITEBLOCK


 void co_memory_writeblock(co_memory mem,                           unsigned int offset,                           void *buf,                           size_t buffersize); 

Header File

co.h

Description

This function writes a block of data to a shared memory. This function must be called from within a process run function.

Arguments

The arguments for co_memory_writeblock are as follows:

co_memory mem

A pointer to a memory as passed on the process argument list.

unsigned int offset

Specifies the memory offset, in bytes.

void *buf

A pointer to the local memory containing the data to be written to shared memory. In hardware processes, this argument must be an array identifier.

size_t buffersize

The number of bytes to transfer in the block write operation.


Return Value

None.

Notes

The co_memory_writeblock function performs a block DMA transfer between shared memories and local memories. The third argument, buf, is an array that represents a block of shared memory. The type of memory being accessed depends on the targeted platform (see your Platform Support Package documentation). Note that co_memory_writeblock is not designed for efficient random access of individual memory locations. Note also that stream interfaces may actually provide better performance than memory block reads and writes if the system contains a CPU.

The co_errno variable is set to CO_EMEM_OUT_OF_BOUNDS if the offset is outside the bounds of the memory. co_errno is set to CO_ENULL_PTR if the argument mem is NULL.



    Practical FPGA Programming in C
    Practical FPGA Programming in C
    ISBN: 0131543180
    EAN: 2147483647
    Year: 2005
    Pages: 208

    Similar book on Amazon

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net