This example demonstrates how to set up and control the BER test hardware and to configure a SD-FEC IP instance. It implements an interactive software described in the processor-based example design of SD-FEC Product Guide (PG256) .
Source path for the demo is located at: https://github.com/Xilinx/linux-examples/blob/master/sd-fec-1.1/sdfec-demo/files/main.c
To create images that can be deployed using an SD-CARD
- Create petalinux project using the following command:
$ petalinux-create -t project -s <xilinx-zcu111-v2019.2-final.bsp> -n plnx_sdfec_demo
Note: xilinx-zcu111-v2019.2-final.bsp is the PetaLinux BSP for ZCU111 Production Silicon Rev1.0 Board.
- Change to the PetaLinux project directory using the following command:
$ cd plnx_sdfec_demo
- Build the Linux images using the following command:
$ petalinux-build
- After the above statement executes successfully, verify the images and the timestamp in the images directory in the PetaLinux project folder using the following commands:
$ cd images/linux/ $ ls -al
- Generate the Boot image using the following command:
$ petalinux-package --boot --format BIN --fsbl zynqmp_fsbl.elf --u-boot --fpga system.bit
The above procedure will create the following SD-Card deployable images a. BOOT.bin b. image.ub
Copy the BOOT.BIN and image.ub from plnx-sdfec-demo/plnx_sdfec_demo/images/linux to a SD-CARD.
The following console log demonstrate how to run the SD-FEC demo, to exit the application press CTRL-C.
root@xilinx-zcu111-zu28-es1-2018_3:~# sdfec-demo Initialize all devices metal: info: metal_uio_dev_open: No IRQ for device a0000000.data_source_top. metal: info: metal_uio_dev_open: No IRQ for device a0030000.stats_top. metal: info: metal_uio_dev_open: No IRQ for device a0010000.monitor. metal: info: metal_uio_dev_open: No IRQ for device a0020000.monitor. metal: info: metal_uio_dev_open: No IRQ for device a00d0000.monitor. metal: info: metal_uio_dev_open: No IRQ for device a00e0000.monitor. Open FECs Setup LDPC code for decoder Setup LDPC code for encoder Start decoder FEC Start encoder FEC Setup data source, stats and monitors Wait for finish Collect stats ---- RESULTS ---- Stats: Decode iteration count = 800 Channel bit error count = 12079 Channel block error count = 100 Uncorrected bit error count after Decode = 13763 Uncorrected block error count after Decode = 100 Encoder Monitors: In Monitor First Timestamp = 2567215315 In Monitor Last Timestamp = 2567216973 In Monitor Num Stalled Clk Cycles = 965 Out Monitor First Timestamp = 2567215410 Out Monitor Last Timestamp = 2567217229 Out Monitor Num Stalled Clk Cycles = 201 Decoder Monitors: In Monitor First Timestamp = 2567215536 In Monitor Last Timestamp = 2567229792 In Monitor Num Stalled Clk Cycles = 3026 Out Monitor First Timestamp = 2567215966 Out Monitor Last Timestamp = 2567230706 Out Monitor Num Stalled Clk Cycles = 863 Stop encoder FEC Stop decoder FEC Current config: code : 0 num_blocks : 100 snr : 6.000000 max_iter : 8 term_on_pass: 0 mod_type : 2 zero_data : 0 skip_chan : 0 New config? (y/n):y Input new config: code: 1 num_blocks: 100 snr: Next config: code : 1 num_blocks : 100 snr : 6.000000 max_iter : 8 term_on_pass: 0 mod_type : 2 zero_data : 0 skip_chan : 0 Setup LDPC code for decoder Setup LDPC code for encoder Start decoder FEC Start encoder FEC Setup data source, stats and monitors Wait for finish Collect stats ---- RESULTS ---- Stats: Decode iteration count = 800 Channel bit error count = 73550 Channel block error count = 100 Uncorrected bit error count after Decode = 77466 Uncorrected block error count after Decode = 100 Encoder Monitors: In Monitor First Timestamp = 1521568905 In Monitor Last Timestamp = 1521580327 In Monitor Num Stalled Clk Cycles = 7462 Out Monitor First Timestamp = 1521569258 Out Monitor Last Timestamp = 1521580825 Out Monitor Num Stalled Clk Cycles = 0 Decoder Monitors: In Monitor First Timestamp = 1521569735 In Monitor Last Timestamp = 1521661054 In Monitor Num Stalled Clk Cycles = 40781 Out Monitor First Timestamp = 1521571430 Out Monitor Last Timestamp = 1521665176 Out Monitor Num Stalled Clk Cycles = 0 Stop encoder FEC Stop decoder FEC Current config: code : 1 num_blocks : 100 snr : 6.000000 max_iter : 8 term_on_pass: 0 mod_type : 2 zero_data : 0 skip_chan : 0 New config? (y/n):