360 lines
16 KiB
HTML
360 lines
16 KiB
HTML
![]() |
<html>
|
||
|
<head>
|
||
|
<meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
|
||
|
<title>
|
||
|
xsrio.c File Reference
|
||
|
</title>
|
||
|
<link href="$DriverApiDocsCssPath" 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.5 -->
|
||
|
<div class="tabs">
|
||
|
<ul>
|
||
|
<li><a href="index.html"><span>Main Page</span></a></li>
|
||
|
<li><a href="annotated.html"><span>Classes</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>File Members</span></a></li>
|
||
|
</ul></div>
|
||
|
<h1>xsrio.c File Reference</h1><hr><a name="_details"></a><h2>Detailed Description</h2>
|
||
|
This file contains the required functions for the <a class="el" href="struct_x_srio.html">XSrio</a> driver. See the xsrio.h header file for more details on this driver.<p>
|
||
|
<pre>
|
||
|
MODIFICATION HISTORY:</pre><p>
|
||
|
<pre> Ver Who Date Changes
|
||
|
----- ---- -------- -------------------------------------------------------
|
||
|
1.0 adk 16/04/14 Initial release
|
||
|
</pre>
|
||
|
<p>
|
||
|
<code>#include "xsrio.h"</code><br>
|
||
|
<table border="0" cellpadding="0" cellspacing="0">
|
||
|
<tr><td></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="xsrio_8c.html#089ca5027dca113131f8501c62e58f5b">XSrio_CfgInitialize</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr, <a class="el" href="struct_x_srio___config.html">XSrio_Config</a> *Config, u32 EffectiveAddress)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsrio_8c.html#5f25507c6032b7b000c42fa1c7c52a79">XSrio_GetPortStatus</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsrio_8c.html#1c1eb13b02af268872cdbd5247344e9f">XSrio_GetPEType</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="xsrio_8c.html#d060ff367c059f67fcb49f8b28926c88">XSrio_IsOperationSupported</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr, u8 Operation, u8 Direction)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xsrio_8c.html#5d37eb540bc8458e09dc0b02a02a67d7">XSrio_SetWaterMark</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr, u8 WaterMark0, u8 WaterMark1, u8 WaterMark2)</td></tr>
|
||
|
|
||
|
<tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="xsrio_8c.html#808794d185b5c84df2af90688885221a">XSrio_GetWaterMark</a> (<a class="el" href="struct_x_srio.html">XSrio</a> *InstancePtr, u8 *WaterMark0, u8 *WaterMark1, u8 *WaterMark2)</td></tr>
|
||
|
|
||
|
</table>
|
||
|
<hr><h2>Function Documentation</h2>
|
||
|
<a class="anchor" name="089ca5027dca113131f8501c62e58f5b"></a><!-- doxytag: member="xsrio.c::XSrio_CfgInitialize" ref="089ca5027dca113131f8501c62e58f5b" args="(XSrio *InstancePtr, XSrio_Config *Config, u32 EffectiveAddress)" --><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 XSrio_CfgInitialize </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap><a class="el" href="struct_x_srio___config.html">XSrio_Config</a> * </td>
|
||
|
<td class="mdname" nowrap> <em>Config</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u32 </td>
|
||
|
<td class="mdname" nowrap> <em>EffectiveAddress</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
Initialize the <a class="el" href="struct_x_srio.html">XSrio</a> instance provided by the caller based on the given Config structure.<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>InstancePtr</em> </td><td>is the <a class="el" href="struct_x_srio.html">XSrio</a> instance to operate on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Config</em> </td><td>is the device configuration structure containing information about a specific SRIO Device. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>EffectiveAddress</em> </td><td>is the Physical address of the hardware in a Virtual Memory operating system environment.It is the Base Address in a stand alone environment.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS Initialization was successful.</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="1c1eb13b02af268872cdbd5247344e9f"></a><!-- doxytag: member="xsrio.c::XSrio_GetPEType" ref="1c1eb13b02af268872cdbd5247344e9f" args="(XSrio *InstancePtr)" --><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 XSrio_GetPEType </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
XSrio_GetPEType API will check for the Processing Element type and return the type of type of Processing Element<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>InstancePtr</em> </td><td>is the <a class="el" href="struct_x_srio.html">XSrio</a> instance to operate on.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XSRIO_IS_MEMORY if the core is configured as a memory</li><li>XSRIO_IS_PROCESSOR if the core is configured as a processor</li><li>XSRIO_IS_BRIDGE if the core is configured as a bridge.</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>: None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="5f25507c6032b7b000c42fa1c7c52a79"></a><!-- doxytag: member="xsrio.c::XSrio_GetPortStatus" ref="5f25507c6032b7b000c42fa1c7c52a79" args="(XSrio *InstancePtr)" --><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 XSrio_GetPortStatus </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname1" valign="top" nowrap> <em>InstancePtr</em> </td>
|
||
|
<td class="md" valign="top"> ) </td>
|
||
|
<td class="md" nowrap></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
XSrio_GetPortStatus will check the status of the port and returns the status of the port to the user<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>InstancePtr</em> </td><td>is the <a class="el" href="struct_x_srio.html">XSrio</a> instance to operate on.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XSRIO_PORT_OK Port is initialized with no errors.</li><li>XSRIO_PORT_UNINITIALIZED Port is not initialized. No Serial Rapidio link is present.</li><li>XSRIO_PORT_HAS_ERRORS Port is initialized but has errors.</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>: None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="808794d185b5c84df2af90688885221a"></a><!-- doxytag: member="xsrio.c::XSrio_GetWaterMark" ref="808794d185b5c84df2af90688885221a" args="(XSrio *InstancePtr, u8 *WaterMark0, u8 *WaterMark1, u8 *WaterMark2)" --><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">void XSrio_GetWaterMark </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark0</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark1</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 * </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark2</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
XSrio_GetWaterMark API reads the water mark values.<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>InstancePtr</em> </td><td>is the <a class="el" href="struct_x_srio.html">XSrio</a> instance to operate on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark0</em> </td><td>is a pointer to a variable where the driver will pass back the water mark 0 value. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark1</em> </td><td>is a pointer to a variable where the driver will pass back the water mark 1 value. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark2</em> </td><td>is a pointer to a variable where the driver will pass back the water mark 2 value.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>: None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="d060ff367c059f67fcb49f8b28926c88"></a><!-- doxytag: member="xsrio.c::XSrio_IsOperationSupported" ref="d060ff367c059f67fcb49f8b28926c88" args="(XSrio *InstancePtr, u8 Operation, u8 Direction)" --><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 XSrio_IsOperationSupported </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 </td>
|
||
|
<td class="mdname" nowrap> <em>Operation</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 </td>
|
||
|
<td class="mdname" nowrap> <em>Direction</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
XSrio_IsOperationSupported tells whether the operation is supported by the SRIO Gen2 core or not.<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>InstancePtr</em> </td><td>is a pointer to the SRIO Gen2 instance to be worked on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Operation</em> </td><td>type is the operation type of the SRIO Packet </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>Direction</em> </td><td>type</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd><ul>
|
||
|
<li>XST_SUCCESS if the operation is supported by the core.<ul>
|
||
|
<li>XST_FAILURE if the operation is not supported by the core.</li></ul>
|
||
|
</li></ul>
|
||
|
</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<a class="anchor" name="5d37eb540bc8458e09dc0b02a02a67d7"></a><!-- doxytag: member="xsrio.c::XSrio_SetWaterMark" ref="5d37eb540bc8458e09dc0b02a02a67d7" args="(XSrio *InstancePtr, u8 WaterMark0, u8 WaterMark1, u8 WaterMark2)" --><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">void XSrio_SetWaterMark </td>
|
||
|
<td class="md" valign="top">( </td>
|
||
|
<td class="md" nowrap valign="top"><a class="el" href="struct_x_srio.html">XSrio</a> * </td>
|
||
|
<td class="mdname" nowrap> <em>InstancePtr</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark0</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark1</em>, </td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md" nowrap align="right"></td>
|
||
|
<td class="md"></td>
|
||
|
<td class="md" nowrap>u8 </td>
|
||
|
<td class="mdname" nowrap> <em>WaterMark2</em></td>
|
||
|
</tr>
|
||
|
<tr>
|
||
|
<td class="md"></td>
|
||
|
<td class="md">) </td>
|
||
|
<td class="md" colspan="2"></td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
<table cellspacing="5" cellpadding="0" border="0">
|
||
|
<tr>
|
||
|
<td>
|
||
|
|
||
|
</td>
|
||
|
<td>
|
||
|
|
||
|
<p>
|
||
|
XSrio_SetWaterMark Configures the watermark to transfer a priority packet.<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>InstancePtr</em> </td><td>is a pointer to the SRIO Gen2 instance to be worked on. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark0</em> </td><td>is the water mark value to transfer a priority 0 packet. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark1</em> </td><td>is the water mark value to transfer a priority 1 packet. </td></tr>
|
||
|
<tr><td valign="top"></td><td valign="top"><em>WaterMark2</em> </td><td>is the water mark value to transfer a priority 2 packet.</td></tr>
|
||
|
</table>
|
||
|
</dl>
|
||
|
<dl compact><dt><b>Returns:</b></dt><dd>None.</dd></dl>
|
||
|
<dl compact><dt><b>Note:</b></dt><dd>None. </dd></dl>
|
||
|
</td>
|
||
|
</tr>
|
||
|
</table>
|
||
|
Copyright @ 1995-2014 Xilinx, Inc. All rights reserved.
|