The xil_testcache.h, xil_testio.h and the xil_testmem.h files contain utility functions to test cache and memory. Details of supported tests and subtests are listed below.
The xil_testcache.h file contains utility functions to test cache.
The xil_testio.h file contains utility functions to test endian related memory IO functions.
A subset of the memory tests can be selected or all of the tests can be run in order. If there is
an error detected by a subtest, the test stops and the failure code is returned. Further
tests are not run even if all of the tests are selected.
- Cache test: xil_testcache.h contains utility functions to test cache.
- I/O test: The Xil_testio.h file contains endian related memory IO functions. A subset of the memory tests can be selected or all of the tests can be run in order. If there is an error detected by a subtest, the test stops and the failure code is returned. Further tests are not run even if all of the tests are selected.
- Memory test: The xil_testmem.h file contains utility functions to test memory. A subset of the memory tests can be selected or all of the tests can be run in order. If there is an error detected by a subtest, the test stops and the failure code is returned. Further tests are not run even if all of the tests are selected.
- XIL_TESTMEM_ALLMEMTESTS: This test runs all of the subtests.
- XIL_TESTMEM_INCREMENT: This test starts at 'XIL_TESTMEM_INIT_VALUE' and uses the incrementing value as the test value for memory.
-
XIL_TESTMEM_WALKONES: Also known as the Walking ones test. This test uses a walking '1' as the test value for memory.
location 1 = 0x00000001 location 2 = 0x00000002 ...
-
XIL_TESTMEM_WALKZEROS: Also known as the Walking zero's test. This test uses the inverse value of the walking ones test as the test value for memory.
location 1 = 0xFFFFFFFE location 2 = 0xFFFFFFFD ...
- XIL_TESTMEM_INVERSEADDR: Also known as the inverse address test. This test uses the inverse of the address of the location under test as the test value for memory.
- XIL_TESTMEM_FIXEDPATTERN: Also known as the fixed pattern test. This test uses the provided patters as the test value for memory. If zero is provided as the pattern the test uses '0xDEADBEEF".
CAUTION:
The tests are DESTRUCTIVE. Run before any initialized memory spaces have been set up. The address provided to the memory tests is not checked for validity except for the NULL case. It is possible to provide a code-space pointer for this test to start with and ultimately destroy executable code causing random failures.
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.
Type | Name | Arguments |
---|---|---|
s32 | Xil_TestMem32 |
|
s32 | Xil_TestMem16 |
|
s32 | Xil_TestMem8 |
|
s32 | RoateLeft |
|
s32 | RotateRight | |
s32 | Xil_TestIO8 |
|
s32 | Xil_TestIO16 |
|
s32 | Xil_TestIO32 |
|