glip  0.1.0-dev
The Generic Logic Interfacing Project
ZTEX USB-FPGA 2.13 Loopback Demo

This demo implements a loopback in the device. The LEDs of the debug board (LED2) are driven by a counter and indicate the speed and amount of transfers. You need to set the DIP switches 3 and 4 to ON to have the LEDs connected.

Prerequisites

Before you get started with this demo, make sure that you have the necessary hardware ready and the software installed and configured.

You also need a synthesis toolchain.

Synthesize the design

In the end we want to get from the Verilog sources to a bitstream. In this demo, we show two ways of doing that: using Xilinx Vivado and using Synopsys Synplify together with Xilinx ISE. The other two options, using Synplify with Vivado and using ISE alone should be possible as well but are not shown here.

Vivado

Synplify and ISE

Build and flash the FX2 firmware

The Cypress FX2 chip on the ZTEX boards needs firmware to work properly. Connect the board to your PC and execute the following steps to build and flash the firmware.

$> cd GLIP_DIR/src/backend_cypressfx2/fw/ztex
$> make fw-213.ihx
$> make flash-213

The firmware is written to the EEPROM and does not need to be reloaded after you unplug your board (until you have overwritten it).

Configure the FPGA

When the bitstream has been succesfully generated, you can configure the FPGA with through the Cypress FX2 chip using the ZTEX tools. Adjust the path to the bitstream as given in the section above.

$> FWLoader -c -rf -uf PATH/TO/BITSTREAM.bit

Execute the loopback measurement tool

Execute the GLIP tool "Loopback Mesasure" that measures the loopback performance.

$> glip_loopback_measure -b cypressfx2 -ousb_vid=0x221a,usb_pid=0x0100

The performance should be around 20 MByte/s bidirectional.