sinusoidal wave & VHDL

T

tiflis

Good afternoon
someone knows to suggest me how I can generate a sinusoidal wave with
frequency = 1HZ in vhdl?
I have already generated a wave quadrant
How could I pass to the sinusoidal wave?
 
J

Jim Lewis

tiflis said:
Good afternoon
someone knows to suggest me how I can generate a sinusoidal wave with
frequency = 1HZ in vhdl?
I have already generated a wave quadrant
How could I pass to the sinusoidal wave?
For a testbench modeling, there are trig functions in
the package ieee.math_real. They expect angles in radians.
Trig functions in math_real:
Name [arguments] return Description
sin [real] real sine in radians
cos [real] real cosine in radians

There are also handy constants:
MATH_PI pi 3.14159265358979323846
MATH_2_PI 2*pi 6.28318530717958647693

There are more than this, but these are what I used.

Cheers,
Jim
 
T

tiflis

Jim Lewis ha scritto:
tiflis said:
Good afternoon
someone knows to suggest me how I can generate a sinusoidal wave with
frequency = 1HZ in vhdl?
I have already generated a wave quadrant
How could I pass to the sinusoidal wave?
For a testbench modeling, there are trig functions in
the package ieee.math_real. They expect angles in radians.
Trig functions in math_real:
Name [arguments] return Description
sin [real] real sine in radians
cos [real] real cosine in radians

There are also handy constants:
MATH_PI pi 3.14159265358979323846
MATH_2_PI 2*pi 6.28318530717958647693

There are more than this, but these are what I used.

Cheers,
Jim

ok thanks.
Meantime I have found this in Internet:

http://www.doulos.com/knowhow/vhdl_designers_guide/models/sine_wave_generator/

It could it are useful to me?
 
F

Frank Buss

tiflis said:
ok thanks.
Meantime I have found this in Internet:

http://www.doulos.com/knowhow/vhdl_designers_guide/models/sine_wave_generator/

It could it are useful to me?

Yes, this could be useful for you. But you have to think about the output:
If you feed 1 Hz to a DAC (e.g. a R2R network) and your lookup table is
small, then you need a filter at the output, which depends on the size of
the lookup table and your quality requirement for the output signal.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top