Tutorials

From Casper

Jump to: navigation, search


Contents

Introduction

Welcome to the CASPER tutorials wiki page. Here you will find all the tutorials for the four hardware platforms supported through the CASPER Community:

  1. ROACH
  2. ROACH2
  3. SNAP
  4. SKARAB

Code for the tutorials can be found at Casper Caltech Workshop 2017 Tutorials Help Page

It is recommended to start with the introduction tutorial for the platform of your liking, then do that platform's GbE tutorial and finally move onto the spectrometer or correlator tutorial.

SKARAB tutorials, which are somewhat different from their ROACH/SNAP counterparts, can be found at the bottom of this page.

Set up Guide and Help Page

Casper Caltech Workshop 2017 Tutorials Help Page

We try to maintain working versions of the following tutorials:

Introduction to Simulink (ROACH)

Introduction to Simulink, communication with FPGAs. Build a simple program that flashes LEDs, counts and adds numbers on demand.

  • Communicate with an FPGA board using the CasperFpga python library
  • Includes step-by-step walkthrough for building your design, compiling it, loading onto ROACH and communicating with it.

Prerequisites:

  • Your enthusiastic self
  • A machine configured with MATLAB/ISE (for ROACH1/ROACH2) or MATLAB/Vivado (for SNAP/SKARAB)

Tutorial 1 Instructions (ROACH2 & SNAP)

10GbE Interface

Construct a design that transmits a counter over 10GbE to another ROACH port. During this tutorial, you will learn more about the CASPER hardware interfaces, communicating with ROACH remotely using KATCP and the supplied Python libraries.

Prerequisites: Introduction tutorial (we expect conceptual understanding of software registers and memory regions along with some basic Simulink experience). Also useful, but not required, is some experience in programming in Python, since the sample script for configuring and controlling the system is provided in Python. You will need a ROACH/ROACH2/or SNAP board and a 10GbE cable.


Tutorial 2 Instructions (ROACH2)

Wideband Spectrometer

Build a 512MHz "wideband" spectrometer with 2048 FFT channels on ROACH.

This will introduce the ADC boards, the CASPER DSP libraries including the wideband PFB and FFT blocks as well as demonstrate the use of vector accumulators, shared BRAMs and readout through the PPC's 1GbE port. We will make use of KATCP for remote control of the ROACHes using Python libraries to plot the output.

Prerequisites: tutorials 1 and 2. This design is complete and tested working. You'll need a ROACH board and either a katADC or an iADC board, as well as a synthesiser / clock source.

Tutorial 3 Instructions

Wideband Pocket Correlator

Build a wideband 2 antenna x 2 polarization correlator, for use on ROACH. This is a good starting point for your field-deployable correlator and demonstrates the use of requantisation after the FFT.

Tutorial 4 Instructions

Heterogeneous Instrumentation

This Tutorial has not been updated for the 2017 Workshop

In this tutorial, you will learn how to use a combination of FPGA and Graphics Processing Unit (GPU) technologies to build an astronomical signal-processing instrument. The aim of the tutorial is to use a ROACH board, along with a PC with an NVIDIA Fermi-class GPU to build a PFB spectrometer. This tutorial consists of three parts - an FPGA design that digitizes and transmits time-domain data from a ROACH board to a PC over a 10GbE link, a data acquisition program in Python that records this data to disk, and a CUDA/C GPU program that performs online spectrometry.

Tutorial 5 Instructions

Tutorial 5 on GIT

Introduction to embedding Verilog within a Simulink design

This Tutorial has not been updated for the 2017 Workshop

This tutorial gives a brief introduction to embedding Verilog (or VHDL) code in your Simulink models using the Xilinx "Black Box" block.

Tutorial 6 Instructions

Tutorial 6 on GIT

Creating a Yellow Block

This Tutorial has not been updated for the 2017 Workshop

This tutorial will guide you through the creation of a new yellow block interface. Starting with a compile of a skeleton ROACH model, you will learn how the various components of the CASPER toolflow work together to automatically instantiate custom IP in a simulink compile.

Tutorial 7 Instructions

Tutorial 7 on GIT

Using PlanAhead to close timing (easy introduction)

Tutorial 8 Instructions

SKARAB

These tutorials were constructed using Xilinx Vivado 2016.2 and MATLAB 2016b. Other mutually compatible versions of Xilinx and MATLAB tools may work correctly, but have not been tested.

PLEASE NOTE: As the control and monitoring of the SKARAB is done through the Ethernet interface any SKARAB design requires a 40GbE yellow block.

These tutorials use the tutorials_devel repo in the casper-astro organisation, specifically the workshop2017 branch

If you plan to use these tutorials on your own system, you are most likely to have success if you use these libraries. You can obtain them from github:

git clone https://github.com/casper-astro/tutorials_devel.git

cd tutorials_devel

git checkout origin/workshop2017 -b workshop2017

We try to maintain working versions of the following tutorials:

Introduction to Simulink (SKARAB)

Introduction to Simulink, communication with FPGAs. Build a simple program that flashes LEDs, counts and adds numbers on demand.

  • Communicate with SKARAB's FPGA using the casperfpga python library.
  • Includes step-by-step walkthrough for building your design, compiling it, loading onto SKARAB and communicating with it.

Prerequisites:

  • Your enthusiastic self
  • Your computer with Vivado 2016.2, MATLAB R2016b, some form of connection to a SKARAB board, and Ubuntu 14.04 LTS.

Tutorial Instructions (SKARAB)

Tutorial on GIT

Tutorial Model Template

Tutorial Model Solution

40GbE Interface

Construct a design that transmits a counter over 40GbE to another CH port. During this tutorial, you will learn more about the CASPER hardware interfaces, communicating with SKARAB remotely using casperfpga.

Prerequisites: Introduction tutorial (we expect conceptual understanding of software registers and PPC/FPGA mapped memory regions along with some basic Simulink experience). Also useful, but not required, is some experience in programming in Python, since the sample script for configuring and controlling the system is provided in Python. You will need a SKARAB board and a 40GbE cable.

Tutorial 2 Instructions (SKARAB)

Tutorial 2 on GIT

Tutorial 2 Model File

Tutorial 2 Python control script

HMC Interface

This tutorial will demonstrate to the user how to interface to the HMC yellow block. Build a Simulink design that writes and reads test data to/from the HMC memory at different data rates to demonstrate the type of throughput the HMC can handle. During this tutorial, you will learn about HMC memory addressing, HMC read data reordering and HMC memory status monitoring. You will communicate with SKARAB remotely using casperfpga.

Prerequisites: Introduction tutorial (we expect conceptual understanding of software registers and uBlaze/FPGA mapped memory regions along with some basic Simulink experience). Also useful, but not required, is some experience in programming in Python, since the sample script for configuring and controlling the system is provided in Python. You will need a SKARAB board, a 40GbE cable or a 1GbE cable.

Tutorial Instructions (SKARAB)

Tutorial on GIT (SKARAB)

Clocking Options

Clocking Options - Notes on how to choose a User IP Clock Source.

Simulink

Other Resources

Deprecated Tutorials

Old Tutorials


Personal tools