bram
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Groups Pages
xbram_example.c File Reference

Overview

Demonstrates the XBram polled self-test example.

This file contains a self test example using the BRAM driver (XBram).

 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,0) 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. 4.9 sd 07/07/23 Added SDT support. 4.14 vlt 12/17/25 Update Doxygen comments to include SDT flow details. 4.15 vn 07/30/26 Fix Doxygen warnings 4.15 tb 09/15/26 Align Doxygen comments with AMD standards.

#include "xparameters.h"
#include "xbram.h"
#include <stdio.h>

Functions

int BramExample (UINTPTR BaseAddress)
 Runs the BRAM polled example for one device. More...
 
int main (void)
 Runs the BRAM polled example. More...
 

Variables

XBram Bram
 The instance of the BRAM driver. More...
 

Function Documentation

int BramExample ( UINTPTR  BaseAddress)

Runs the BRAM polled example for one device.

Parameters
[in]BaseAddressContains the base address of the device.
Returns
  • XST_SUCCESS to indicate success.
  • XST_FAILURE to indicate failure.
Note
In XSCT/classic flow, DeviceId is used to look up the device configuration.

References XBram_Config::CtrlBaseAddress, XBram_CfgInitialize(), XBram_LookupConfig(), and XBram_SelfTest().

Referenced by main().

int main ( void  )

Runs the BRAM polled example.

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

References BramExample().

Variable Documentation

XBram Bram

The instance of the BRAM driver.