I'm preparing for a project that will interface an FPGA with many 3v relays on its gpio. Additionally, some of the relays will be powered with the same power supply that the FPGA uses. The FPGA will actuate certain relays, as well as read signals that are in series with relay coils.
I know that a closing relay can create an inductive voltage spike that might damage the FPGA. Also, I'm not confident that the gpio pins can supply enough current to actuate several relays in parallel.
I've encountered fly-back diodes, voltage followers, and optocouplers before, and I'm pretty sure one or all of these could help here. What should I do to protect my FPGA and make sure it can drive the relays?