bram: xbram_intr_example.c File Reference

| bram Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xbram_intr_example.c File Reference

## Overview

This file contains a design example using the BRAM driver (XBram) in an interrupt driven mode of operation.

This example assumes that there is an interrupt controller in the hardware system and the BRAM device is connected to the interrupt controller.

     MODIFICATION HISTORY:

     Ver   Who  Date         Changes

     1.00a sa   05/11/10 Initial release.
     3.01a sa   13/01/12 Changed XBram_SelfTest(InstancePtr) to
                             XBram_SelfTest(InstancePtr, XBRAM_IR_ALL_MASK)
                             as per new API (CR 639274)
     4.1   ms   01/23/17 Modified xil_printf statement in main function to
                         ensure that "Successfully ran" and "Failed" strings are
                         available in all examples. This is a fix for CR-965028.

## Functions
int | BramIntrExample (XIntc *IntcInstancePtr, XBram *InstancePtr, u16 DeviceId, u16 IntrId)
| This is the entry function from the TestAppGen tool generated application which tests the interrupts when enabled in the BRAM. More...
int | main (void)
| This function is the main function of the BRAM example. More...

## Function Documentation

int BramIntrExample | ( | XIntc * | IntcInstancePtr,
|  | XBram * | InstancePtr,
|  | u16 | DeviceId,
|  | u16 | IntrId
| ) |  |

This is the entry function from the TestAppGen tool generated application which tests the interrupts when enabled in the BRAM.

Parameters

  IntcInstancePtr | is a reference to the Interrupt Controller driver Instance
  InstancePtr | is a reference to the BRAM driver Instance
  DeviceId | is the XPAR_<BRAM_instance>_DEVICE_ID value from xparameters.h
  IntrId | is XPAR_<INTC_instance>_<BRAM_instance>_VEC_ID value from xparameters.h

Returns
  - XST_SUCCESS if the example is successful.
  - XST_FAILURE if the example failed.

Note
  None.

References XBram_Config::CtrlBaseAddress, XBram_Config::EccStatusInterruptPresent, XBram_Config::FaultInjectionPresent, XBram_Config::UncorrectableFailingDataRegs, XBram_CfgInitialize(), XBRAM_IR_ALL_MASK, XBram_LookupConfig(), and XBram_SelfTest().

Referenced by main().

int main | ( | void |  | ) |

This function is the main function of the BRAM example.

It is for initializing the BRAM device and setting up interrupts.

Parameters

  None. |

Returns
  - XST_SUCCESS to indicate success.
  - XST_FAILURE to indicate failure.

Note
  None.

References BramIntrExample().