Community
cancel
Showing results for 
Search instead for 
Did you mean: 

Stratix V CRC ERROR Injection

Stratix V CRC ERROR Injection


Design Files Sfl top crcerror.zip

This is an example meant to demonstrate the CRC_ERROR injection feature mentioned in AN539 “Test Methodology of Error Detection and Recovery using CRC in Altera FPGA Devices” http://www.altera.com/literature/an/an539.pdf. The design uses the Stratix V GX FPGA Development kit http://www.altera.com/products/devkits/altera/kit-sv-gx-host.html. The design implements the Serial Flash Loader and a couple of counters to blink two LEDs. The Serial Flash Loader is not required to use the CRC_ERROR feature and was simply in the design to illustrate another feature. Details on the Serial Flash Loader are here: http://www.altera.com/literature/an/an370.pdfExample Design Details

The design uses CLKIN_50, pin AN6, on the devkit, which is a 50 MHz clock. To enable CRC_ERROR detection within Quartus click on Assignments, Device. Next click on Device and Pin Options and go into the “Error Detection CRC” section, make the following selections:

e/e3/Crc_fig1.png

Once these options are set you can compile the design and program the SOF file into the FPGA.

Source Code

3/3a/Crc_fig2.png

Programming the Stratix V Devkit

To program the design into the Stratix V PCIe devkit you can use “Auto Detect” to propagate the device list and then click on the 5SGXEA7K2F40 FPGA and select “Change File …”, point to the ./output_files/sfl_top.sof file. Click on “Start”.

You can verify the FPGA is programmed when LED0 (green) is blinking a twice the rate of LED1 (red) and the Progress is 100%. 

9/90/Crc_fig3.png

Injecting the Error with quartus_jli Executable

A JAM file was created called inject.jam. This is based on Example 4 on pg. 21 of AN 539. The quotations used in the example will cause an “illegal symbol name” error unless you replace them. The inject.jam file already has these corrections, also STATE IDLE should be STATE IDLE;

Make sure the Quartus bin directory is in your path (/altera/13.0sp1/quartus/bin64/), open “Command” in windows and type the following command: “quartus_jli -c 1 -a error_inject inject.jam”. You should see the following result or something similar and the CRC_ERROR pin should go high. It this example it stays high for about 10 us and repeats this every 100 ms or so. If you have Internal Scrubing Enabled it will only pulse high once.

8/8c/Crc_fig4.png

Below is a scope capture of the CRC_ERROR pin on the Stratix V GX PCIe Devkit. This signal is on pin AN33 which is used on the devkit for PCIE_SMBCLK. This is pin B5 on the PCIe edge connector so you should not have this card plugged into a PCIe slot for this experiment.

2/22/Crc_fig4a.png

To clear the fault enable register you should run the clear.jam file. This is copied Example 5 on pg. 23 of the document. To execute this type the following command: “quartus_jli –c 1 –a error_inject_disable clear.jam” you should see the following results in the command prompt and the CRC_ERROR pin will no longer go high.

4/42/Crc_fig5.png

Attachments
Version history
Revision #:
1 of 1
Last update:
‎06-26-2019 06:53 PM
Updated by:
 
Contributors