sine and cosine wave generation

Can anyone give guidelines on how to generate sine and cosine wave in VHDL?

Reply to
FPGA
Loading thread data ...

Can anyone give guidelines on how to generate sine and cosine wave in VHDL?

Reply to
FPGA

Use a look-up table.

Cheers, Jon

Reply to
Jon Beniston

FPGA schrieb:

A very common technique is a look-up table.

Ralf

Reply to
Ralf Hildebrandt

Could you please explain in more detail

Reply to
FPGA

formatting link

K.

Reply to
Kris Vorwerk

You can build a numerical oscillator:

Initialization: sin[0] = 1; cos[0] = 0;

Iteration: sin[t] = sin[t-1]-cos[t-1]*k; cos[t] = cos[t-1]+sin[t-1]*k;

The Frequency depends on k. If k is 1/2**k you do not even net a multiplier.

This only works for a continues sequence of values. If you need values in random order you must use a lookup table or CORDIC. Both are available as cores in ISE.

Kolja Sulimma cronologic ohg

Reply to
comp.arch.fpga

library IEEE; use IEEE.MATH_REAL.all; signal x,y : real;begin x

Reply to
Symon

If you slightly modify the iteration, like this:

sin[t] = sin[t-1] - cos[t-1] * k; cos[t] = cos[t-1] + sin[t] * k;

then the solution doesn't suffer from accumulating rounding errors, at the cost of some distortion.

Reply to
Arlet Ottens

Thanks all for your help.

Reply to
FPGA

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.