CS378H: Concurrency: Honors: Lab #5: FPGAs: Windows Environment Instructions

This document provides instructions for bringing up the Cascade Lab Development environment on a Windows machine. The instructions have been verified on Windows 10 devices.

Things you will need:

What it should look like

The connections that concern you are circled in red. Note that there is an ethernet cable in addition to the power cable and two USB cables. There is a surprising number of ways to misconfigure the hardware in the lab. Even your illustrious instructor got it wrong more than once, so when things seem to be going wrong, check your connections. You'll likely find you need to replug things from time to time to get all the hardware and connections in the right state.

VirtualBox

Linux

With VirtualBox set up, you'll need to download a Linux ISO to set up Linux. We recommend Ubuntu as we have tested Cascade with both the 16.04 and 18.04 Long Term Support releases, though any recent Ubuntu release should work. Ubuntu can be downloaded from ubuntu.com/download/desktop.

The instructors have tried 16.04 and 18.10. The win10 instructions were developed using 18.04, so the downloaded ISO installer is called ubuntu-18.10-desktop-amd64.iso.

Create and Configure a VM

Install and Build Cascade

Cascade's README has good directions on how to install it on Linux: github.com/vmware/cascade/blob/master/README.md. It is worth noting that you may not need to install libncurses-dev on Ubuntu (or it may go by another name, like libncurses5-dev). Building and testing your Cascade installation will take some time (around a half hour to an hour for "make check"):

Connect to and Configure the DE-10 FPGA

In order to access the DE-10 from your VM, you'll need to configure device filters via the the VM settings→Ports→USB pane. To do this, you'll want to plug in both of the USB cables from the DE-10 to your computer. Make sure the Mini-USB cable is connected to the JTAG programming port (see DE-10 documentation, it should be near the Ethernet jack and not next to where the smaller Micro-USB cable connects, which is the UART port). You can then add a filter by clicking the plus button and selecting a currently-detected USB device to capture. You should add filters for the "Linux 4.1.33-ltsi-altera ... Gadget" and the "Altera DE-SoC". You may need to unplug and reconnect the Mini-USB cable 3-4 times before it is properly detected as the latter device. Once the filters are set, you'll likely need to unplug and reconnect both cables while your VM is running for VirtualBox to detect and capture both devices properly. You should then see them under Devices→USB with a check mark preceding them.

If the Micro-USB cable is working properly, you should see a USB disk appear in Linux with some DE-10 files in it. You should also be able to SSH into "root@192.168.7.1" and access the DE-10's CPU. To verify that the Mini-USB cable is working properly, should run "sudo ./quartus/bin/jtagconfig" from your quartus install directory and see a DE-SoC device detected. See the JIT Backend section of the Cascade README for more information. If the device isn't detected, check your VM device filters, make sure the device shows up as connected, and try disconnecting the JTAG cable, killing the "jtagd" process, and reconnecting the cable. Note that when running quartus_server, your quartus path should look something like "~/intelFPGA_lite/18.1/quartus/" (with the quotes) if you used the default install path. You will likely have to run quartus_server as sudo to ensure it can access the JTAG device.

Finally, you should be able to run Cascade using the de10_jit backend from the DE-10 itself using 192.168.7.5 as the Linux IP. Note that profile_interval should be 10 as it is now in seconds instead of milliseconds. You may also need to use quartus_host instead of quartus_server to specify the destination IP address. If you get a connection error, you may need to restart the quartus_server application on your Linux VM.

Acknowledgements

Thanks to Eric Schkufza and Michael Wei of VMware Research Group for supporting this lab. Thanks to our department head Don Fussell for supporting the project by helping find funds to enable us to loan DE10 hardware to every student.