272 lines
13 KiB
HTML
272 lines
13 KiB
HTML
![]() |
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||
|
<title>
|
||
|
Xilinx Driver common v1_00_a: xutil.h File Reference
|
||
|
</title>
|
||
|
<link href="../../../../../../../doc/usenglish/css/driver_api_doxygen.css" rel="stylesheet" type="text/css">
|
||
|
</head>
|
||
|
<h3 class="PageHeader">Xilinx Processor IP Library</h3>
|
||
|
<hl>Software Drivers</hl>
|
||
|
<hr class="whs1">
|
||
|
|
||
|
<!-- Generated by Doxygen 1.4.7 -->
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Data Structures</span></a></li>
|
||
|
<li id="current"><a href="files.html"><span>Files</span></a></li>
|
||
|
</ul></div>
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="files.html"><span>File List</span></a></li>
|
||
|
<li><a href="globals.html"><span>Globals</span></a></li>
|
||
|
</ul></div>
|
||
|
<h1>xutil.h File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
This file contains utility functions such as memory test functions.<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>
|
||
|
XUT_ALLMEMTESTS:
|
||
|
Runs all of the following tests</pre><p>
|
||
|
<pre> XUT_INCREMENT:
|
||
|
Incrementing Value Test.
|
||
|
This test starts at 'XUT_MEMTEST_INIT_VALUE' and uses the incrementing
|
||
|
value as the test value for memory.</pre><p>
|
||
|
<pre> XUT_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> XUT_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> XUT_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> XUT_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, Addr, 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 XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_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 ecm 11/01/01 First release
|
||
|
1.00a xd 11/03/04 Improved support for doxygen.
|
||
|
</pre>
|
||
|
<p>
|
||
|
<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 </td><td class="memItemRight" valign="bottom"><a class="el" href="xutil_8h.html#611891b0e5c78d9849169a8ed9b37457">XUT_ALLMEMTESTS</a></td></tr>
|
||
|
|
||
|
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xutil_8h.html#100d836b52f019cb2778dde05b8d5f9d">XUtil_MemoryTest32</a> (u32 *Addr, u32 Words, u32 Pattern, u8 Subtest)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xutil_8h.html#3fa3b8c52b52a5d3bde1830f15d4242b">XUtil_MemoryTest16</a> (u16 *Addr, u32 Words, u16 Pattern, u8 Subtest)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xutil_8h.html#c823123744399391209d230c658e9bbc">XUtil_MemoryTest8</a> (u8 *Addr, u32 Words, u8 Pattern, u8 Subtest)</td></tr>
|
||
|
|
||
|
</table>
|
||
|
<hr><h2>Define Documentation</h2>
|
||
|
<a class="anchor" name="611891b0e5c78d9849169a8ed9b37457"></a><!-- doxytag: member="xutil.h::XUT_ALLMEMTESTS" ref="611891b0e5c78d9849169a8ed9b37457" args="" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">#define XUT_ALLMEMTESTS </td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>
|
||
|
See the detailed description of the subtests in the file description.
|
||
|
</div>
|
||
|
</div><p>
|
||
|
<hr><h2>Function Documentation</h2>
|
||
|
<a class="anchor" name="3fa3b8c52b52a5d3bde1830f15d4242b"></a><!-- doxytag: member="xutil.h::XUtil_MemoryTest16" ref="3fa3b8c52b52a5d3bde1830f15d4242b" args="(u16 *Addr, u32 Words, u16 Pattern, u8 Subtest)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XUtil_MemoryTest16 </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">u16 * </td>
|
||
|
<td class="paramname"> <em>Addr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>Words</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u16 </td>
|
||
|
<td class="paramname"> <em>Pattern</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u8 </td>
|
||
|
<td class="paramname"> <em>Subtest</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td width="100%"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>
|
||
|
Performs 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> </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> </td><td>is the length of the block. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Pattern</em> </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> </td><td>is the test selected. See <a class="el" href="xutil_8h.html">xutil.h</a> for possible values.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
|
||
|
<ul>
|
||
|
<li>XST_MEMTEST_FAILED is returned for a failure</li><li>XST_SUCCESS 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 XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_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.
|
||
|
</div>
|
||
|
</div><p>
|
||
|
<a class="anchor" name="100d836b52f019cb2778dde05b8d5f9d"></a><!-- doxytag: member="xutil.h::XUtil_MemoryTest32" ref="100d836b52f019cb2778dde05b8d5f9d" args="(u32 *Addr, u32 Words, u32 Pattern, u8 Subtest)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XUtil_MemoryTest32 </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">u32 * </td>
|
||
|
<td class="paramname"> <em>Addr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>Words</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>Pattern</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u8 </td>
|
||
|
<td class="paramname"> <em>Subtest</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td width="100%"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>
|
||
|
Performs 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> </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> </td><td>is the length of the block. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Pattern</em> </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> </td><td>is the test selected. See <a class="el" href="xutil_8h.html">xutil.h</a> for possible values.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
|
||
|
<ul>
|
||
|
<li>XST_MEMTEST_FAILED is returned for a failure</li><li>XST_SUCCESS 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 XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_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.
|
||
|
</div>
|
||
|
</div><p>
|
||
|
<a class="anchor" name="c823123744399391209d230c658e9bbc"></a><!-- doxytag: member="xutil.h::XUtil_MemoryTest8" ref="c823123744399391209d230c658e9bbc" args="(u8 *Addr, u32 Words, u8 Pattern, u8 Subtest)" -->
|
||
|
<div class="memitem">
|
||
|
<div class="memproto">
|
||
|
<table class="memname">
|
||
|
<tr>
|
||
|
<td class="memname">int XUtil_MemoryTest8 </td>
|
||
|
<td>(</td>
|
||
|
<td class="paramtype">u8 * </td>
|
||
|
<td class="paramname"> <em>Addr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u32 </td>
|
||
|
<td class="paramname"> <em>Words</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u8 </td>
|
||
|
<td class="paramname"> <em>Pattern</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="paramkey"></td>
|
||
|
<td></td>
|
||
|
<td class="paramtype">u8 </td>
|
||
|
<td class="paramname"> <em>Subtest</em></td><td> </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td></td>
|
||
|
<td>)</td>
|
||
|
<td></td><td></td><td width="100%"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</div>
|
||
|
<div class="memdoc">
|
||
|
|
||
|
<p>
|
||
|
Performs 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> </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> </td><td>is the length of the block. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Pattern</em> </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> </td><td>is the test selected. See <a class="el" href="xutil_8h.html">xutil.h</a> for possible values.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd></dd></dl>
|
||
|
<ul>
|
||
|
<li>XST_MEMTEST_FAILED is returned for a failure</li><li>XST_SUCCESS 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 XUT_WALKONES and XUT_WALKZEROS will repeat on a boundry of a power of two making it more difficult to detect addressing errors. The XUT_INCREMENT and XUT_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.
|
||
|
</div>
|
||
|
</div><p>
|
||
|
<p class="Copyright">
|
||
|
Copyright © 1995-2011 Xilinx, Inc. All rights reserved.
|
||
|
</p>
|
||
|
</body>
|
||
|
</html>
|
||
|
|