My FPGA builds are done on a server in the datacenter, which is helpful for a number of reasons, not the least of which is that it takes a lot of CPU, and the server has plenty of CPU power. However, it’s a pain to transfer the design files over to a local machine for programming and debugging. Here are instructions that you can use to run just a JTAG server on the lab machine, and connect to from the server machine.
You should install the Quartus II tools on the lab machine. There’s got to be a download for only the programming tools, but I haven’t found it yet. Download and install only the minimal amount. The machine needs to run the port mapper and xinetd. You may need to install those with yum or whatever other package manager your distribution requires.
Starting the Server
In the following, I assume that the environment variable $qII points to your Quartus II install directory.
You need to make sure that a file /etc/jtagd/jtagd.conf exists and has the following line in it:
Password = “mysecret”
Without that, the jtag daemon will not listen for remote machines.
First check that the JTAG software can see the board. Run the following command and verify that you get the correct output…
[pete@localhost ~]$ $qII/quartus/bin/jtagconfig 1) CV SoCKit [1-1] 02D020DD 5CSEBA6(.|ES)/5CSEMA6/.. 4BA00477 SOCVHPS
Then, run the following to start the server. You need to do this as root:
[pete@localhost ~]$ sudo $qII/quartus/bin/jtagd [pete@localhost ~]$ sudo $qII/quartus/bin/jtagconfig --enableremote mysecret
On your remote machine you should start up Quartus II, and:
Select Tools->Programmer. This will start the programmer window.
You should then click the Hardware Setup… button.
Click on the JTAG Settings tab.
Click the Add Server… button.
Enter the IP address of your server. Enter the password, greywolf.
The Hardware Setup window should indicate the server IP address and the connection status should be OK.
Click the Close button.
You should then see the IP address of the lab machine to the right of the Hardware Setup… button.
You should now be able to use the JTAG device from the remote machine.
If your lab machine doesn’t have a public IP address– for instance, because it is a VM using NAT running on a host with a VPN connection to your server– you will need to set up an SSH tunnel to the lab machine.
The JTAG server runs on port 1309. You can use ssh to tunnel the connection.
From your VPN machine ssh to the remote machine with the following command:
[pete@localhost ~]$ ssh -L 1309:192.168.1.2:1309 email@example.com
In this example, your guest machine has an IP address of 192.168.1.2, and the remote server is myserver.mydomain.com.
Then, you would use your VPN machine IP address as the address of the lab machine when connecting to the JTAG server.