Xil_TestMem8 - 2021.1 English

Xilinx Standalone Library Documentation OS and Libraries Document Collection (UG643)

Document ID
UG643
Release Date
2021-06-16
Version
2021.1 English

Perform a destructive 8-bit wide memory test.

Note: Used for spaces where the address range of the region is smaller than the data width. If the memory range is greater than 2 ** Width, the patterns used in XIL_TESTMEM_WALKONES and XIL_TESTMEM_WALKZEROS will repeat on a boundary of a power of two making it more difficult to detect addressing errors. The XIL_TESTMEM_INCREMENT and XIL_TESTMEM_INVERSEADDR tests suffer the same problem. Ideally, if large blocks of memory are to be tested, break them up into smaller regions of memory to allow the test patterns used not to repeat over the region tested.

Prototype

s32 Xil_TestMem8(u8 *Addr, u32 Words, u8 Pattern, u8 Subtest);

Parameters

The following table lists the Xil_TestMem8 function arguments.

Table 1. Xil_TestMem8 Arguments
Name Description
Addr pointer to the region of memory to be tested.
Words length of the block.
Pattern constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtest type of test selected. See xil_testmem.h for possible values.

Returns

  • -1 is returned for a failure
  • 0 is returned for a pass