Well you at least have the advantage of understanding the theory, rather than just working on hunches and intuition!
Hunches and intuition are equally, if not more important than theory
Would using a box filter over the incoming data to reduce the maximum possible clock-to-clock swing help?
Probably, but I haven't tested this yet. I won't be able to do it in FPGA, but I can run some C model to see the effect. Something other than a box filter would probably have to be used, though, as a box filter has unfavorable frequency characteristics for audio filtering (see this
). But you could convolve a box filter into a gaussian-type filter, by applying it a few times, that would be much better, or use something like a binomial filter, which is also easy (small!) to implement.
Hmmm - do you have to lose a whole bit, or can you use a multiplier to just reduce the peak amplitude a little?
Well, the -6dB is somewhat on the safe side, but i tried implementing a x3/4 gain, which is ~ -3dB, and it seems it works fine. Thanks for the idea!
It'd be a shame to lose that 6db though, because even though the Minimig's audio output is pretty clean, not all the target platforms are. (My own A/V board is pretty noisy in comparison.)
Yes, I agree, but I see no way around it with a sigma-delta with levels > 1.
Noise is tricky to handle, especially in the presence of very fast digital logic, which the FPGA has plenty of. You have to be very careful how you route the analog signals (away, always away from digital!
), and you have to make sure the supply is appropriately filtered.
(I picked these particular songs because I remembered the samples causing aliasing effects on the real Amiga.)
I don't think we have to worry about aliasing with the minimig, as the sigma-delta is basically (also) an oversampler, so the spectral images of the base signal should be moved to much higher frequencies.
The difference is pretty subtle - but to my ears the sound's now maybe a tiny bit *too* filtered - so I'll try 15nF sometime.
Nobody likes heavily filtered audio
but if we'd want to match the Amiga audio output, we'd have to tune the filter even lower. But I guess tuning the filter for ~ 18kHz - 20kHz is still OK, since the current design is @ ~ 28kHz.
Regarding my sigma-delta implementation: I think I've come as far as possible with my 2 stage design (or maybe I'm tired of listening to Gauntlet3 intro over and over
) and the result is OK, not great. The noise floor is pretty good, but there are still some standing tones, which manifest in the game Gods. Not very audible, but they are there in the spectrogram. MMrobinsonb5: if you think the sigma-delta is adequate & you will try to implement this on the minimig board, you could try removing the additive noise (in the integrator adders) and implementing your silence fix.
I simplified the sigma-delta as much as possible, but the FPGA on the DE1 board is really filled to the max, and I'm having occasional stability problems. In the future, when I'll work on a bigger FPGA, I'll try to design a three- of five-stage sigma-delta, to see if anything better can be done.
For now, this is it, and I'll focus on removing the FLASH requirement from the current DE1 design.