AnsweredAssumed Answered

ad_dds_sine.v dc offset?

Question asked by Robbo- on Dec 6, 2017
Latest reply on Dec 12, 2017 by Robbo-



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?