Xapp521 XSVI AXI4
Xapp521 XSVI AXI4
Summary The ARM® core AMBA® specification (version 4.0) AXI interconnect standard includes three
Advanced eXtensible Interface version 4 (AXI4) interconnect protocols—AXI4 interconnect,
AXI4-Lite protocol, and AXI4-Stream interconnect. The Xilinx AXI video direct memory access
(AXI VDMA) core is offered with an AXI4-Stream interface for video data. Video applications
that require the video data to be buffered in memory need an AXI4-Stream interface to connect
with the AXI VDMA. Previous versions of Xilinx video IP cores used a protocol called Xilinx
streaming video interface (XSVI) for video data. Refer to Table 2 for a description and list of the
XSVI signals. This application note details bridging an XSVI interface to an AXI4-Stream
interface, enabling video designs with Xilinx video IP cores and XSVI interfaces to use the AXI
VDMA. Figure 1 illustrates the basic structure of the bridging between XSVI and AXI4-Stream.
X-Ref Target - Figure 1
Memory
X521_01_121911
Design An embedded reference design, described in Table 1, is included to illustrate the functionality of
Overview the bridges described in this application note.
XSVI and AXI4-Stream protocols are non-addressable, point-to-point interfaces with minimal
overhead, allowing throughput to be the main priority. The XSVI protocol streams images and
© Copyright 2012 Xilinx, Inc. Xilinx, the Xilinx logo, Artix, ISE, Kintex, Spartan, Virtex, Zynq, and other designated brands included herein are trademarks of Xilinx in the United
States and other countries. AMBA and ARM are registered rademarks of ARM in the EU and other countries. All other trademarks are the property of their respective owners.
video along with a minimal set of control signals from one video peripheral to another. The
AXI4-Stream protocol streams non-specific data to and from peripherals.
Many video systems need to buffer the data in external memory. The VDMA core provides
video cores with direct access to memory for buffering.
The latest version of the VDMA core
(http://www.xilinx.com/support/documentation/ipaudiovideoimageprocess_processing_axi-vd
ma.htm) comes with AXI4-Lite and AXI4-Stream interfaces. Some Xilinx Video IP cores use an
XSVI interface for video data. If the video processing cores with XSVI need to buffer the images
or video, then a bridge is required to bridge between XSVI and AXI4-Stream to send video data
to the AXI VDMA.
XSVI to To convert from the XSVI Interface to the AXI4-Stream interface requires the XSVI timing
AXI4-Stream control signals to be translated into native AXI4-Stream control signals. A FIFO is used to buffer
the data to simplify the translation from the XSVI protocol to the AXI4-Stream protocol. The
XSVI interface consists of the signals listed in Table 2.
AXI4 and AXI4-Lite protocols are typically used in a processor system, whereas the
AXI4-Stream interface is a non-addressable point-to-point connection. Detailed discussion on
the AXI4-Stream protocol is beyond the scope of this application note. More information about
AXI4 can be found in the AXI4 Reference Guide [Ref 1]. The AXI4-Stream signals of interest
are shown in Table 3.
32 32 33
FIFO 33 32
video_data D Q DIN DOUT m_axis_tdata
WREN m_axis_tlast
video_clk RDEN EMPTY
WRCLK
RDCLK
RST
active_video D Q
m_axis_aresetn
D Q
CE
R
fsync_in
D Q fsync_out
DSQ
CE
m_axis_tready
D Q D Q
m_axis_tvalid
X521_02_122011
Because the AXI VDMA core does not have an XSVI interface, the bridge is used. The only
XSVI-specific signals used by the AXI VDMA are the frame synchronization and active video
signals.
In compliance with the AXI4-Stream specification and to successfully bridge the data between
XSVI and AXI4-Stream, the data coming from the bridge (master side of the AXI4-Stream) has
to be stable when m_axis_tvalid is asserted. The receiving (slave) peripheral asserts the
m_axis_tready signal, telling the bridge to start sending the data that is stored in the FIFO.
Figure 3 is a representation of this transaction. Figure 3 shows the m_axis_tdata values are
stable before m_axis_tready is asserted, followed by m_axis_tvalid, which is in compliance with
the AXI4-Stream specification.
video_clk
active_video
m_axis_tvalid
m_axis_tready
X521_03_111711
AXI4-Stream to XSVI
The process to convert from an AXI4-Stream to XSVI is similar to the process to convert from
XSVI to AXI4-Stream. As shown in Figure 4, a FIFO buffers video data before streaming the
data out to be processed. As timing synchronization signals are not passed through the
AXI4-Stream interface, the video timing controller core generates the synchronization signals
needed for the video data. The axi2xsvi bridge allows both XSVI and AXI4-Stream signals as
inputs to accommodate the needed synchronization signals. The video clock and the
AXI4-Stream run at the same rate to produce a continuous video stream.
X-Ref Target - Figure 4
FIFO
s_axis_tdata DIN DOUT video_data_out
s_axis_tvalid WREN FULL s_axis_tready
active_video_in RDEN
video_clk_in WRCLK
RDCLK
RST
s_axis_aresetn
7 7
active_chroma_in D Q active_chroma_out
field_id_in field_id_out
hblank_in hblank_out
hsync_in R hsync_out
vblank_in vblank_out
vsync_in vsync_out
active_video_out
X521_04_111711
Configuring the The xsvi2axi bridge pcore parameters are listed in Table 4.
Bridges
Table 4: Parameters for xsvi2axi Bridge
Parameter Values Description
C_M_AXIS_S2MM_TDATA_WIDTH 8, 16 (default), 24, 32, 40 Data width on the AXI4-Stream side of the bridge
C_MEMORY_TYPE Block (default), distributed Either Block RAM or LUT RAM (distributed)
C_VIDEO_DATA 8, 10, 12,16, 24 (default), 30, 36 Data width on the XSVI side of the bridge.
Must be ≤ C_M_AXIS_S2MM_TDATA_WIDTH
C_WRITE_FIFO_DEPTH N2 (1,024 default) Memory depth of the FIFO
Bridge Device Table 6 details the worst case utilization and performance numbers of the xsvi2axi bridge
Utilization and targeting a data width of 40 in the slowest speed grade parts. For comparison to the results
listed in Table 6, Table 7 lists the required pixel clock speeds for various resolutions.
Performance
Table 6: Bridge Performance Numbers
Device Memory Type LUT / FF Pairs Block RAM Speed
Spartan-6 FPGA Distributed 1635 0 127 MHz
Spartan-6 FPGA Block RAM 110 2 RAMB16 237 MHz
1 RAMB8
Virtex-6 FPGA Distributed 1635 0 180 MHz
Virtex-6 FPGA Block RAM 110 1 RAMB36 233 MHz
1 RAMB18
Reference The reference design is delivered as a MicroBlaze™ embedded processor design running on
Design an ML605 board, which highlights some basic features of the Scaler core. The bridges are
delivered as embedded pcores and reside in the EDK project directory's pcore folder. The
video system targets a 720p60 DVI connection, and requires a 74.25 MHz clock rate. The
processor system is AXI-based running at 200 MHz.
The reference design files can be downloaded from:
https://secure.xilinx.com/webreg/clickthrough.do?cid=181114
Table 8 lists the memory addresses of the peripherals used in the embedded system.
The video cores that are not addressable by the processor are listed in Table 9.
The cores listed in Table 9 are non-addressable cores, and they are also custom cores. The two
FMC cores are made by Avnet to interface with the FMC card. The xsvi2axi and axi2xsvi
bridges are the bridges highlighted in this application note.
All of the custom cores along with the Scaler core are delivered as local pcores residing in the
EDK project pcore directory. The Scaler core was generated through the CORE Generator™
GUI as a pcore with a hardware evaluation license.
Figure 5 shows only the connection between the peripherals and the processor (control path)
which allows the processor to control the video IP via software. The software control can
change settings in the video IP cores while the video stream is being processed.
AXI4
AXI4–Lite
X521_05_121111
Figure 6 shows the same embedded design, with the streaming interface (data path)
connections. Table 10 describes the labels in Figure 6. Some of the peripherals only process
video data on the streaming interface and have no connection to the processor. The video
stream is completely independent of the processor and the only interaction between the
processor and the video cores is through the processor bus.
X-Ref Target - Figure 6
XSVI Video
VTC_1 DVI Data
Scaler VDMA_1 axi2xsvi CSC_1
XSVI XSVI Out
AXI4-Stream
AXI4-Stream X521_06_121911
X521_07_111711
----------------------------------------------------------------
-- Video Scaler Test Menu using Scaler/VDMA/TimeBase drivers --
----------------------------------------------------------------
? = help
----------------------------------------------------------------
scaler_out_width = 1280
scaler_in_width = 1280
scaler_out_height = 720
scaler_in_height = 720
>
1. Open a terminal with the proper COM port selected for the system’s USB port.
2. Highlight the empty_application_0 software project.
3. Press the green Play button in the SDK tool bar.
The software output should be onscreen.
Conclusion The xsvi2axi and axi2xsvi bridges effectively translate between XSVI and AXI4-Stream and
allow video designs using XSVI to use the AXI VDMA for memory access. This solution is used
to build video systems when the Xilinx video IP does not contain an AXI4-Stream interface.
Revision The following table shows the revision history for this document.
History
Date Version Description of Revisions
02/01/2012 1.0 Initial Xilinx release.
Notice of The information disclosed to you hereunder (the “Materials”) is provided solely for the selection and use of
Xilinx products. To the maximum extent permitted by applicable law: (1) Materials are made available “AS
Disclaimer IS” and with all faults, Xilinx hereby DISCLAIMS ALL WARRANTIES AND CONDITIONS, EXPRESS,
IMPLIED, OR STATUTORY, INCLUDING BUT NOT LIMITED TO WARRANTIES OF
MERCHANTABILITY, NON-INFRINGEMENT, OR FITNESS FOR ANY PARTICULAR PURPOSE; and (2)
Xilinx shall not be liable (whether in contract or tort, including negligence, or under any other theory of
liability) for any loss or damage of any kind or nature related to, arising under, or in connection with, the
Materials (including your use of the Materials), including for any direct, indirect, special, incidental, or
consequential loss or damage (including loss of data, profits, goodwill, or any type of loss or damage
suffered as a result of any action brought by a third party) even if such damage or loss was reasonably
foreseeable or Xilinx had been advised of the possibility of the same. Xilinx assumes no obligation to
correct any errors contained in the Materials or to notify you of updates to the Materials or to product
specifications. You may not reproduce, modify, distribute, or publicly display the Materials without prior
written consent. Certain products are subject to the terms and conditions of the Limited Warranties which
can be viewed at http://www.xilinx.com/warranty.htm; IP cores may be subject to warranty and support
terms contained in a license issued to you by Xilinx. Xilinx products are not designed or intended to be
fail-safe or for use in any application requiring fail-safe performance; you assume sole risk and liability for
use of Xilinx products in Critical Applications: http://www.xilinx.com/warranty.htm#critapps.