cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Observer
Observer
6,847 Views
Registered: ‎02-24-2014

sqt function required for rms calculation

Jump to solution

i want to calculate rms values of some signals.

xrms = sqrt{ 1/n*( x_1^2 + x_2^2 + ...... + x_n^2 ) }.

but the problem is sqrt operation. i have used cordac but it does not gives precise values u can either give integers or fractions. I have also tried sqrt function from fixed_alg_ug pkg but its not synthesizable because it depends on real_math pkg.
i need a sqrt code which can give me precise answer for example

when 48 goes to => sqrt => gives 6.928 => not 7

Haider
Tags (1)
0 Kudos
1 Solution

Accepted Solutions
Highlighted
Xilinx Employee
Xilinx Employee
10,005 Views
Registered: ‎08-01-2008

use cordic for sqrt function.

 

www.xilinx.com/products/intellectual-property/CORDIC.htm

 

Cordic supports these functions

 

Feature Summary
• Functional configurations
° Vector rotation (polar to rectangular)
° Vector translation (rectangular to polar)
° Sin and Cos
° Sinh and Cosh
° Atan
° Atanh
° Square root

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.

View solution in original post

0 Kudos
3 Replies
Highlighted
Instructor
Instructor
6,829 Views
Registered: ‎07-21-2009

Suggest you post this problem to the IP forum.  This has nothing to do with Design Entry or FPGAs.

 

-- 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
Highlighted
Xilinx Employee
Xilinx Employee
6,813 Views
Registered: ‎09-20-2012

Moved this to IP board

 

Thanks,

Deepika.

Thanks,
Deepika.
--------------------------------------------------------------------------------------------
Google your question before posting. If someone's post answers your question, mark the post as answer with "Accept as solution". If you see a particularly good and informative post, consider giving it Kudos (the star on the left)
0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
10,006 Views
Registered: ‎08-01-2008

use cordic for sqrt function.

 

www.xilinx.com/products/intellectual-property/CORDIC.htm

 

Cordic supports these functions

 

Feature Summary
• Functional configurations
° Vector rotation (polar to rectangular)
° Vector translation (rectangular to polar)
° Sin and Cos
° Sinh and Cosh
° Atan
° Atanh
° Square root

Thanks and Regards
Balkrishan
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.

View solution in original post

0 Kudos