GtWaveTestMemory

Supported By

GX1110, GX1120

Applies To

Function Generator and Arbitrary Waveform Generator modes.

Purpose

Runs a memory self-test.

Syntax

GtWaveTestMemory (nHandle, nChannel, nMode, dwStartStep, dwSteps, pdwFailedStep, pnStatus)

Parameters

Name
Type
Comments
nHandle
SHORT
Handle to a GX11X0 board.
nChannel
SHORT
Specified Channel number.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
GX1120:
0 = GTWAVE_CHANNEL_A: Channel A.
1 = GTWAVE_CHANNEL_B: Channel B.
nMode
SHORT

Memory test mode:

0 = GTWAVE_TEST_FUNCTION_GEN_MEMORY: Test only the Function Gen internal memory.

1 = GTWAVE_TEST_ARB_MEMORY: Test only the Arb memory.

-1 = GTWAVE_TEST_ALL: test both the Function Gen internal memory and the Arb memory.

dwStartStep
DWORD

Arb memory starting step (0- 33554431).

If dwStartStep=-1, then dwStartStep=0 and dwSteps=33554432.

dwSteps
DWORD

Number of steps to test in the Arb memory (1- 33554432).

If dwSteps=-1, then actual number of stewps to be tested is 33554432- dwStartStep

pdwFailedStep
PDWORD
Returned first failed address, if no failure were found returns -1.
pnStatus
PSHORT
Returned status: 0 on success, negative number on failure.

Comments

The function runs a memory self-test, after calling this function all the memory data will be set to 0.

Example

The following example runs an ARB memory self-test on all 32M memory steps:

 

DWORD dwFailedStep;

GtWaveTestMemory (nHandle, GTWAVE_CHANNEL_A, GTWAVE_TEST_ARB_MEMORY, -1, -1, &dwFailedStep, &nStatus);

if (dwFailedStep==-1)

   printf("Memory pass self-test");

else

   printf("Memory failed self-test, first failed address is at %i", dwFailedStep);

 

See Also

GtWaveInitialize, GtWaveGetErrorString