cancel
Showing results for
Show  only  | Search instead for
Did you mean:
Highlighted
Visitor
10,483 Views
Registered: ‎04-07-2010

## can anyone help me in implementing cross correlation in verilog or vhdl or give some code

hi,

can anyone help me in implementing cross correlation in verilog or vhdl or give some code.i cn't find any woring on it

majidshah353@hotmail.com

7 Replies
Highlighted
Teacher
10,464 Views
Registered: ‎07-09-2009

HI

have a look on wikipedia,

cross corelatino is easy,

You have two vectors of numbers, one the input, one the correlation.

Now this is from old memory so plkease check,

You reverse the input vector

then multiple all the corelatino against the first lot of the input, and add together.

the answer goes in bin 0,

you then slide the corelatoin one down the input, and reeate, but the addition goes into bin 1,

contiunue,

<== If this was helpful, please feel free to give Kudos, and close if it answers your question ==>
Highlighted
Visitor
10,322 Views
Registered: ‎05-10-2010

how about the auto correlation? did i need to use the cordic ip core to help me doing that?

Highlighted
Observer
10,315 Views
Registered: ‎05-11-2010

No you do not need CORDIC for either cross-correlation or auto-correlation.  The correlation is very similar to FIR filtering, the difference is the reference waveform (the coefficients) are reversed for correlation relative to the order they are presented for FIR filtering.  For auto-correlation, the signal is also the reference so you need to cycle the reference coefficients to make it work, but the structure is still basically an FIR filter.

Highlighted
Visitor
10,299 Views
Registered: ‎05-10-2010

I saw the data sheet of the fir filter IP core  the formula of the single rate FIR is similar to the cross correlation but not the same...

Highlighted
Observer
10,279 Views
Registered: ‎05-11-2010

It is the same except the order is reversed.

FIR filter is Y(k) = X(k)C0 + X(k-1)C1 + X(k-2)C2 + ... + X(1)C(k-1)

Correlation is

Y(k)=X(0)C(0) + X(1)C(1) + ....+ x(k)C(k)

Highlighted
Observer
9,302 Views
Registered: ‎12-28-2010

I took a sin wave block and took the coefficients of them and made and reversal of those coefficients and used them in fir complier as coefficients and then connected the same sine wave block to fir complier and was not getting the output . it is always showing zero.

Highlighted
Instructor
9,284 Views
Registered: ‎07-21-2009

I took a sin wave block and took the coefficients of them and made and reversal of those coefficients and used them in fir complier as coefficients and then connected the same sine wave block to fir complier and was not getting the output . it is always showing zero.

Please stick to one thread for a single topic.  This is the 3rd thread to which you've posted the same problem, making it difficult for others to read and respond.

- Bob Elkind

SIGNATURE: