cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
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

 

0 Kudos
7 Replies
Highlighted
Teacher
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 ==>
0 Kudos
Highlighted
Visitor
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?

0 Kudos
Highlighted
Observer
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.

0 Kudos
Highlighted
Visitor
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...

0 Kudos
Highlighted
Observer
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)

0 Kudos
Highlighted
Observer
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.

 

please help me 

waiting for your reply

  mahadev

0 Kudos
Highlighted
Instructor
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 help me 

waiting for your reply

  mahadev

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:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
0 Kudos