Hi all,
I'm considering a particular application and would very much appreciated some thoughts and/or recommendations.
I've used a particular MCU on a number of projects, and am now looking at a slight variation on a previous design, for which I'm considering the addition of an FPGA. I need to measure (frequency, duty cycle, etc.) a number of input signals (12+), and perform deterministic timestamping of each input at a specified rate (i.e. 100Hz). I've achieved something similar using the MCU with high priority interrupts in the past, but the overhead of servicing these interrupts, as well as the jitter of the timestamping function make this approach unsuitable in this particular application. I also looked at using the Timer Counter (TC) functionality of the MCU, but despite having 12 16-bit counters, there are only three available external inputs, which obviously doesn't suffice.
As such, I'm considering an FPGA to receive these digital inputs. The FPGA would perform the required measurements on the inputs, and then timestamp the latest measurements (across all inputs) at a specified, deterministic frequency and present the timestamped results to the MCU for further processing. I'm not quite sure how best to approach the MCU-FPGA interface, and would be very open to recommendation. A simple SPI/QSPI interface would probably do, but perhaps an AHB master/slave arrangement could also work.
With the above said, I'm also mindful of future applications, whereby I might want to use the FPGA for additional hard processing requirements (e.g. high throughput ADC). In this scenario, the MCU-FPGA interface may become a limitation/bottleneck for the throughput of the system, and I may actually be better off committing to an SoC FPGA from the outset, where the bulk of the sensor processing is managed in Programmable Logic, with post-processing, storage, transmission, etc. handled by the processor, making use of the high throughput interface/fabric between the two.
Any thoughts, opinions or recommendations very much appreciated!