Writes the specified number of data elements to the User’s FPGA specified BAR memory.
GxFpgaWrite (nHandle, nMemoryBar, dwOffset, pvData, nElementSize, dwSize, pnStatus)
Name |
Type |
Comments |
nHandle |
SHORT |
Handle for a GX3700 board. |
nMemoryBar |
SHORT |
The board’s specified memory mapped address space BAR number, values are as follows:1. GXFPGA_MEMORY_BAR1: Memory mapped address space BAR 1.2. GXFPGA_MEMORY_BAR2: Memory mapped address space BAR 2.3. GXFPGA_MEMORY_BAR3: Memory mapped address space BAR 3.4. GXFPGA_MEMORY_BAR4: Memory mapped address space BAR 4. |
dwOffset |
DWORD |
The offset of User’s FPGA memory space in bytes. |
pvData |
PVOID |
A buffer that will be written to the FPGA’s shared memory. Buffer size must be as indicated by the dwSize. |
nElementSize |
SHORT |
The data Size in bytes. |
dwSize |
DWORD |
The number of data elements to write to the memory location. |
pnStatus |
PSHORT |
Returned status: 0 on success, negative number on failure. |
The following example writes 100 DWORD to the User’s FPGA BAR1 memory to begin at offset 8:
DWORD adwData[100];
GxFpgaWrite (nHandle, GXFPGA_MEMORY_BAR1, 0x8, &adwData, 4, 100, &nStatus);