ADM-XRC SDK 2.8.1 User Guide (Linux)
© Copyright 2001-2009 Alpha Data


ITest sample application

Model support

ModelSupported
ADM-XRC
ADM-XRC-P
ADM-XRC-II-Lite
ADM-XRC-II
ADM-XPL
ADM-XP
ADP-WRC-II
ADP-DRC-II
ADP-XPI
ADM-XRC-4LX
ADM-XRC-4SX
ADM-XRC-4FX
ADPE-XRC-4FX
ADM-XRC-5LX
ADM-XRC-5T1
ADM-XRC-5T2
ADM-XRC-5T2-ADV
ADM-XRC-5TZ
ADM-XRC-5T-DA1

Overview

The ITest sample application demonstrates how to handle interrupts from the FPGA in at application-level.

Syntax
itest [options ...]
Options

Option Argument type Meaning
-card base 10 integer ID of card to open
-index base 10 integer Index of card to open

Description

On startup, the ITest sample application performs the following steps:

  1. An interrupt thread is started. The interrupt thread waits for interrupts in a loop, using the ADMXRC2_WaitForInterrupt API call. Each an FPGA interrupt occurs, the interrupt thread wakes up and performs the following:
    1. Reads the ISTAT FPGA register to discover which of the 32 FPGA interrupts are pending.
    2. Clears all pending FPGA interrupts by writing to the ISTAT FPGA register.
    3. Rearms FPGA interrupts by writing a dummy value to the IARM FPGA register.
    4. Increments a count of FPGA interrupts received.
  2. Interrupts are enabled by writing to the IMASK FPGA register.
  3. Once initialized, the application waits for input from the user:

    Output from a typical run might look like:

    Enter 'q' to quit, or anything else to generate an interrupt:
    Interrupt thread started
    
    Enter 'q' to quit, or anything else to generate an interrupt:
    
    Enter 'q' to quit, or anything else to generate an interrupt:
    
    Enter 'q' to quit, or anything else to generate an interrupt:
    
    Enter 'q' to quit, or anything else to generate an interrupt:
    
    Enter 'q' to quit, or anything else to generate an interrupt:
    q
    Generated 5 interrupts
    Interrupt thread saw 5 interrupt(s)
    
    FPGA Design

    The ITest example application uses the ITest sample FPGA design (Verilog, VHDL).

     


     Top of page