There are some benchmarks from Henner Zeller's repository on GitHub which claimed that directly outputting data to the GPIO could achieve up to 65.8 MHz on a Raspberry Pi 3 (not B+, mind, but I suspect the figures won't be that far off). The code used is available here in C and the author gives the following pseudocode equivalent:
// Pseudocode
for (;;) {
*gpio_set_register = (1<<TOGGLE_PIN);
*gpio_clr_register = (1<<TOGGLE_PIN);
}
I suppose you can treat that as an upper bound to the possible speeds you will get. Python is going to be significantly slower than that, though.
For comparison, Joonas Pihlajamaa tested a Pi 2's ability to toggle GPIO pins quickly using various libraries. The values were as follows for RPi.GPIO:
- Pi 1: 70 kHz
- Pi 2: 243 kHz
- Change: 2.5x
While there's clearly a significant difference between the Pi 1 and 2, it is not even close to your target of 50 MHz (over 200x too low, in fact).
You might like to run the benchmarks from the two sources above on your own Pi to get a definitive answer, though they'll be on the same order of magnitude as the data above anyway.
As noted above the fact that Raspbian (and any major multitasking OS on the Pi) uses preemptive multitasking
means that there's little guarantee that you'll be able to consistently output a certain frequency. You are entirely at the mercy of the scheduler so if your application needs a consistent, fast output, the Pi is likely not well-suited to your needs. You'll probably have to consider an alternative option instead for your FPGA.