JESD204B Intel® Arria® 10 FPGA IP Design Example User Guide

ID 683113
Date 10/14/2022
Public
Document Table of Contents

1.2.10.2. Interrupt Service Routines (ISR)

One key feature of the Nios Control design example is the ability to handle interrupt requests (IRQ) from peripherals through the software interrupt service routines (ISR).

In this design example, the following peripherals have their IRQ output ports connected to the IRQ input port of the Nios processor:

  • JESD204B IP core TX base layer
  • JESD204B IP core RX base layer
  • SPI master
  • Timer
  • Reset sequencer

The software C code included as part of the design example defines the ISRs for the following peripherals:

  • JESD204B IP core TX base layer
  • JESD204B IP core RX base layer
  • SPI master

The ISRs in the C code is a basic routine that performs two tasks:

  • Clear IRQ error flag
  • Print error type and message (for JESD204B IP core TX and RX base layer ISR only)

Error types and messages printed by the JESD204B IP core TX base layer ISR:

  • SYNC_N error
  • SYSREF LMFC error
  • DLL data invalid error
  • Transport layer data invalid error
  • SYNC_N link reinitialization request
  • Transceiver PLL locked error
  • Phase compensation FIFO full error
  • Phase compensation FIFO empty error
  • Error types and messages printed by the JESD204B IP core RX base layer ISR:
  • SYSREF LMFC error
  • DLL data ready error
  • Transport layer data ready error
  • Lane deskew error
  • RX locked to data error
  • Phase compensation FIFO full error
  • Phase compensation FIFO empty error
  • Code group synchronization error
  • Frame alignment error
  • Lane alignment error
  • Unexpected K character
  • Not in table error
  • Running disparity error
  • Initial Lane Alignment Sequence (ILAS) error
  • DLL error reserve status
  • ECC error corrected
  • ECC error fatal

The error types correspond to the tx_err, rx_err0, and rx_err1 status registers in the JESD204B IP core TX and RX register maps respectively. Refer to the JESD204B RX Address Map and Register Definitions and JESD204B TX Address Map and Register Definitions for more details on the TX and RX error registers. The PRINT_INTERRUPT_MESSAGES parameter in the main.h header file controls the printing of interrupt error messages to the standard output. Set the parameter to 1 (default) to print error messages, else set to 0. Refer to Software Parameters for more details. You can modify the ISRs in the C code to customize the interrupt handling response based on your system specifications.