glip
0.1.0-dev
The Generic Logic Interfacing Project
|
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.
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.
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.
In a console, type
$> cd GLIP_DIR/src/backend_cypressfx2/logic/demo/ztex_213_loopback $> vivado -source loopback_vivado.tcl
You need to replace GLIP_DIR
with the directory containing your GLIP checkout.
Generate Bitstream
. Answer Yes
when asked to run other steps before the bitstream generation.loopback/loopback.runs/impl_1/ztex_213_loopback.bit
Open Project...
-> Existing Project...
, select the loopback_synplify.prj
file and click on Open
Run
in the top-left corner to synthesize the design. Wait for it to finish.$> cd GLIP_DIR/src/backend_cypressfx2/logic/demo/ztex_213_loopback $> bitgen -w rev_1/pr_1/ztex_213_loopback.ncd
rev_1/pr_1/ztex_213_loopback.bit
.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).
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 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.