A serial interface is a simple way to connect an FPGA to a PC. We just need a transmitter and receiver module.
It creates a signal "TxD" by serializing the data to transmit.
It takes a signal "RxD" from outside the FPGA and "de-serializes" it for easy use inside the FPGA.
The project's code can be found here.