### Xilinx Processor IP Library

<hl>Software Drivers</hl>

Main Page | Data Structures | File List | Data Fields | Globals

# xintc_selftest.c File Reference

## Detailed Description

Contains diagnostic self-test functions for the XIntc component. This file requires other files of the component to be linked in also.

     MODIFICATION HISTORY:

     Ver   Who  Date     Changes
     ----- ---- -------- -----------------------------------------------
     1.00b jhl  02/21/02 First release
     1.10c mta  03/21/07 Updated to new coding style

## Functions

int | XIntc_SelfTest (XIntc *InstancePtr)
int | XIntc_SimulateIntr (XIntc *InstancePtr, u8 Id)

## Function Documentation

int XIntc_SelfTest | ( | XIntc * | InstancePtr | ) |

Run a self-test on the driver/device. This is a destructive test.

This involves forcing interrupts into the controller and verifying that they are recognized and can be acknowledged. This test will not succeed if the interrupt controller has been started in real mode such that interrupts cannot be forced.

Parameters:

  | InstancePtr | is a pointer to the XIntc instance to be worked on.

Returns:
  - XST_SUCCESS if self-test is successful.
  - XST_INTC_FAIL_SELFTEST if the Interrupt controller fails the self-test. It will fail the self test if the device has previously been started in real mode.

Note:
  None.

int XIntc_SimulateIntr | ( | XIntc * | InstancePtr,
|  | u8 | Id
| ) |

Allows software to simulate an interrupt in the interrupt controller. This function will only be successful when the interrupt controller has been started in simulation mode. Once it has been started in real mode, interrupts cannot be simulated. A simulated interrupt allows the interrupt controller to be tested without any device to drive an interrupt input signal into it.

Parameters:

  | InstancePtr | is a pointer to the XIntc instance to be worked on.
  | Id | is the interrupt ID for which to simulate an interrupt.

Returns:
  - XST_SUCCESS if successful
  - XST_FAILURE if the interrupt could not be simulated because the interrupt controller is or has previously been in real mode.

Note:
  None.

Copyright © 1995-2009 Xilinx, Inc. All rights reserved.