Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 9ecb760a948bc81e38dd7cfd8e85d12f > files > 41

bladerf-doc-2014.11-1.mga5.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>libbladeRF: Sample Formats and Metadata</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<script type="text/x-mathjax-config">
  MathJax.Hub.Config({
    extensions: ["tex2jax.js"],
    jax: ["input/TeX","output/HTML-CSS"],
});
</script><script src="http://www.mathjax.org/mathjax/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo-padded.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname">libbladeRF
   &#160;<span id="projectnumber">1.1.0</span>
   </div>
   <div id="projectbrief">Nuand bladeRF library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Data Structures</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#nested-classes">Data Structures</a> &#124;
<a href="#define-members">Macros</a> &#124;
<a href="#enum-members">Enumerations</a>  </div>
  <div class="headertitle">
<div class="title">Sample Formats and Metadata</div>  </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Data Structures</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="structbladerf__metadata.html">bladerf_metadata</a></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:ga5c2c095d1681ffe8928d84c8b4cca714"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#ga5c2c095d1681ffe8928d84c8b4cca714">BLADERF_META_STATUS_OVERRUN</a>&#160;&#160;&#160;(1 &lt;&lt; 0)</td></tr>
<tr class="separator:ga5c2c095d1681ffe8928d84c8b4cca714"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae7bfccab53ac74c940fd052e57fbe50b"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#gae7bfccab53ac74c940fd052e57fbe50b">BLADERF_META_STATUS_UNDERRUN</a>&#160;&#160;&#160;(1 &lt;&lt; 1)</td></tr>
<tr class="separator:gae7bfccab53ac74c940fd052e57fbe50b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga2aef16902d542172be1b87917d89de10"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#ga2aef16902d542172be1b87917d89de10">BLADERF_META_FLAG_TX_BURST_START</a>&#160;&#160;&#160;(1 &lt;&lt; 0)</td></tr>
<tr class="separator:ga2aef16902d542172be1b87917d89de10"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaa9a2d61688c4b775b52a0acfed32f50a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#gaa9a2d61688c4b775b52a0acfed32f50a">BLADERF_META_FLAG_TX_BURST_END</a>&#160;&#160;&#160;(1 &lt;&lt; 1)</td></tr>
<tr class="separator:gaa9a2d61688c4b775b52a0acfed32f50a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1b97e995f8d20531427e316fbac3c1f9"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#ga1b97e995f8d20531427e316fbac3c1f9">BLADERF_META_FLAG_TX_NOW</a>&#160;&#160;&#160;(1 &lt;&lt; 2)</td></tr>
<tr class="separator:ga1b97e995f8d20531427e316fbac3c1f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga63edd4df536045366c24df13d2c49899"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#ga63edd4df536045366c24df13d2c49899">BLADERF_META_FLAG_RX_NOW</a>&#160;&#160;&#160;(1 &lt;&lt; 31)</td></tr>
<tr class="separator:ga63edd4df536045366c24df13d2c49899"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:ga4c61587834fd4de51a8e2d34e14a73b2"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group___f_m_t___m_e_t_a.html#ga4c61587834fd4de51a8e2d34e14a73b2">bladerf_format</a> { <a class="el" href="group___f_m_t___m_e_t_a.html#gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6">BLADERF_FORMAT_SC16_Q11</a>, 
<a class="el" href="group___f_m_t___m_e_t_a.html#gga4c61587834fd4de51a8e2d34e14a73b2a4af3974535ba338bbcecaa8d7500de03">BLADERF_FORMAT_SC16_Q11_META</a>
 }</td></tr>
<tr class="separator:ga4c61587834fd4de51a8e2d34e14a73b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>This section defines the available sample formats and metadata flags. </p>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ga63edd4df536045366c24df13d2c49899"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_FLAG_RX_NOW&#160;&#160;&#160;(1 &lt;&lt; 31)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This flag indicates that calls to bladerf_sync_rx should return any available samples, rather than wait until the timestamp indicated in the <a class="el" href="structbladerf__metadata.html">bladerf_metadata</a> timestamp field. </p>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01308">1308</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<a class="anchor" id="gaa9a2d61688c4b775b52a0acfed32f50a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_FLAG_TX_BURST_END&#160;&#160;&#160;(1 &lt;&lt; 1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mark the associated buffer as the end of a burst transmission. This will flush the remainder of the sync interfaces' current working buffer and enqueue samples into the transmit FIFO.</p>
<p>When specifying this flag to <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a>, the final two samples in the synchronous interface's internal working buffer <b>must</b> be zero. Unexpected results may occur if this is not the case. To ensure this requirement is met, API users should ensure the last two samples provided to <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a> are zero when using <a class="el" href="group___f_m_t___m_e_t_a.html#gaa9a2d61688c4b775b52a0acfed32f50a">BLADERF_META_FLAG_TX_BURST_END</a>. One way to do this is to end bursts with a call of <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a> with this flag set and a buffer of 2 or more zero samples.</p>
<p>Flushing the sync interface's working buffer implies that after specifying this flag, the next timestamp that can be transmitted is the current timestamp plus the duration of the burst that this flag is ending <b>and</b> the remaining length of the remaining buffer that is flushed. (The buffer size, in this case, is the <code>buffer_size</code> value passed to the previous <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gacde68e74a8f7d27100b071634b2e65c5">bladerf_sync_config()</a> call.)</p>
<p>Rather than attempting to keep track of the number of samples sent with respect to buffer sizes, it is easiest to always assume 1 buffer's worth of time is required between bursts. In this case "buffer" refers to the <code>buffer_size</code> parameter provided to <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gacde68e74a8f7d27100b071634b2e65c5">bladerf_sync_config()</a>.) If this is too much time, consider combining multiple bursts and manually zero-padding samples between them.</p>
<p>This is only used for the <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a> call. It is ignored by the <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gacbe845827dd4ad717f3cbc812e66b204">bladerf_sync_rx()</a> call. </p>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01291">1291</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga2aef16902d542172be1b87917d89de10"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_FLAG_TX_BURST_START&#160;&#160;&#160;(1 &lt;&lt; 0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Mark the associated buffer as the start of a burst transmission. This is only used for the <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a> call. </p>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01258">1258</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga1b97e995f8d20531427e316fbac3c1f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_FLAG_TX_NOW&#160;&#160;&#160;(1 &lt;&lt; 2)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Use this flag in conjunction with <a class="el" href="group___f_m_t___m_e_t_a.html#ga2aef16902d542172be1b87917d89de10">BLADERF_META_FLAG_TX_BURST_START</a> to indicate that the burst should be transmitted as soon as possible, as opposed to waiting for a specific timestamp.</p>
<p>When this flag is used, there is no need to set the <a class="el" href="structbladerf__metadata.html#a465bef81f6478756e5443025b1f2ddfa">bladerf_metadata::timestamp</a> field. </p>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01301">1301</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<a class="anchor" id="ga5c2c095d1681ffe8928d84c8b4cca714"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_STATUS_OVERRUN&#160;&#160;&#160;(1 &lt;&lt; 0)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A sample overrun has occurred. This indicates that either the host (more likely) or the FPGA is not keeping up with the incoming samples </p>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01235">1235</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<a class="anchor" id="gae7bfccab53ac74c940fd052e57fbe50b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define BLADERF_META_STATUS_UNDERRUN&#160;&#160;&#160;(1 &lt;&lt; 1)</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>A sample underrun has occurred. This generally only occurrs on the TX module when the FPGA is starved of samples.</p>
<dl class="section note"><dt>Note</dt><dd>libbladeRF does not report this status. It is here for future use. </dd></dl>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01243">1243</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="ga4c61587834fd4de51a8e2d34e14a73b2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">enum <a class="el" href="group___f_m_t___m_e_t_a.html#ga4c61587834fd4de51a8e2d34e14a73b2">bladerf_format</a></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Sample format </p>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><em><a class="anchor" id="gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6"></a>BLADERF_FORMAT_SC16_Q11</em>&#160;</td><td class="fielddoc">
<p>Signed, Complex 16-bit Q11. This is the native format of the DAC data.</p>
<p>Values in the range [-2048, 2048) are used to represent [-1.0, 1.0). Note that the lower bound here is inclusive, and the upper bound is exclusive. Ensure that provided samples stay within [-2048, 2047].</p>
<p>Samples consist of interleaved IQ value pairs, with I being the first value in the pair. Each value in the pair is a right-aligned, little-endian int16_t. The FPGA ensures that these values are sign-extended.</p>
<p>When using this format the minimum required buffer size, in bytes, is: </p>
<pre>
  buffer_size_min = [ 2 * num_samples * sizeof(int16_t) ]
</pre><p>For example, to hold 2048 samples, a buffer must be at least 8192 bytes large. </p>
</td></tr>
<tr><td class="fieldname"><em><a class="anchor" id="gga4c61587834fd4de51a8e2d34e14a73b2a4af3974535ba338bbcecaa8d7500de03"></a>BLADERF_FORMAT_SC16_Q11_META</em>&#160;</td><td class="fielddoc">
<p>This format is the same as the <a class="el" href="group___f_m_t___m_e_t_a.html#gga4c61587834fd4de51a8e2d34e14a73b2a92cfbda7a5577c809e2ff6123f8f30b6">BLADERF_FORMAT_SC16_Q11</a> format, except the first 4 samples (16 bytes) in every block of 1024 samples are replaced with metadata, organized as follows, with all fields being little endian byte order:</p>
<pre>
 0x00 [uint32_t:  Reserved]
 0x04 [uint64_t:  64-bit Timestamp]
 0x0c [uint32_t:  BLADERF_META_FLAG_* flags]
</pre><p>When using the <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gacbe845827dd4ad717f3cbc812e66b204">bladerf_sync_rx()</a> and <a class="el" href="group___f_n___d_a_t_a___s_y_n_c.html#gac4a13bf1cb10d9a3e547b8c654268c35">bladerf_sync_tx()</a> functions, this detail is transparent to caller. These functions take care of packing/unpacking the metadata into/from the data, via the <a class="el" href="structbladerf__metadata.html">bladerf_metadata</a> structure.</p>
<p>Currently, when using the asynchronous data transfer interface, the user is responsible for manually packing/unpacking this metadata into/from their sample data. </p>
</td></tr>
</table>

<p>Definition at line <a class="el" href="libblade_r_f_8h_source.html#l01177">1177</a> of file <a class="el" href="libblade_r_f_8h_source.html">libbladeRF.h</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Tue Dec 23 2014 13:02:14 for libbladeRF by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>