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.
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.
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.
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.