Remote FPGA JTAG programming via SSH tunnel with Altera Quartus II

23 October 2014 14:43 | Molnár Péter

It is easy to programming a local device in the Altera Quartus II with USB Blaster . In the case of remote network access, it is possible to running jtagd and jtagconfig on a different server and client machine and accomplish programming via SSH tunnel on the network. In practice, this is a simple, cheap alternative to Ethernet Blaster.

In this example the Altera USB Blaster programmer is connected to the SRV host, and the Quartus II development environment runs on the CLNT machine. Both nodes run Linux operating system.

 -------------------                                         -----------------------
| FPGA <-> SRV host | <<== SSH tunnel over the network ==>> | CLNT host: Quartus II |
 -------------------                                         -----------------------

Launch jtagd on the SRV host and set a password. Prepare the development environment using the <altera_home>/nios2eds/nios2-command-shell command.

SRV:$ <altera_home>/nios2eds/nios2-command-shell
SRV:$ jtagd
SRV:$ jtagconfig --enableremote <password>

Now the jtagd is listening on the TCP/1309 port.

It is important to launch jtagd by the method described above. If you launch jtagd with Quartus II, the connection does not work.

Edit the $HOME/.jtagd.conf file according to the following on the CLNT host.

Remote1 {
        Host = "";
        Password = "<password>";

Establish the SSH tunnel to the SRV host (for example) with the command below.

CLNT:$ ssh -l <user> -L 1320:localhost:1309 -N -f SRV

The -L switch creates the tunnel. The jtagd runs also on the CLNT host and uses TCP/1309 port, so it is necessary to find other free port. The -N switch prevents creating shell, the ssh runs in the background with the -f switch. The switches -N -f are perfect for a tunnel.

Finally, get list of available devices using jtagconfig command. Prepare the development environment using the <altera_home>/nios2eds/nios2-command-shell command.

CLNT:$ <altera_home>/nios2eds/nios2-command-shell
CLNT:$ jtagconfig
1) USB-Blaster on [2-2]
 01234567   EPXXXX

You can use this remote, networked DIY Ethernet Blaster in Quartus II Programmer as usually on the CLNT host.