Interrupt service routine connections – Xilinx IP Ethernet AVB Endpoint v2.4 UG492 User Manual

Page 133

Advertising
background image

Ethernet AVB Endpoint User Guide

www.xilinx.com

133

UG492 September 21, 2010

Software System Integration

For example, in the user software, the AVB drivers can be instanced as follows:

/* Allocate an instance of the XAvb device driver */

static XAvb Avb;

int Status;

XAvb_Config *AvbConfigPtr;

.

/* Initialize AVB Driver */

AvbConfigPtr = XAvb_LookupConfig(AVB_DEVICE_ID);

Status = XAvb_CfgInitialize(&Avb,

AvbConfigPtr,

AvbConfigPtr->BaseAddress);

In the previous example, the

AVB_DEVICE_ID

is defined in the xparameters.h file,

automatically generated by the EDK tools as a result of the software driver instance and
the hardware instance of the Ethernet AVB Endpoint core in the Microprocessor Software
Specification (.mss) file and the Microprocessor Hardware Specification (.mhs) files.

When the core has been generated in the Standard CORE Generator™ format (see

“Core

Delivery Format”

), the value of the base address used for the hardware instance in the

.mhs file must match the value of the PLB base address which was selected during the
Ethernet AVB Endpoint core generation.

When the core has been generated in the EDK pcore format, the value of the PLB base
address will be automatically configured by XPS.

Interrupt Service Routine Connections

The Ethernet AVB Endpoint core creates three interrupt output signals:

interrupt_ptp_timer

,

interrupt_ptp_tx

and

interrupt_ptp_rx

. It is

recommended that these be connected to the interrupt input ports of a xps_intc core: this
is a standard interrupt controller core, complete with associated software drivers, which
are available with the EDK.

In this version of the Ethernet AVB Endpoint core, only the

interrupt_ptp_timer

and

interrupt_ptp_rx

interrupts are required by the software drivers. The functionality

provided by the

interrupt_ptp_tx

interrupt signal, as used in previous software driver

versions, has been replaced with polling functionality to reduce the overall interrupt driver
overhead.

The two hardware interrupt signals required need to be connected to the following
interrupt routine service functions:

interrupt_ptp_timer

needs to call the function

XAvb_PtpTimerInterruptHandler()

interrupt_ptp_rx

needs to call the function XAvb_PtpRxInterruptHandler()

Again, see the provided software example file that performs these steps.

Advertising