Yeah, sorry for the lack of detail. I'm trying to recreate the classic lock-in experiment where you can detect the light of an LED, the brightness of which is oscillating a particular frequency (say 500 Hz, but I'd like to go up to several KHz) across a room using a photo-diode with significant background noise by using phase sensitive detection. Essentially the FPGA would have to take the analogue input from the photodiode, multiply it by a reference signal (in this case the sine wave voltage driving the LED) and then average over time. Because any noise multiplied by a sine wave will average to zero over time, but an in-phase signal will average to a DC offset, this technique is very powerful for separating an oscillating signal of a known frequency from the background noise. I'm roughly following http://bret.io/media/seniorLabs/lockinlab.pdf This is more an exercise to learn about lock-in amplifiers by building one than anything else. Thanks for your help.