Sign in

username:

password:



Not a member?

Search compdsp



Search tips

comp.dsp by Keywords

Adaptive Filter | ADPCM | ADSP | ADSP-2181 | Aliasing | AMR | Anti-Aliasing | ARMA | Autocorrelation | AutoCovariance | Beamforming | Bessel | Blackfin | Butterworth | C6713 | CCS | Chebyshev | CIC Filter | Circular Convolution | Code Composer Studio | Comb Filter | Compression | Convolution | Cross Correlation | DCT | Decimation | Deconvolution | Demodulation | DM642 | DSP Boards | DSP/BIOS | DTMF | Echo Cancellation | Equalization | Equalizer | ETSI | EZLITE (Ez-kit Lite) | FFT | FFTW | FIR Filter | Fixed Point | FSK | G.711 | G.723 | G.729 | Gaussian Noise | Goertzel | GPIO | Hilbert Transform | IFFT | IIR Filter | Interpolation | Invariance | JTAG | Kalman | Laplace Transform | Levinson | LPC | McBSP | MIPS | Modulation | MPEG | Multirate | Notch Filter | Nyquist | OFDM | Oversampling | Pink Noise | Pitch | PLL | Polyphase | QAM | QDMA | Quantization | Quantizer | Radar | Random Noise | Reed Solomon | Remez | Resampling | RTDX | Sampling | Sharc | TI C6711 | Undersampling | Viterbi | Wavelets | White Noise | Wiener Filter | Windowing | XDS510PP | Z Transform

Sponsor

Industry's highest performing at the lowest power DSPs now as low as $5.00*
Start development today!
*volume pricing for 10ku

Discussion Groups

Free Online Books

See Also

Embedded SystemsFPGAElectronics

Discussion Groups | Comp.DSP | C6711 DSK, DSPLIB, autocorrelation, double-word aligned?

There are 2 messages in this thread.

You are currently looking at messages 0 to 2.


C6711 DSK, DSPLIB, autocorrelation, double-word aligned? - Joe - 2005-05-30 21:24:00

Hey everybody

I am a newbie when it comes to C-programming and DSPs. I have been playing 
around with the autocorrelation-function that comes with TI's DSPLIB. I have 
made a small program to see how the autocorrelation-function works. The 
program compiles without errors but I do not get the right results. Here is 
the program:

#include "dspf_sp_autocor.h"

void main()
{

int nr=16;
int nx=16;

float r[16]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
float x[16]={1,2,3,4,5,6,7,8,9,0,0,0,0,0,0,0};

 DSPF_sp_autocor (r,x,nx, nr);
while(1);
}

Is there somebody out there who can point me to a solution of the problem? 
The documentation talks about double-word alignment but I haven't been able 
to find out what that is?

The documentation for the function is on page 29 in this PDF:

http://users.cybercity.dk/~dsl159353/USERGUIDE.pdf

Thanks :o)



______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.

Re: C6711 DSK, DSPLIB, autocorrelation, double-word aligned? - Mark Robinson - 2005-05-31 09:19:00



Joe wrote:
> 
> The documentation talks about double-word alignment but I haven't been able
> to find out what that is?

Alignment in this case simply refers to where in memory the data is
stored. If an array is to be, say, 128bit aligned (alignment is often
specified in bits to remove ambiguity about the meaning of "word",
"dword", etc), then the address of the start of the array must be
divisible by 16.

How you specify alignment depends on the compiler you are using. TI's
compilers have a pragma, so for example:

#pragma DATA_ALIGN(foo, 128)
unsigned char foo[100];

would align foo on a 128 bit boundary. For memory allocated on the
heap, MEM_alloc and friends allow you to specify the alignment as a
parameter to the function.

Cheers

mark-r

-- 
"Let's meet the panel. You couldn't ask for four finer comedians -
so that answers your next question..."
 -- Humphrey Lyttleton
______________________________
New DSP Code Snippets Section now Live.   Learn more about the reward program for contributors here.