JESD204B Intel® FPGA IP Design Example User Guide: Intel® Quartus® Prime Standard Edition

ID 683094
Date 10/31/2022
Public

A newer version of this document is available. Customers should click here to go to the newest version.

Document Table of Contents

1.7.8.3. Software Interrupt Service Routines (ISR)

One key feature of the Nios II processor control unit 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 II 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. The PRINT_INTERRUPT_MESSAGES parameter in the main.h header file controls the printing of interrupt error messages in the Nios II console window. Set the parameter to 1 (default) to print error messages, else set to 0. Refer to the Software Parameters section for more details. You can modify the ISRs in the C code to customize the interrupt handling response based on your system specifications.