sine and cosine wave generation

F

FPGA

Guest
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?
 
On 14 Jan, 15:36, FPGA <FPGA.unkn...@gmail.com> wrote:
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?
Use a look-up table.

Cheers,
Jon
 
FPGA schrieb:
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?
A very common technique is a look-up table.

Ralf
 
On Jan 14, 10:43 am, Ralf Hildebrandt <Ralf-Hildebra...@gmx.de> wrote:
FPGA schrieb:

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

A very common technique is a look-up table.

Ralf
Could you please explain in more detail
 
On Jan 14, 7:47 am, FPGA <FPGA.unkn...@gmail.com> wrote:

Could you please explain in more detail

http://www.actel.com/documents/Fusion_Waveform_TB.pdf

K.
 
On 14 Jan., 16:36, FPGA <FPGA.unkn...@gmail.com> wrote:
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?
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
 
"FPGA" <FPGA.unknown@gmail.com> wrote in message
news:9219f61f-678d-4ed3-801c-3a873f2a467b@k39g2000hsf.googlegroups.com...
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?
library IEEE;
use IEEE.MATH_REAL.all;
signal x,y : real;begin x <= sin(y);end;HTH., Syms.
 
comp.arch.fpga wrote:
On 14 Jan., 16:36, FPGA <FPGA.unkn...@gmail.com> wrote:
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?

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
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.
 
On Jan 14, 1:38 pm, Arlet Ottens <usene...@c-scape.nl> wrote:
comp.arch.fpga wrote:
On 14 Jan., 16:36, FPGA <FPGA.unkn...@gmail.com> wrote:
Can anyone give guidelines on how to generate sine and cosine wave in
VHDL?

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

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.- Hide quoted text -

- Show quoted text -
Thanks all for your help.
 

Welcome to EDABoard.com

Sponsor

Back
Top