Hiya,

I have been playing around with the FMCDAQ2 on a ZC706 development board. Unfortunately there seems to be a small DC offset. After some investigation it's looking like it might be coming from the sine wave generator in ad_dds_sine.v

I have tried to understand the code in ad_dds_sine.v and have come up with the following polynomial expansions:

x^2 + x + 0.25*(x^4 + 2x^3 - x) and -x^2 - x + 0.25(-x^4 - 2x^3 + x)

Unfortunately these polynomials don't seem to make a sine wave and there are almost no comments in the .v file other than:

"this is a sine function (approximate), the basic idea is to approximate sine as a polynomial function (there are a lot of stuff about this on the web) ".

Most of the web seems to refer to taylor functions which look quite different to the above polynomials. How does ad_dds_sine.v work? Are there any notes available?

Thanks!

Hello

(1) In my very simple testbench for ad_dds_sine.v, I have DC level -82 dBc, first harmonic level -60 dBc, when I set

I think it's very good quality.

(2) Your polynomial expansions are wrong. Please find attached sinwave.m file with same algorithm as in ad_dds_sine.v.

(3) About your problem with DC.

ad_dds_sine.v gives approx. same output DC level, as input angle has. Are you sure that your input values for angle port don't have DC component?

Danil Shendrik, IPrium LLC