embeddedsw/lib/bsp/standalone/doc/html/api/xil__testmem_8h.html
Jagannadha Sutradharudu Teki 2c8f92039d embeddesw: Add initial code support
Added initial support Xilinx Embedded Software.

Signed-off-by: Jagannadha Sutradharudu Teki <jaganna@xilinx.com>
2014-06-24 16:45:01 +05:30

297 lines
16 KiB
HTML
Executable file

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>2014.1_doc: xil_testmem.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.4.5 -->
<div class="tabs">
<ul>
<li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
<li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
<li id="current"><a href="files.html"><span>Files</span></a></li>
<li><a href="dirs.html"><span>Directories</span></a></li>
</ul></div>
<div class="tabs">
<ul>
<li><a href="files.html"><span>File&nbsp;List</span></a></li>
<li><a href="globals.html"><span>Globals</span></a></li>
</ul></div>
<div class="nav">
<a class="el" href="dir_U_3A_2Fdoxygen_5Fpublish_2Fsources_2Fbsp_2Fstandalone_5Fv4_5F0_2Fsrc_2Fcommon_2F.html">common</a></div>
<h1>xil_testmem.h File Reference</h1><code>#include &quot;<a class="el" href="xil__types_8h.html">xil_types.h</a>&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Memory subtests</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xil__testmem_8h.html#b515d83158d447aa71d79aadfb2fb7d0">XIL_TESTMEM_ALLMEMTESTS</a>&nbsp;&nbsp;&nbsp;0</td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xil__testmem_8h.html#333ad61122d9bfd6a45e07c5573d2985">Xil_TestMem32</a> (u32 *Addr, u32 Words, u32 Pattern, <a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> Subtest)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xil__testmem_8h.html#e9cc60d8f2ba6881d7c642bac98c382e">Xil_TestMem16</a> (u16 *Addr, u32 Words, u16 Pattern, <a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> Subtest)</td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="xil__testmem_8h.html#de8eb3b81bdf87387b6752da5d51812b">Xil_TestMem8</a> (<a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> *Addr, u32 Words, <a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> Pattern, <a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> Subtest)</td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
This file contains utility functions to test memory.<p>
<b>Memory test description</b><p>
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.<p>
Subtest descriptions: <pre>
XIL_TESTMEM_ALLMEMTESTS:
Runs all of the following tests</pre><p>
<pre> XIL_TESTMEM_INCREMENT:
Incrementing Value Test.
This test starts at 'XIL_TESTMEM_INIT_VALUE' and uses the
incrementing value as the test value for memory.</pre><p>
<pre> XIL_TESTMEM_WALKONES:
Walking Ones Test.
This test uses a walking '1' as the test value for memory.
location 1 = 0x00000001
location 2 = 0x00000002
...</pre><p>
<pre> XIL_TESTMEM_WALKZEROS:
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
...</pre><p>
<pre> XIL_TESTMEM_INVERSEADDR:
Inverse Address Test.
This test uses the inverse of the address of the location under test
as the test value for memory.</pre><p>
<pre> XIL_TESTMEM_FIXEDPATTERN:
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".
</pre><p>
<em>WARNING</em><p>
The tests are <b>DESTRUCTIVE</b>. Run before any initialized memory spaces have been set up.<p>
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.<p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
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.<p>
<pre>
MODIFICATION HISTORY:</pre><p>
<pre> Ver Who Date Changes
----- ---- -------- -----------------------------------------------
1.00a hbm 08/25/09 First release
</pre> <hr><h2>Define Documentation</h2>
<a class="anchor" name="b515d83158d447aa71d79aadfb2fb7d0"></a><!-- doxytag: member="xil_testmem.h::XIL_TESTMEM_ALLMEMTESTS" ref="b515d83158d447aa71d79aadfb2fb7d0" args="" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">#define XIL_TESTMEM_ALLMEMTESTS&nbsp;&nbsp;&nbsp;0 </td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
See the detailed description of the subtests in the file description. </td>
</tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="e9cc60d8f2ba6881d7c642bac98c382e"></a><!-- doxytag: member="xil_testmem.h::Xil_TestMem16" ref="e9cc60d8f2ba6881d7c642bac98c382e" args="(u16 *Addr, u32 Words, u16 Pattern, u8 Subtest)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int Xil_TestMem16 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">u16 *&nbsp;</td>
<td class="mdname" nowrap> <em>Addr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Words</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u16&nbsp;</td>
<td class="mdname" nowrap> <em>Pattern</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a>&nbsp;</td>
<td class="mdname" nowrap> <em>Subtest</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Perform a destructive 16-bit wide memory test.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Addr</em>&nbsp;</td><td>is a pointer to the region of memory to be tested. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Words</em>&nbsp;</td><td>is the length of the block. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pattern</em>&nbsp;</td><td>is the constant used for the constant Pattern test, if 0, 0xDEADBEEF is used. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Subtest</em>&nbsp;</td><td>is the test selected. See <a class="el" href="xil__testmem_8h.html">xil_testmem.h</a> for possible values.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
<ul>
<li>-1 is returned for a failure</li><li>0 is returned for a pass</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
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. </td>
</tr>
</table>
<a class="anchor" name="333ad61122d9bfd6a45e07c5573d2985"></a><!-- doxytag: member="xil_testmem.h::Xil_TestMem32" ref="333ad61122d9bfd6a45e07c5573d2985" args="(u32 *Addr, u32 Words, u32 Pattern, u8 Subtest)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int Xil_TestMem32 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">u32 *&nbsp;</td>
<td class="mdname" nowrap> <em>Addr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Words</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Pattern</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a>&nbsp;</td>
<td class="mdname" nowrap> <em>Subtest</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Perform a destructive 32-bit wide memory test.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Addr</em>&nbsp;</td><td>is a pointer to the region of memory to be tested. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Words</em>&nbsp;</td><td>is the length of the block. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pattern</em>&nbsp;</td><td>is the constant used for the constant pattern test, if 0, 0xDEADBEEF is used. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Subtest</em>&nbsp;</td><td>is the test selected. See <a class="el" href="xil__testmem_8h.html">xil_testmem.h</a> for possible values.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
<ul>
<li>0 is returned for a pass</li><li>-1 is returned for a failure</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
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. </td>
</tr>
</table>
<a class="anchor" name="de8eb3b81bdf87387b6752da5d51812b"></a><!-- doxytag: member="xil_testmem.h::Xil_TestMem8" ref="de8eb3b81bdf87387b6752da5d51812b" args="(u8 *Addr, u32 Words, u8 Pattern, u8 Subtest)" --><p>
<table class="mdTable" cellpadding="2" cellspacing="0">
<tr>
<td class="mdRow">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="md" nowrap valign="top">int Xil_TestMem8 </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top"><a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a> *&nbsp;</td>
<td class="mdname" nowrap> <em>Addr</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap>u32&nbsp;</td>
<td class="mdname" nowrap> <em>Words</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a>&nbsp;</td>
<td class="mdname" nowrap> <em>Pattern</em>, </td>
</tr>
<tr>
<td class="md" nowrap align="right"></td>
<td class="md"></td>
<td class="md" nowrap><a class="el" href="xil__types_8h.html#077393852be20e37026d6281827662f2">u8</a>&nbsp;</td>
<td class="mdname" nowrap> <em>Subtest</em></td>
</tr>
<tr>
<td class="md"></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Perform a destructive 8-bit wide memory test.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
<table border="0" cellspacing="2" cellpadding="0">
<tr><td valign="top"></td><td valign="top"><em>Addr</em>&nbsp;</td><td>is a pointer to the region of memory to be tested. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Words</em>&nbsp;</td><td>is the length of the block. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Pattern</em>&nbsp;</td><td>is the constant used for the constant pattern test, if 0, 0xDEADBEEF is used. </td></tr>
<tr><td valign="top"></td><td valign="top"><em>Subtest</em>&nbsp;</td><td>is the test selected. See <a class="el" href="xil__testmem_8h.html">xil_testmem.h</a> for possible values.</td></tr>
</table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
<ul>
<li>-1 is returned for a failure</li><li>0 is returned for a pass</li></ul>
<p>
<dl compact><dt><b>Note:</b></dt><dd></dd></dl>
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. </td>
</tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Thu Feb 13 14:48:12 2014 for 2014.1_doc by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.5 </small></address>
</body>
</html>