Perform a destructive 32-bit wide register IO test.
Each location is tested by sequentially writing a 32-bit wide register, reading the register, and comparing value. This function tests three kinds of register IO functions, normal register IO, little-endian register IO, and big-endian register IO. When testing little/big-endian IO, the function perform the following sequence, Xil_Out32LE/ Xil_Out32BE, Xil_In32, Compare, Xil_Out32, Xil_In32LE/Xil_In32BE, Compare. Whether to swap the read-in value *before comparing is controlled by the 5th argument.
s32 Xil_TestIO32(u32 *Addr, s32 Length, u32 Value, s32 Kind, s32 Swap);
The following table lists the
Xil_TestIO32 function arguments.
|Addr||a pointer to the region of memory to be tested.|
|Length||Length of the block.|
|Value||constant used for writing the memory.|
|Kind||type of test. Acceptable values are: XIL_TESTIO_DEFAULT, XIL_TESTIO_LE, XIL_TESTIO_BE.|
|Swap||indicates whether to byte swap the read-in value.|
- -1 is returned for a failure
- 0 is returned for a pass