axis_switch: xaxis_switch_example.c File Reference

| axis_switch Xilinx SDK Drivers API Documentation

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

Macros | Functions | Variables
xaxis_switch_example.c File Reference

## Overview

This file demonstrates the use AXI4-Stream Switch Control Router driver.

    MODIFICATION HISTORY:

    Ver   Who Date     Changes

    1.00  sha 01/28/15 Initial release.

## Macros
#define | XAXIS_SWITCH_DEVICE_ID XPAR_AXIS_SWITCH_0_DEVICE_ID
| The following constants map to the XPAR parameters created in the xparameters.h file. More...

## Functions
int | AxisSwitch_Example (u16 DeviceId)
| This function demonstrates the use of AXI-Stream Switch driver functions. More...
int | main ()
| This is the main function for AXI4-Stream Switch example. More...

## Variables
XAxis_Switch | AxisSwitch
| Instance of the AXI4-Stream Switch core. More...

## Macro Definition Documentation

#define XAXIS_SWITCH_DEVICE_ID XPAR_AXIS_SWITCH_0_DEVICE_ID

The following constants map to the XPAR parameters created in the xparameters.h file.

They are defined here such that a user can easily change all the needed parameters in one place.

Referenced by main().

## Function Documentation

int AxisSwitch_Example | ( | u16 | DeviceId | ) |

This function demonstrates the use of AXI-Stream Switch driver functions.

Parameters

  DeviceId | is the unique device id of the AXI4-Stream Switch core.

Returns
  - XST_SUCCESS if AXI4-Stream Switch example ran successfully.
  - XST_FAILURE if AXI4-Stream Switch example failed.

Note
  None.

References XAxis_Switch_Config::BaseAddress, XAxisScr_CfgInitialize(), XAxisScr_IsMiPortEnabled(), XAxisScr_LookupConfig(), XAxisScr_MiPortDisable(), XAxisScr_MiPortDisableAll(), XAxisScr_MiPortEnable(), XAxisScr_RegUpdateDisable, and XAxisScr_RegUpdateEnable.

Referenced by main().

int main | ( |  | ) |

This is the main function for AXI4-Stream Switch example.

Parameters

  None. |

Returns
  - XST_SUCCESS if AXI4-Stream Switch example ran successfully.
  - XST_FAILURE if AXI4-Stream Switch example failed.

Note
  Axis_Switch core connects up to 16 masters to 16 slaves.

References AxisSwitch_Example(), and XAXIS_SWITCH_DEVICE_ID.

## Variable Documentation

XAxis_Switch AxisSwitch

Instance of the AXI4-Stream Switch core.