Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

sqrt? 1

Status
Not open for further replies.

edje66

Programmer
Jul 19, 2004
11
0
0
FR
Hello,
somebody know how to realized a fonction sqrt in VHDL?
Thank you!
 
ieee.math_real package has a function sqrt.

It may only be behavioural, if it is and you need a working function that you can synthesize, you will probably have the most luck looking for a function from your vendor (fpga, asic, whatever)

--
 
just a note. I am guessing that it will be really hard to implement in hardware unless you have a DSP embedded in your device.

A quick google search finds this paper:
which looks like it could be implemented, but its going to take a lot of work and logic resources. The DSP would be much better if you have it.

--
 
And I should say that this doesn't use too much logic, although not little either:
Length= 32 bit : Number of SLICES : 81; Clock Frequency : 131.70 MHz
Length=16 bit : Number of SLICES : 43; Clock Frequency :143.37 MHz

(On a Spartan II)
 
And I should say that this doesn't use too much logic, although not little either:
Length= 32 bit : Number of SLICES : 81; Clock Frequency : 131.70 MHz
Length=16 bit : Number of SLICES : 43; Clock Frequency :143.37 MHz
(I think the algorithm iterates the number of bits of each input.)

(On a Spartan II)
 
I need to calculate the magnitude of a complex number: sqrt(X²+Y²). Now I think the best is the CORDIC algorithm. But I don't know yet how to implement that in VHDL. I expect find that nearly!
 
only + - * and logic operations can be synthesized;and the
others maybe can be synthesized,but you don't know the result
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top