FPGA IQ Test Spectrum Pics


In modifying the PowerSDR code to support the Wolfson Xylo lash up I came to a point where I had two variations of the code that takes the data from the Xylo and feeds it to PowerSDR. I found the resulting spectrum from these two implementations somewhat interesting.

The setup used to generate these spectrum shots was am IQ Test generator loaded into the FPGA. The test generator generates (via lookup table) IQ samples of a 1500 hz tone and feeds them to the FX2 USB pipe. What I expected to see in the PowerSDR spectrum view was a single tone and maybe some minor spurs.

The Pretty (but wrong!) Spectrum

The shot below shows what I thought was a correct implementation of the code moving samples from the Xylo to the FPGA

Initially I thought this looked pretty good -- but I was having a problem with a buffer getting trashed causing PowerSDR to die when I turned off the program and it went to free my sample buffers. Seemed I was overwriting a buffer. Upon investigating I see indeed I was writing off the end of one of my buffers. Fixing that produced the spectrum below:

The Ugly (but correct?) Spectrum

This is the spectrum I got after fixing my buffer overrun glitch.

When I saw this I thought argh, what the hell have I done now! However after thinking about it a bit I believe this spectrum shows a correct sample moving implementation. My reasons for this are that the noise floor on this spectrum is below -200 dbm - what one would expect for a pure digital implementation (the FPGA is generating IQ from a lookup table in this test). The spurs are the noise caused by A/D quantification error and assorted round off errors going from ints to floats

Amazing the insight one gets into all this DSP stuff trying to build things that use it!

Comments to: Bill Tracey (kd5tfd@ewjt.com)

Last Updated 26 January 2006

Copyright © Bill Tracey 2006