GxFpgaReadRegister

Purpose

Reads a 32-bit FPGA register.

Syntax

GxFpgaReadRegister (nHandle, dwOffset, pvData, dwSize,  pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle for a GX3500 board.
dwOffset
DWORD
The offset in the FPGA’s shared memory space in terms of bytes, must be aligned to 4 bytes address.
pvData
PVOID
A buffer that will contain the data read. Buffer size must be as indicated by the dwSize.
dwSize
DWORD
The number of bytes to be read from the memory location must be multiple of 4.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

This function will read one or more double words from the FPGA’s registers. The offset to be read from must be 4 byte aligned.

The Maximum value of dwOffset is 0x400.

Example

The following reads an buffer of double words from the FPGA’s memory:

 

DWORD adwData[100];

GxFpgaReadMemory (nHandle, 0x8, &adwData, 400, &nStatus);

 

See Also

GxFpgaWriteMemory, GxFpgaReadMemory, GxFpgaWriteRegister, GxFpgaGetErrorString