xil_testmem.c File Reference

#include "xil_testmem.h"
#include "xil_io.h"
#include "xil_assert.h"

Functions

int Xil_TestMem32 (u32 *Addr, u32 Words, u32 Pattern, u8 Subtest)
int Xil_TestMem16 (u16 *Addr, u32 Words, u16 Pattern, u8 Subtest)
int Xil_TestMem8 (u8 *Addr, u32 Words, u8 Pattern, u8 Subtest)

Detailed Description

Contains the memory test utility functions.

 MODIFICATION HISTORY:

 Ver    Who    Date    Changes
 ----- ---- -------- -----------------------------------------------
 1.00a hbm  08/25/09 First release
 

Function Documentation

int Xil_TestMem16 u16 *  Addr,
u32  Words,
u16  Pattern,
u8  Subtest
 

Perform a destructive 16-bit wide memory test.

Parameters:
Addr is a pointer to the region of memory to be tested.
Words is the length of the block.
Pattern is the constant used for the constant Pattern test, if 0, 0xDEADBEEF is used.
Subtest is the test selected. See xil_testmem.h for possible values.
Returns:
  • -1 is returned for a failure
  • 0 is returned for a pass

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 boundry 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.

int Xil_TestMem32 u32 *  Addr,
u32  Words,
u32  Pattern,
u8  Subtest
 

Perform a destructive 32-bit wide memory test.

Parameters:
Addr is a pointer to the region of memory to be tested.
Words is the length of the block.
Pattern is the constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtest is the test selected. See xil_testmem.h for possible values.
Returns:
  • 0 is returned for a pass
  • -1 is returned for a failure

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 boundry 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.

int Xil_TestMem8 u8 Addr,
u32  Words,
u8  Pattern,
u8  Subtest
 

Perform a destructive 8-bit wide memory test.

Parameters:
Addr is a pointer to the region of memory to be tested.
Words is the length of the block.
Pattern is the constant used for the constant pattern test, if 0, 0xDEADBEEF is used.
Subtest is the test selected. See xil_testmem.h for possible values.
Returns:
  • -1 is returned for a failure
  • 0 is returned for a pass

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 boundry 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.


Generated on Thu Feb 13 14:48:12 2014 for 2014.1_doc by  doxygen 1.4.5