Virtual UART for the Terasic DE0-Nano

DE0Nano
Terasic’s DE0-Nano

 

The Terasic DE0-Nano is an excellent device, but it lacks an easily accessible UART to get information in and out of your design.

Fortunately, Altera’s Virtual JTAG functionality allows easy access to logic inside of your design. Chris Zeh wrote an excellent article on this Virtual JTAG functionality and how to easily send data in and out of the chip.  You can read his blog entry here.

This Virtual UART project is an extension of Chris’s work.  It provides a Verilog template to expose a parallel FIFO interface into and out of your design, matched to a TCL script on the PC side.  It allows a simple way to talk to your logic design through a character interface – ideal for a terminal interface to your latest NIOS or OpenRISC SoC.

The example TCL script sets up a network connection on your PC, listening on port 2323. Using Telnet to connect to this port will parse the Virtual JTag instructions to get data in and out of the Virtual UART buffers.

The quickest way to get started is to run the pre-compiled images provided here.  When you’re ready to incorporate this into your own design, all source is available on Github.

Even with no additional hardware, adding a Virtual UART to your design makes the DE0 Nano even more accessible.  If you find this useful, let me know in the comments!

Advertisements

8 thoughts on “Virtual UART for the Terasic DE0-Nano

  1. Hey, great job!
    I used your design, and modified the FSM to support the Wishbone interface for the STORM core.
    I’m able to successfully transmit data to the computer using the STORM processor on DE0-nano.
    But I’m having issues in receiving the data. Seems like when the “in buffer” has only one data, it works fine, otherwise it is “skipping” one character from the buffer. For e.g when I send 123456789rn from computer, I receive 13579n
    May be I can use your help to make it perfect?

    Like

    • Hi Ali, thanks for your comment. It sounds like an interesting project. If you send me the HDL file for your modified FSM I’ll take a look and see if I can spot the issue. The buffers themselves are ‘black-boxes’ generated by the Altera megawizard, so it’s could be a signalling issue in to/out of the in buffer.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s