Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
16 years ago

sin waveform simulation result

I confused with the sine wave simulation result(frequency domain) between the display of NCO in IP toolbench and agilent vee simulation result(data extracted from tbl).

The spec for sin wave is:

parellel cordic implementation

200k clock rate

20k sine wave

16 bit phase accumulator precision

16 bit angular resolution

24 bit magnitude precision

phase modulation( 16bit modulator precision and pipeline level 1)

FYI, i save simulation result as .tbl format as attached. Then i extract the data(time, fsin_o) wanted as attached based on the criteria that out_valid is high and clock transition( 0 to 1).

The data(fsin_o) is feed to FFT and get the magnitude of fft and 20log magnitude of it before display. There is something wrong with the magnitude and somehow i dono what's wrong.

sine wave in time domain is correct.

Can someone clear my doubt?

Am i extracting the wrong data?

Thanks

4 Replies

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    How can we know about your method to calculate a FFT from the data? In the shown FFT plot, both frequency and magnitude scale are mysterious. It can't be trusted anyway.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I am not particular on the frequency axis because the sine wave in time domain is correct. Besides, i have no idea to map the time and fsin_o to perform fft where i think is time consuming.

    My intention is just to estimate the quality of sine wave(e.g distortion and SNR ...).

    I have attached the flow on how i perform fft and data extracted from tbl(simulation result).

    Thanks
  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    I'm not familiar with these MatLab stuff. Generally, a 20k sine with a 200k clock should result in a fundamental at 0.1 normalized frequency and the spectrum mirrored at 0.5. I can't find it in your plot.

  • Altera_Forum's avatar
    Altera_Forum
    Icon for Honored Contributor rankHonored Contributor

    FvM,

    I just realise that i attach the wrong fft magnitude. I am sorry abt that. I have corrected the attachment in the first post.

    The magnitude suppose to be in negative. However, the simulation shows that it is positive.

    May i know why?

    thanks