Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

atan LUT vhdl from 1/8 quarter to full circle

Status
Not open for further replies.

jackobian

Member level 1
Joined
Sep 18, 2011
Messages
37
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,286
Activity points
1,542
Can any one help me with generating vhdl lut atan from 0-45 mapping to -90 - 90
 

Why not tell us what problems you are having so far rather than asking for someone to do your work for you?
 

Sir i do not need code but what i need is the mathematical equation of doing that
 

Its quite straforward:
Y = atan(X) where X = -90 to +90
 

I mean let say that 0-512 represent 0-45 degree how to figure out other sectors from that 0-511 one
 

45/512 degrees per 0-512 values, so calculate the equation Tricky supplied based on increments of 45/512 degrees then scale everything accordingly to the bit width of your LUT.

- - - Updated - - -

45/512 degrees per 0-512 values, so calculate the equation Tricky supplied based on increments of 45/512 degrees then scale everything accordingly to the bit width of your LUT.

Edit...

I just realized this doesn't answer your original question...

You are trying to implement a lookup table that has only ATAN defined for 0-45 using a 512 entry table, which you use to produce a -90 to +90 output, which are the limits of the ATAN function. This probably can't be done as ATAN on the X axis goes from -infinity to +infinity and produces the output -pi/2 to +pi/2. Tricky's equation appear to be wrong. See the following graphs of the arctan funciton.

The only way to reduce an ATAN function LUT is to produce a table that has the last value at the limit of your resolution for pi/2 down to 0 and then use either negative values of this table or the positive values depending on the sign of the input, i.e. you can only reduce the size of the table by 2.
 
atan function has some simple symmetry properties that helps you to make the table. Unfortunaterly an important relation isn't mentioned in the above wolfram link. But you should find it in any good mathematic handbook. Or e.g. at Wikipedia:
https://en.wikipedia.org/wiki/Inver...ips_among_the_inverse_trigonometric_functions

By applying atan(1/x) = pi/2 - atan(x), you can construct the 45 to 90° range. Negative range is just an inversion.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top