S
senthil
Guest
hello friends,
for the fft and ifft part of dsp, w.r to twiddle factor, we need the
cosine and sine terms. for that i do my sine code w.r to sine series
formulae.
sin(x) = x - x3/3(fact) + x5/5(fact) _ ...
i took only 3 terms.
and my coding was given below
term : =1
sum := 1
for n in 1 to 3 loop
term := (-term)*input **2/real((2n*(2n+1)));
sum := sum + term;
end loop
output <= input * sum;
i found one problem , ie., if i give input = 3.534, i got an output =
-0.596
that is wrong answer.
but actual value from the calculator, is sin(3.534) = -0.3818..
what is the problem behind that.
give some guidance.
tool : modelsim 5.5 SE vhdl.
for the fft and ifft part of dsp, w.r to twiddle factor, we need the
cosine and sine terms. for that i do my sine code w.r to sine series
formulae.
sin(x) = x - x3/3(fact) + x5/5(fact) _ ...
i took only 3 terms.
and my coding was given below
term : =1
sum := 1
for n in 1 to 3 loop
term := (-term)*input **2/real((2n*(2n+1)));
sum := sum + term;
end loop
output <= input * sum;
i found one problem , ie., if i give input = 3.534, i got an output =
-0.596
that is wrong answer.
but actual value from the calculator, is sin(3.534) = -0.3818..
what is the problem behind that.
give some guidance.
tool : modelsim 5.5 SE vhdl.