Jump to content
  • 0

Arty: Display UART data on LEDs


Ben

Question

Hi all

I have a very simply UART TX/RX pair I have built in Verilog, and have been struggling to get them to function on the Arty Board.

I can connect the two together to form a simple "echo" function, where any received RX data is immediately sent out on the TX module, but beyond that I can't correctly see the values I send to the Arty.

I tried simply piping the received byte to the LEDs on the Arty board, but the values lit up do not correspond at all to the ones I expect. Sending the character string "AaA" does not make the ascii encodings for "A" and "a" appear on the LEDs. However, I do get the right characters echoed back to my PuTTY terminal.

My code for the project can be found here: https://github.com/ben-marshall/uart

You'll need: rtl/uart_rx.v , rtl/uart_tx.v, rtl/impl_top.v and constraints/default.xdc to re-create the project.

I'm using Vivado 2016.4 on Ubuntu 16.04.

Thanks,
Ben

Link to comment
Share on other sites

3 answers to this question

Recommended Posts

Hi @Ben!  Welcome to the fun problem of UART's.  I commend you for trying to build the UART in Verilog, rather than using a canned module.  That said, I can offer you a touch of help:

Some time ago, I built a UART simulator as part of a more generic UART project.  Using that simulator, I can build my Verilog project, convert it to C++ via Verilator, and then communicate with my design either via the standard input and standard output file I/O streams, or even using TCP/IP streams.  Should you wish to use this simulator, you'll find several examples that use it, as well as instructions for how to use it within the repository.

May I suggest you look into connecting your current code into the UART simulator?  You can then use it to create a .VCD file which you can pull up with GTKwave if you would like to evaluate what your code is doing ...

Hope this helps,

Dan

Link to comment
Share on other sites

Hi Dan

Thank you for your reply, I will certainly take a look at your simulator. I actually have it working now, with exactly half of the ASCII table. Everything with bit 4 set just displays a block character. Everything with bit 4 unset works perfectly.

I'm stumped haha.

Ben

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...