Continue to Site

# How can calculate the sine an cosine function by using FPGA?

Status
Not open for further replies.

#### nattawoot_s

##### Newbie level 5
how to calculate cosine

How can calculate the sine and consine function by using FPGA or VHDL code?

calculate sine

Good luck
Lollo

cos calculation vhdl

You can use a look-up table or a CORDIC algorithm.

Try a search also in this forum.

If you use @ltera they have an evaluation macro that implements
CORDIC in serial or parallel way.

Bye

sine calculation vhdl

nattawoot_s said:
How can calculate the sine and consine function by using FPGA or VHDL code?

If you are using Xilinx, you can use the coregen to produce a sine cosine lookup table. I am not sure how Altera will work but I will assume they have something like that also.

Gunship

vhdl code to calculate sine using cordic

for small table of sines/cosines you can use look-up table, for values more precise you can use CORDIC.

CORDIC is very simple in fact, if you take any complex number, let it be overal length of 1, then if you multiply with another complex number with length 1 then you in fact just rotates the first one.

for example take Z*e^ia where a is angle (let it be 0) and i is SQRT(-1);imaginary unit and Z is nonzero constant. this is complex number laying on real axe (cos a + i sin a)-Euler's rule.
then if you multiply it with e^ib, where b is also angle (nonzero for example), you get
Z*e^î(a+b). as you see you have rotated vector Z around center for angle b. :idea:
with this in mind you can make sin/cos generator (but you need very small look table - very eficient method is by principle of succesive aproximation). the resut is precise as you want it
Use pipeline multiplier, becouse you need four multipliers (if' it's pipelined, you can multiplex imput data and then demultiplex result)

calculate sinus

I'm used altera Flex10k FPGA.

how to calculate cos

There are special IP Core In Xilinx Core Generator. Imho, best way - look-up table - calculation provide many cells and slowly.

calculation of sines

Do you want to calculate sinus of any angle. (0, pi/2, pi, pi/4 .. random)
or do you want to calculate sinus of periodic incremental angle.(0,0.01,0.02,0.03.....) Which one ?

cosine series vhdl code

nattawoot_s said:
How can calculate the sine and consine function by using FPGA or VHDL code?

For synopsys users:
If you have the DesignWare Foundation Library (dw_2) licensed, you can use the DW02_sincos model.

see attached file.

sine lookup table fpga

Xilinx has IPcore named CORDIC. It will can be configured as sin, cos, arc tan, square root function.

how to calculate sine

DDS through LUT or CORDIC algorithm

how to calculate sinus

LUT may be the most popular way for FPGA

tan lookup table fpga

CORDIC algorithm is easy to implement with FPGA

vhdl+sine

if I use xilinx FPGA, what is the max speed that can be achieved...and how much resource will it take...

sine cosine fpga

if I use xilinx FPGA, and use cordic algorithm, what is the max speed that can be achieved...and how much resource will it take...

using lookup tables sine cosine in vhdl

For the cordic core at opencores the following data is available:

Vendor Family Device Resource usage Max. Clock speed
Altera ACEX EP1K50-1 2190lcells 68MHz
Xilinx Spartan-II XC2S100-6 704slices 93MHz

Aircraft Maniac

how to use the ipcore for sine in a project

Re: How can calculate the sine an cosine function by using F

If you want to "Roll Your Own" here an interesting PDF on CORDIC Algorithms for FPGAs.

It's always good to know the reason why!

Re: How can calculate the sine an cosine function by using F

i want to implement a function which will convert cartesian to polar co-orinates using IPcoder CORDIC in VHDL using Xlinx.

help me

Status
Not open for further replies.