tags:

views:

97

answers:

3

We know that the output of an FPGA is digital but can we genrate a pure analog sine wave using a vhdl code. also can I specify the frequency of the sine wav.

+1  A: 

Define "pure" - how many "bits" of quantisation can you live with... and what frequency?

For lowish frequencies at lowish bits you could build a simple PWM or delta-sigma DAC in the FPGA and put a low-pass filter on the "outside" (sorry, that'll have to be real analogue hardware :) . This example may be informative

Not going to get there without some external componentry though.

Martin Thompson
Yes that what I thought about when I first talked about that but they said you could do it without any external ADC devices. They said you'll get the sine wave like it was generated from an analog generator without ripples and you can also chose the frequency of the sine wave.
SultanSh
Who's they? Is this an academic question, or a real-life problem? You really need to crank some numbers based on your requirements (in terms of sine frequency, quantisation etc.)
Martin Thompson
Thanx guys they told me that they were asking about generating it as adigital signal and to use dac after that but what I though that they want it without dac because they was so exciting that it is a very hard quistion sorry for that. :)
SultanSh
A: 

Except for a very few mixed-signal models (e.g. some Actel products), FPGAs do not have the components for the required analog reconstruction filter. They would have to be added on the outside.

Ben Voigt
A: 

You can look into Direct Digital Synthesis. It basically uses a ROM to store the sine samples and uses a phase accumulator to index into the ROM to generate the output signal with the desired frequency. Resolution and maximum frequency is bound by the fpga clock and the ROM size.

You still need an anlog reconstruction filter, though.