1/1

|
cordic function
by amit.shelu on Apr 22, 2011 |
amit.shelu
Posts: 1 Joined: Mar 6, 2011 Last seen: Apr 24, 2011 |
||
|
Hi all,
I want to design a verilog code for a mathematical function - d = square root (a^2 + b^2); can any body suggest me an easy solution for this? thankyou |
|||
|
RE: cordic function
by hellwig on Apr 22, 2011 |
hellwig
Posts: 32 Joined: Dec 30, 2007 Last seen: Aug 24, 2026 |
||
|
Well, strictly spoken, you can't do that at all. If a = b = 1, the mathematical function would yield sqrt(2), which is not a rational number and therefore not exactly representable with any finite number of bits. So in fact you are asking for an approximation to the mathematical function.
To give a sensible answer to your question, you have to specify your precision requirements or, better yet, the representation format of your numbers (a, b, d). Are you speaking of floating point, fixed point, or whole numbers? What range is required? And last but not least, how much time does your hardware have to compute the answer? Is it appropriate to construct a sequential circuit, or do you need something in the direction of a lookup table? Your question is way too general to be meaningful. Hellwig |
|||
1/1

