Thanks for the context Victor and sorry now for cross emailing.
“…we are not interested in doing a compiler…” → I agree. Ideally there would be a framework/library to prepare a CSound code for HLS and then everything else should be done automatically. There will be of course very strict limitations like no strings, I/O files and, at least for the beginning, maybe it would make sense to stay with fixed point arithmetic (integers). I could imagine that various DSP algorithms could be used out of the box but organizing available memory usage could be a bit tricky.
“The system as designed affords three levels of interaction…” → something like that would be a dream!
And just briefly to extend the context you provided for those who are not that familiar with FPGA to hopefully gain some interest in it .
FPGAs are in general more expensive as components then DSPs and their development is also few times more expensive, and arguably more difficult, then for DSP so to justify those expenses an application needs to have some specific requirements, like very low latency, high throughput and high processing parallelization on the data coming through, which only FPGA can fulfil.
FPGAs can be used, so to say, in two ways as “standalone” and together with a processor. FPGA with processor design can be realized in three ways:
-
Extern processor
-
Intern soft-core processor
-
Intern hard-core processor
Standalone use-case:
If you want to develop an instrument that is based on one or more high speed sensors and you want to sonify your interaction with them then a FPGA could give you a latency in a micro second order and in this period, you could process sensors inputs quite a bit before putting them on the output pins. This is something that no CPU/GPU/DSP/uC can provide. Amount of parallel processing that would be possible is restricted (mostly) by FPGA resources so lets say we are driven by “better safe than sorry” slogan so we go for a 50€ beast.
FPGA together with a processor:
If your instrument needs to communicate with an outside world by USB/WiFi/Display or you would like to have some more advanced control options, like some presets or logging, then this is where a processor can come as a huge help.
1) Extern processor
If your processor only needs to interact with your ‘FPGA instrument’ in a k-rate so to say then an external processor could be the best option. Going with the same slogan we choose a 10€ beast as an external processor (total cost 60€).
2) Intern soft-core processor
If you want to have a lower latency between your control signals and audio stream or you have some other issues like PCB space shortage, then using an intern soft-core processor is maybe a better solution but this would mean that we need to take a bigger FPGA since a soft-core processor eats quite a bit of resources so let’s say we go for a 100€ FPGA.
3) Intern hard-core processor
Intern soft-core processors are quite slow and less powerful compared to hard-core ones so if you need a low latency with complex DSP algorithms then this is most likely the way to go. This is typically used in machine vision applications or for prototyping before cost reduction comes into play. These FPGAs normally have quite a lot of resources but cost let’s say around 200-400€.
Last lower cost Xilinx (now AMD) FPGA generation, Spartan 7, is easily capable of processing quite a large amount of data in parallel with a 100MHz. But by going down with a speed it is possible to utilize resources to gain more functionality (like trading 50 100MHz oscillators for approx. 200 25MHz oscillators).
This is all very simplified but I hope it’s a bit clearer where FPGAs are nice to have.
This is so interesting. I always wanted to work on audio applications with FPGAs but I always ended up working with optical sensors. I was so jealous of Aman when I read about this project
.
I’m planning to come to a CSound conference in September so maybe if this will still be a topic of interest we could talk about/brainstorm it over a beer or two.
Best,
Lovre