Mode-S Beast:Advantages of a FPGA
Advantages of a FPGA over a Microcontroller Solution
The Mode-S data signal has 1MBit/sec, so it is pretty fast. It does not have a standard data format that would allow reception with a microcontroller's internal hardware interface like RS232, I²C or SPI, so it must be sampled using the CPU and standard processor commands step-by-step. Therewith and and even then just by using a couple of tricks, all these μC are just able to look at the signal once per each signal information, mostly in the middle. Even worse, the μC just gets a 0 or a 1 information from the comparator, so it either has a 01 or a 10 in order to decide each data bit's value.
Next, the μC has just one CPU and it cannot do several tasks at the same time. So while calculating the checksum, handling the serial interface or while serving the USB port, it cannot handle frames at the input. There is always a gap in the reception when performing these other, also important tasks.
With the FPGA one actually constructs a dedicated hardwarecircuit for the given task, same as many years ago one took TTL or CMOS gates, flipflops, shiftregisters from the shelf. The "code" is not a sequence that is executed by a pre-given hardware, instead hardware pieces are connected in order to work as needed for the task. With such a circuit it is easily possible to sample the incoming signal much more often. The Mode-S Beast samples 16 times more often, and then does averaging over each 8 samples per half bit information. So if just one sample was correct and 7 wrong, still a valid result can be concluded. But, even better: Since there is a AD converter on the board, the FPGA gets level information within each sample, ranging from 0 to 255. So each half bit generates a value from 0 to 2040. While a μC has just a decision resolution between 0 and 1, the FPGA has a decision resolution between 2040 different values. It can resolve the signal much better, and so it can read much better from noise. Second, in the FPGA there is no CPU that can do just one task at a time, instead everything functionality is built up by dedicated hardware gates. The receiver is always working, and in parallel there is a RS232 frame builder working all the time. All units do not interfer with each other because they all do have their own hardware and don't share any ressources. So there is no loss of information while other tasks are performed.