Verilog code to use the USB serial port for debugging

Guest anirbax

Recommended Posts

Guest anirbax

Hi Everyone,

I am trying to debug some simple design and it would be helpful if I could monitor internal register data on my PC's  serial port.

How can I do this on the Papilio USB port using Verilog?

I see the BPC3003_2.03+.ucf file (for the Blinkie example that comes with Papilio) has rx and tx ports connected to P88 and P90 of the Spartan3E FPGA. Can I use these rx and tx ports?



Link to comment
Share on other sites

Hello Anirban,

The rx/tx pins are available but you still need some way to generate the correct 8N1 serial stream, the FTDI chip does not take care of that for you.

There are a couple different ways you can go about this:

1) This tutorial walks you through setting up a UART core from Xilinx.

2) This tutorial shows you how you can expose internal registers onto external pins of the Papilio (this won't use the serial port but will show you internal registers).

3) You can use the AVR8 soft processor and an Arduino sketch to handle the UART communications and connect your registers to the I/O pins of the AVR8 internally. Then it would just be a matter of reading the port with a sketch and sending the value out over the serial port.


Link to comment
Share on other sites


This topic is now archived and is closed to further replies.