You don&#39;t need a second buffer if you work from the &quot;back&quot; to the front. I.e., take the data at 8191, and write it to 8192*2-2, and a zero at 8192-1, etc.<br><br>To better understand how to perform different transfers, go to the myriad of examples in the appendix of SPRU234. I think &quot;Figure A&minus;4.Element Synchronized 1D-to-1D Transfer (SUM = 00, DUM = 11)&quot; applies directly.<br>
<br>Joseph<br><br><div class="gmail_quote">On Tue, Nov 3, 2009 at 6:49 PM, Alan Ding <span dir="ltr">&lt;<a href="mailto:alan33d@gmail.com">alan33d@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div>In terms&nbsp; of rearranging the 1/2 full ping buffer to put 0&#39;s in every other sample and spreading out the samples across 2*8192 floats, which I can&#39;t seem to figure out how to do without overwriting something along the way unless if I have a temporary storage buffer.&nbsp; </div>


<div>&nbsp;</div>
<div>In order to do this interpolation, we need another buffer to iterate through, correct?&nbsp; Am I not getting something.</div>
<div>&nbsp;</div>
<div>we first need to do: ping[i]=(float)*((short*)(&amp;ping[i])); to get just the right channel since left and right short values for each index is duplicated.</div>
<div>&nbsp;</div>
<div>we also need a second buffer to DMA into and iterate for 2*4096 samples and place the values in every other sample in the ping buffer with 0&#39;s in between before doing the FFT?</div>
<div>&nbsp;</div>
<div>Hypothetically, if I would like a more elegent solution using the IDX and CNT fields for EDMA, how would I do that?&nbsp; </div>
<div>&nbsp;</div>
<div>I am still element synchronized....&nbsp; the ELERLD field is 2*8192.&nbsp; LINK is pointed to the handle for Pong....&nbsp; I guess how does the IDX field work for our uses to have the every other sample offset when DMA&#39;n into the ping or pong buffer?</div>


<div>&nbsp;</div>
<div>
<div align="left">Parameter Contents Parameter</div><font face="Helvetica" size="1"><font face="Helvetica" size="1">
<p align="left">307D 0002h EDMA Channel Options Parameter (OPT)</p>
<p align="left">3000 0000h EDMA Channel Source Address (SRC)</p>
<p align="left">007Fh 0002h EDMA Channel Transfer Count (CNT)</p>
<p align="left">0000 2000h EDMA Channel Destination Address (DST)</p>
<p align="left">FF81h 0080h EDMA Channel Index (IDX)</p>
<div>0002h 01B0h EDMA Channel Count Reload/Link Address (RLD)</div>
<div>&nbsp;</div>
<div>&nbsp;</div>
<div><font size="2">I think I am lost....</font></div>
<div>&nbsp;</div>
<div><font size="2">Thanks,</font></div>
<div><font size="2"></font>&nbsp;</div>
<div><font size="2">Alan</font></div></font></font><br></div><div><div></div><div class="h5">
<div class="gmail_quote">On Tue, Nov 3, 2009 at 2:11 PM, Wenstrand, Doug S. <span dir="ltr">&lt;<a href="mailto:Douglas.Wenstrand@jhuapl.edu" target="_blank">Douglas.Wenstrand@jhuapl.edu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0px 0px 0px 0.8ex; padding-left: 1ex;">
<div vlink="purple" link="blue" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Second question &ndash; most certainly there is, and you could certainly do that.&nbsp; I presume that you mean that you are going to fill those buffers with 0&rsquo;s and then only put data in the alternating samples.&nbsp; It does introduce a couple of problems though &ndash; if you compute the FFT in place in the buffer, those zeros will be gone, and need to be refilled again.&nbsp; There are ways around that, and there &nbsp;are tons of solutions to get you where you want to be.&nbsp; </span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The thing is, data is going to arrive in a format that isn&rsquo;t what you want in more ways than that.&nbsp; First and foremost, it will be in fixed point form, and it will be packed L/R &hellip;etc.&nbsp; No matter how you look at it, you are going to have to do some sort of pre-processing of the buffer before you do your FFT.&nbsp; If that is the case, you might as well make it simple, just let the ping or pong buffer get &frac12; full with data.&nbsp; Then, when it is done, have a little pre-processing function that picks the right channel, converts the data to float, puts in the 0&rsquo;s.&nbsp; At the end of that function, you&rsquo;ll be using the whole ping or pong buffer, and can FFT it right in place.</span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Like I said, tons of other choices and you are free to do whatever makes sense to you.&nbsp; This is a simple way though, that doesn&rsquo;t require lots of complexity in the DMA, and doesn&rsquo;t really take any significant extra time.</span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Doug</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Note &ndash; the first question </span></p>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">But if we &quot;interdigitate&quot; with zeros, after the buffer is filled with samples, aren&#39;t we going to lose data?</p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p></div>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">The buffer shouldn&rsquo;t be filled with samples, right?&nbsp; That would be too many samples.&nbsp; If your buffer is FFTSIZE*complex, and you have real data, if it is full, you have 2xFFTsize points.&nbsp; The way we are describing it, your buffer would be &frac12; full. &nbsp;</span></p>


<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">&nbsp;</span></p>
<div style="border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; border-width: 1pt medium medium; padding: 3pt 0in 0in;">
<p class="MsoNormal" style="margin-left: 0.5in;"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:dspforum-bounces@echelonembedded.com" target="_blank">dspforum-bounces@echelonembedded.com</a> [mailto:<a href="mailto:dspforum-bounces@echelonembedded.com" target="_blank">dspforum-bounces@echelonembedded.com</a>] <b>On Behalf Of </b>Alan Ding<br>

<b>Sent:</b> Tuesday, November 03, 2009 2:01 PM<br><b>To:</b> <a href="mailto:dspforum@echelonembedded.com" target="_blank">dspforum@echelonembedded.com</a><br><b>Subject:</b> Re: [Dspforum] EDMA Questions</span></p></div>


<div>
<div></div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">&nbsp;</p>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">But if we &quot;interdigitate&quot; with zeros, after the buffer is filled with samples, aren&#39;t we going to lose data?</p></div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">&nbsp;</p></div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;">Is there&nbsp; a way to setup the IDX field to put sample elements in every other buffer index?</p></div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">On Tue, Nov 3, 2009 at 7:50 AM, Joseph Haber &lt;<a href="mailto:josephhaber@gmail.com" target="_blank">josephhaber@gmail.com</a>&gt; wrote:</p>
<p class="MsoNormal" style="margin-left: 0.5in;">All, </p>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">&nbsp;</p></div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">One common way to handle this is to have a for loop in the processing that occurs after the EDMA for a ping or pong buffer is done, prior to the FFT. That would iterate through the loop, select one channel, perform the short-to-float conversion, and interdigitate with zeros.</p>

</div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">&nbsp;</p></div>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="color: rgb(136, 136, 136);">Joseph</span> </p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;">&nbsp;</p>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">On Tue, Nov 3, 2009 at 1:07 AM, Alan Ding &lt;<a href="mailto:alan33d@gmail.com" target="_blank">alan33d@gmail.com</a>&gt; wrote:</p>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;"><span style="color: rgb(255, 102, 102);">- ping and pong buffers are of size COMPLEX*FFTLEN. Does that mean that they are automatically filled with complex zeros or do we have to do that?</span></p>

</div>
<p class="MsoNormal" style="margin-left: 0.5in;">I think we have to do that... I&#39;m still trying to figure out how this element index offset thing work.&nbsp;&nbsp; Since we are DMA&#39;ing 32-bit ints that are L and R channels into a float buffer, how do we extract just the left channel? </p>


<div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;"><br><br><span style="color: rgb(255, 102, 102);"><br>- i have issues finding/understanding RLD register. What is it used for?</span></p>
</div>
<p class="MsoNormal" style="margin-left: 0.5in;">From spru234.pdf:<br><br>&quot;EDMA Channel Count Reload/Link Address Parameter (RLD)<br>The EDMA channel count reload/link address parameter (RLD) in the EDMA<br>parameter entries specifies the value used to reload the element count field<br>

and the link address. The RLD is shown in Figure 2&minus;18 and described in<br>Table 2&minus;25.<br>The 16-bit unsigned element count reload (ELERLD) value reloads the<br>element count (ELECNT) field in the EDMA channel transfer count parameter<br>

(CNT), once the last element in a frame is transferred. ELERLD is used only<br>for a 1D element sync (FS = 0) transfer, since the EDMA has to keep track of<br>the next element address using the element count. This is necessary for multiframe<br>

EDMA transfers, where frame count value is greater than 0. See<br>section 1.7 for more details.<br>The EDMA controller provides a mechanism to link EDMA transfers. This is<br>analogous to the autoinitialization feature in the DMA. When LINK = 1 in the<br>

EDMA channel options parameter (OPT), the 16-bit link address (LINK)<br>specifies the lower 16-bit address in the parameter RAM where the EDMA<br>loads/reloads the parameters of the next event in the chain. Since the entire<br>

EDMA parameter RAM is located in the 01A0 xxxxh area, only the lower 16-bit<br>address is required.<br>The reload parameters are specified in the address range 01A0 0180h to<br>01A0 07F7h. You must ensure that the link address is on a 24-byte boundary,<br>

and that the operation is undefined if this rule is violated (see section 1.9). In<br>addition to the reload parameter space, the entry of any unused EDMA<br>channel can also be used for linking. The EDMA can always have up to 85<br>

programmed entries, regardless of the number of channels actually used.&quot; </p>
<div>
<div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;">&nbsp;</p>
<div>
<p class="MsoNormal" style="margin-left: 0.5in;">On Mon, Nov 2, 2009 at 11:07 PM, Nenad Uzunovic &lt;<a href="mailto:nenad@roboticresearch.com" target="_blank">nenad@roboticresearch.com</a>&gt; wrote:</p>
<p class="MsoNormal" style="margin-left: 0.5in;">Hi there,<br><br>I have a few questions about the EDMA lab.<br><br>- ping and pong buffers are of size COMPLEX*FFTLEN. Does that mean that they are automatically filled with complex zeros or do we have to do that?<br>

<br>- i have issues finding/understanding RLD register. What is it used for?<br><br>Thanks,<br>Nenad<br><br><br><br><br><br><br><br>_______________________________________________<br>Dspforum mailing list<br><a href="mailto:Dspforum@echelonembedded.com" target="_blank">Dspforum@echelonembedded.com</a><br>

<a href="http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com" target="_blank">http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com</a></p></div>
<p class="MsoNormal" style="margin-left: 0.5in;"><br><br clear="all"></p></div></div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;"><span style="color: rgb(136, 136, 136);">-- <br>-------------------------------------------------------<br>Alan Ding<br>Master of Sci, Electrical Engineering<br>

Johns Hopkins University<br><br>Email: <a href="mailto:alan33d@gmail.com" target="_blank">alan33d@gmail.com</a><br>Contact #: 4844593290<br></span><br>_______________________________________________<br>Dspforum mailing list<br>

<a href="mailto:Dspforum@echelonembedded.com" target="_blank">Dspforum@echelonembedded.com</a><br><a href="http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com" target="_blank">http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com</a></p>

</div>
<p class="MsoNormal" style="margin-left: 0.5in;">&nbsp;</p></div></div></div>
<p class="MsoNormal" style="margin-bottom: 12pt; margin-left: 0.5in; margin-right: 0in;"><br>_______________________________________________<br>Dspforum mailing list<br><a href="mailto:Dspforum@echelonembedded.com" target="_blank">Dspforum@echelonembedded.com</a><br>

<a href="http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com" target="_blank">http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com</a></p></div>
<p class="MsoNormal" style="margin-left: 0.5in;"><br><br clear="all"><br>-- <br>-------------------------------------------------------<br>Alan Ding<br>Master of Sci, Electrical Engineering<br>Johns Hopkins University<br>

<br>Email: <a href="mailto:alan33d@gmail.com" target="_blank">alan33d@gmail.com</a><br>Contact #: 4844593290</p></div></div></div></div><br>_______________________________________________<br>Dspforum mailing list<br><a href="mailto:Dspforum@echelonembedded.com" target="_blank">Dspforum@echelonembedded.com</a><br>

<a href="http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com" target="_blank">http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com</a><br><br></blockquote></div><br><br clear="all">

<br>-- <br>-------------------------------------------------------<br>Alan Ding<br>Master of Sci, Electrical Engineering<br>Johns Hopkins University<br><br>Email: <a href="mailto:alan33d@gmail.com" target="_blank">alan33d@gmail.com</a><br>

Contact #: 4844593290<br>
</div></div><br>_______________________________________________<br>
Dspforum mailing list<br>
<a href="mailto:Dspforum@echelonembedded.com">Dspforum@echelonembedded.com</a><br>
<a href="http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com" target="_blank">http://echelonembedded.com/mailman/listinfo/dspforum_echelonembedded.com</a><br>
<br></blockquote></div><br>