Accessing FPGA Registers via UART

I often use ZYNQ, and I access FPGA registers through Linux. Recently, I experimented with the Xilinx XC7K325 development board KC705, which is a pure FPGA without ARM. So how do we access FPGA registers? I2C transmits one byte and responds each time, without the need for an additional feedback mechanism; SPI sends and receives data on clock edges, which is very compatible with FPGA and performs well; however, UART is best supported on PC, and USB to UART tools are widely available.

There is a project on GitHub called uart2bus that converts UART commands into signals that are easier for the FPGA to process, along with a handshake mechanism. It provides a 25MHz clock, with a baud rate of 115200.

On the PC side, using the pyserial module and Python programming, complex register control and parsing can be quickly implemented.

This is a good choice for devices without processors. It is also a good debugging method.

**It’s okay to be slow, but the focus should be on care**

Leave a Comment