PG043 Video in To AXI4-Stream v4.0
PG043 Video in To AXI4-Stream v4.0
AXI4-Stream v4.0
Chapter 1: Overview
Feature Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Licensing and Ordering . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
Appendix B: Upgrading
Migrating to the Vivado Design Suite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Upgrading in Vivado Design Suite. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
Appendix C: Debugging
Finding Help on Xilinx.com . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
Debug Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
Hardware Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
Interface Debug . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
processing cores with AXI4-Stream Video Example Design Provided Separately (3)
See XAPP521 [Ref 3] and XAPP721 [Ref 4]
Protocol interfaces.
Test Bench Verilog
Features Simulation
Models
Verilog Source Code
Supported
• Video input (clocked parallel video data Software Drivers
N/A
with synchronization signals - active video
Tested Design Flows
with either syncs, blanks or both)
Design Entry
Vivado® Design Suite
• AXI4-Stream master interface Tools
• Selectable input data width of 8–256 bits Xilinx Support web page
Overview
Many Xilinx® video processing cores utilize the AXI4-Stream video protocol to transfer
video between cores. Between systems, video is commonly transmitted with explicit
blanking and sync signals for horizontal and vertical timing, and a data valid signal. Digital
visual interface (DVI) is an example of such a transmission mode. The Video In to
AXI4-Stream core converts incoming video with explicit sync and timing to the AXI4-Stream
Video protocol to interface with Xilinx video processing cores that use this protocol.
The Video In to AXI4-Stream core accepts video inputs. For this document, video is defined
as parallel video data with a pixel clock and one of the following sets of timing signals:
Any of these sets of signals is sufficient for the operation of the Video In to AXI4-Stream
core. The particular choice is important to the Video Timing Controller (VTC) detector, so
you should specify the set of timing signals when you generate the VTC core. The output
side of the core is an AXI4-Stream interface in master mode. This interface consists of
parallel video data, tdata, handshaking signals tvalid and tready, and two flags, tlast
and tuser, which identify certain pixels in the video stream. The flag tlast designates the
last valid pixel of each line, and is also known as end of line (EOL). The flag tuser
designates the first valid pixel of a frame, and is known as start of frame (SOF). These two
flags are necessary to identify pixel locations on the AXI4 stream bus because there are no
sync or blank signals. Only active pixels are carried on the bus. The Video IP: AXI Feature
Adoption section of the AXI Reference Guide [Ref 5] describes the video over AXI4 Stream
Video protocol in detail.
A block diagram of a Video In to AXI4-Stream core with a video timing generator is shown
in Figure 1-1.
Video In to AXI4-Stream
AXI4-Stream
Stream Coupler
Data Formatter Master
Video Input
tvalid
Read Logic
active_video wr_en rd_en
tready
Async FIFO
data data in
data tdata
falling edge eol out
detect tlast
vblank rising edge sof tuser
detect level
hblank
rising aclk
vsync edge S
Vert. Blanking.
detect Q
vhsync R
fid
field_id
Video Clock
Video CE
AXIS enable
FIFO flags
Video Timing Controller locked
(Detector)
AXI4-Lite X13198
Figure 1-1: Block Diagram of Video In to AXI4-Stream Core with the Video Timing Controller
The core is designed to be used in parallel with the detector functionality of the VTC. The
video timing detector detects the line standard of the incoming video, and makes the
detected timing values, such as the number of active pixels per line and the number of
active lines available to video processing cores downstream of the Video In to AXI4-Stream
core via an AXI4-Lite interface. It is recommended to connect the “locked” status output of
the video timing detector to the axis_enable input of the Video In to AXI4-Stream core
in order to inhibit the AXI4-Stream bus when the video input is missing or unstable. The
detector locked indicator from the Video Timing Controller is bit 8 of the INTC_if register.
Note: When the video clock is not present, for example, when an input cable is unplugged. Ensure
to reset the VTC and Video In to AXI4-Stream cores. If these cores are not reset, locked signal goes
high and it might allow partial frames down stream. Therefore, Xilinx recommends that you reset the
VTC and Video In to AXI4-Stream cores when the video clock is not available.
Feature Summary
The Video In to AXI4-Stream core converts a video input, consisting of parallel video data,
video syncs, blanks and data valid, to an AXI4-Stream master bus that follows the
AXI4-Stream Video protocol. The core provides a pass-thru of all timing signals for the
Xilinx video timing controller, although the signals for the Video timing Controller are not
required to pass through the Video In to AXI4 Stream core.
The core handles the asynchronous clock boundary crossing between the video clock
domain and the AXI4-Stream clock domain. The data width is selectable from 8 to 256
depending on the number of components required for the video format, the number of bits
per component, and the number of pixels per clock. Interlaced operation is supported.
There is an input FIFO with selectable depth from 32 to 8192 locations.
Applications
• Video input to AXI4-Stream Video Protocol interface for parallel, clocked video sources:
° DVI
° HDMI
° Image Sensors
Product Specification
Standards
The Video In to AXI4-Stream v4.0 core is compliant with the AXI4-Stream Video Protocol.
Refer to the Video IP: AXI Feature Adoption section of the Vivado AXI Reference Guide
(UG1037) [Ref 5] for additional information.
Performance
The following sections detail the performance characteristics of the Video In to
AXI4-Stream v4.0 core.
Maximum Frequencies
This section contains typical clock frequencies for the target devices. The maximum
achievable clock frequency can vary. The maximum achievable clock frequency and all
resource counts can be affected by other tool options, additional logic in the FPGA device,
using a different version of Xilinx tools and other factors.
Latency
When the downstream processing block on the AXI4-Stream bus can take data at the pixel
rate or faster, the typical latency through the Video In to AXI4-Stream v4.0 core is 6 cycles
of vid_io_in_clk + 3 cycles of aclk .
If the downstream block takes pixels at a slower rate, the FIFO is used to balance the
mismatch in the input and output rates over the course of lines and frames. This storage of
pixels in the FIFO adds to the latency and varies according to the data flow in and out of the
core.
Throughput
The average data rates of active pixels on the AXI4-Stream interface matches the average
rate of active pixels in on the Video bus. However, the clock rates of the input and output
need not match. Because the AXI4-Stream bus does not carry blank pixels, the clock rate
can be lower than the video clock rate and still have sufficient bandwidth to meet the
average rate requirement. Additional FIFO depth is required to smooth the mismatch in
instantaneous rates. Both the input video pixel clock (Fvclk) and the rate of the
AXI4-Stream Clock (Faclk) are limited by the overall Fmax.
If Faclk is equal to or greater than Fvclk, only the minimum buffer size (32 locations) is
required. This assumes that the cores connected downstream of the Video In to
AXI4-Stream core can sink data at the full video rate. For example, the downstream core can
accept data in a virtually continuous stream with gaps occurring only following EOL, and
each line consecutively with line gaps only preceding SOF. In this scenario, the FIFO empties
after the EOL on each line.
If Faclk is less than Fvclk, additional buffering is required. The FIFO must be large
enough to handle the differential in the rate that pixels are coming in on the video clock,
and the slower rate that they can go out on the AXI4-Stream bus using aclk. For aclk
frequencies above the line average but below that of vclk, the input FIFO depth must be:
If the downstream processing core accepts data at a lower rate than the aclk, additional
buffering is required in an amount sufficient to prevent the FIFO from overflowing during
frame transmission.
Resource Utilization
For details about resource utilization, visit Performance and Resource Utilization.
Core Interfaces
Port Descriptions
The Video In to AXI4-Stream v4.0 core uses industry-standard control and data interfaces to
connect to other system components. The following sections describe the various interfaces
available with the core. Figure 2-1 illustrates an I/O diagram of the Video In to AXI4-Stream
v4.0 core. Not all of the timing signals are required by this core, however it also passes
these signals to a Xilinx Video Timing Controller which, depending on its configuration,
may require certain signals. Therefore all timing signals are present. For the Video In to AXI4
Stream core, the data valid is always required. Also, either a vertical sync or a vertical blank
input is required.
vid_data m_axis_video_tdata
vid_active_video m_axis_video_tvalid AXI4-Stream
vid_vblank m_axis_video_tready Master
Video
vid_hblank m_axis_video_tlast Interface
Inputs
vid_vsync m_axis_video_tuser
vid_hsync
vid_field_id fid
vid_io_in_clk vtd_active_video
vid_io_in_ce vtd_vblank
vid_io_in_reset vtd_hblank Video Timing
vtd_vsync Outputs
aclk
aclken vtd_hsync
aresetn vtd_field_id
aclken
overflow
axis_enable underflow
Common Interface
Table 2-1: Port Name I/O Width Description
Signal Name Direction Width Description
aclk Input 1 AXI4-Stream ACLK.
aclken Input 1 AXI4-Stream ACLKEN. Active-High.
aresetn Input 1 AXI4-Stream ARESETN. Active-Low. Synchronous to
ACLK.
axis_enable Input 1 This input should be connected to the VTC detector
locked status and is synchronous to vid_io_in_clk.
1 = Enable writes into FIFO
0 = Disable writes into FIFO
fid Output 1 Field-ID for AXI4-Stream bus. Used only for interlaced
video: 0=even field, 1=odd field. This bit changes
coincident with SOF on the AXI4-Stream bus. It should
be connected to the field-ID bit of the next device
downstream that is field-aware, otherwise it should
be left unconnected. Synchronous to aclk.
vid_io_in_clk Input 1 Native video clock. Only available in independent
clock mode.
vid_io_in_ce Input 1 Native video clock enable
vid_io_in_reset Input 1 Native video clock domain reset. Synchronous to
vid_io_in_clk. Only available in independent clock
mode. Active-High.
ACLK
The AXI4-Stream output signals are synchronous to the clock signal ACLK. AXI4-Stream
signals are sampled on the rising edge of ACLK. AXI4-Stream output signal changes occur
after the rising edge of ACLK.
ACLKEN
The ACLKEN pin is an active-High, synchronous clock-enable input pertaining to the
AXI4-Stream interface. Setting ACLKEN Low (deasserted) halts the operation of the
AXI4-Stream Bus despite rising edges on the ACLK pin. Internal states are maintained, and
output signal levels are held until ACLKEN is asserted again. When ACLKEN is deasserted,
core AXI4-Stream inputs are not sampled, except ARESETn, which supersedes ACLKEN.
ARESETn
The ARESETN pin is an active-Low reset, which is synchronous to the ACLK domain. When
the bridge is in independent clock mode, this reset is used to reset the AXI4-Stream input
side of the video bridge including the internal FIFO. Asserting either this reset causes the
internal FIFO to be reset. In common clock mode this reset is used to reset the entire bridge.
Video Clock
The video input interface and video timing interface must be synchronous to
vid_io_in_clk.
Video Reset
The video reset signal vid_io_in_reset signal is only available when the core is
configured in independent clock mode. This active-High signal is synchronous to
vid_io_in_clk and is used to reset the input side of the bridge. Asserting either this
reset or aresetn causes the internal FIFO to be reset.
AXI4-Stream Interface
Table 2-4 describes the AXI4-Stream signal names and descriptions. See AXI4-Stream Video
IP and System Design Guide (UG934) for more information.
Video Data
8bit The AXI4-Stream interface specification restricts TDATA widths to integer multiples of
8 bits. Therefore, if video data widths are not an integer multiple of 8, data must be padded
with zeros on the MSB to form an N*8-bit wide vector before connecting to
m_axis_video_tdata. Padding does not affect the size of the core.
BIT
8
0 pad
R B G R B G R B G
72 0
112
108
36
The bridge is also able to perform component width conversion from the input to output
for any combination of width including: 8, 10, 12, and 16 bit. The example shown in
Figure 2-4 illustrates trimming the component width from 12 bits on AXI4-Stream input to
8 bits on the Video output. The four LSB's of each component are trimmed and the
remaining data is packed onto the output video bus.
X-Ref Target - Figure 2-4
Pad 0's
byte aligned Component R Component B Component G
40 32 24 16 8 bit0
24 16 8 bit0
Figure 2-4: Component Width Trimming from AXI4-Stream input to Video Output (12b to 8b)
The example shown in Figure 2-5 illustrates padding the component width from 8 bits on
AXI4-Stream to 12 bits on the Video output. The four LSB's on the output of each
component are padded to zeros and the upper MSB's are mapped onto the bus from the
AXI4-Stream input.
X-Ref Target - Figure 2-5
24 16 8 bit0
32 24 16 8 bit0
Figure 2-5: Component Width Padding from AXI4-Stream input to Video Output (8b to 12b)
READY/VALID Handshake
A valid transfer occurs whenever READY, VALID, ACLKEN, and ARESETn are high at the
rising edge of ACLK. During valid transfers, DATA only carries active video data. Blank
periods and ancillary data packets are not transferred via the AXI4-Stream Video protocol.
Driving m_axis_video_tready
The m_axis_video_tready signal can be asserted before, during, or after the cycle in
which the Video in to AXI4-Stream core asserted m_axis_video_tvalid. The assertion of
m_axis_video_tready may be dependent on the value of m_axis_video_tvalid. A slave
that can immediately accept data qualified by m_axis_video_tvalid should preassert
its m_axis_video_tready signal until data is received. Alternatively,
m_axis_video_tready can be registered and driven the cycle following VALID
assertion. It is recommended that the AXI4-Stream slave should drive READY
independently, or pre-assert READY to minimize latency.
SOF - m_axis_video_tuser
The SOF signal, physically transmitted over the AXI4-Stream tuser signal, marks the first
pixel of a video frame. The SOF pulse is 1 valid transaction wide, and must coincide with the
first pixel of the frame. SOF serves as a frame synchronization signal, which allows
downstream cores to re-initialize, and detect the first pixel of a frame. The SOF signal may
be asserted an arbitrary number of aclk cycles before the first pixel value is presented on
tdata, as long as a tvalid is not asserted.
The main output of the core is a master AXI4-Stream bus that connects to downstream
video processing blocks as shown in Figure 3-1. The master and slave interfaces share a
common clock, reset, and clock enable.
As shown in Figure 3-1, the Video In to AXI4 Stream Core is generally used in conjunction
with the Video Timing Controller, which detects the video timing parameters used by
downstream processing blocks.
Clocking
There are two clocking modes used by the Video In to AXI4-Streambridge, either common
(synchronous) or independent (asynchronous). The common clocking mode is used when
the native and AXI4-Stream sides of the bridge are running from a common synchronous
clock. The common clocking mode disables the clock domain crossing logic in the internal
FIFO, therefore saving resources. The independent clocking mode is used when the bridge
requires asynchronous and independent clocks for the native and AXI4-Stream sides of the
bridge.
The video input clock corresponds to the video line standard used on the input. It is part of
the video line standard and is used by both the Video In to AXI4-Stream core and by the
corresponding Video Timing Controller core that is used to detect video timing.
The AXI4-Stream clock (aclk) is part of the AXI4-Stream bus. To minimize buffering
requirements, this clock should be of equal or higher frequency than the video input clock.
This clock can be slower than the video input clock, in which case, additional buffering is
required to store pixels so that lines can be input at the burst rate of the video clock. This
is discussed in the Buffer Requirements section. At a minimum, the aclk frequency must be
higher than the average pixel rate.
Resets
When the core is in common clock mode, there is only a single reset input port aresetn
that is used to reset both the AXI4-Stream output and Video input sides of the bridge. In
independent clock mode, an additional reset port vid_io_in_reset is used to reset the
Video output side of the bridge. To reset the entire core in independent clock mode, both
resets much be asserted. In independent clock mode, both resets are OR'ed together and
synchronized for the purpose of resetting the FIFO; therefore, asserting either reset causes
the FIFO to be flushed. Resets must be synchronous to their respective clock domains. The
bridge requires that resets be externally synchronized to the destination clock domain as
necessary to avoid metastability. When asserted, the reset should be held for at least two
clock periods of the lowest frequency clock.
System Considerations
Buffer Requirements
The FIFO depth is selectable via the GUI when the core is generated. The buffering
requirement for the asynchronous FIFO depends mainly on the relative frequency of the
AXI4-Stream clock (aclk) to the video clock (vid_io_in_clk) frequency, and the line
standard used.
If the frequency of the AXI4-Stream clock (Faclk) is equal to or greater than the frequency
of the Video input pixel clock (Fvclk), only the minimum buffer size (32 locations) is
required. This assumes that the cores connected downstream of the Video In to
AXI4-Stream core can sink data at the full video rate. For example, the downstream core can
accept data in a virtually continuous stream with gaps occurring only following EOL, and
each line consecutively with line gaps only preceding SOF. In this scenario, the FIFO empties
after the EOL on each line.
If Faclk is less than Fvclk, additional buffering may be required. The FIFO must store
enough pixels to supply them continuously throughout the active line. Due to phasing
requirements, the horizontal active period on the output could overlap the effective
blanking period of pixels coming in from the AXI4-Stream bus. This means that the input
FIFO must also be large enough to provide output pixels continuously during this time.
For AXI4-Stream clock frequencies above the line average but below that of the video input
pixel clock, the minimum FIFO initial fill level must be:
If the downstream processing core accepts data at a lower rate than the AXI4-Stream clock,
Additional buffering is required in an amount sufficient to prevent the FIFO from
overflowing during the course of a frame.
Interlaced Operation
To support standard definition video input such as PAL and NTSC, the Video In to
AXI4-Stream core supports interlace on the video (with timing) side, the video input has a
vid_field_id bit as part of its interface and embedded vertical blanks and horizontal
blanks. The VTC has a corresponding vid_field_id pin defined for this purpose.
Figure 3-2 shows the interfaces on Video In to AXI4-Stream, AXI4-Stream to Video Out, and
VTC cores to support the video field ID with the interlace-related signals highlighted in red.
X-Ref Target - Figure 3-2
(detector) (generator)
X13200-121119
Most video processing cores are field-agnostic, and not aware of whether the picture being
processed is an odd or even frame, or a progressive field. Therefore, interlace has no impact
on these cores. The Video In to AXI4-Stream core has a frame ID output, fid, timed to the
AXI4-Stream bus. This signal can be used as needed in the system. Some cores that use this
fid bit are the AXI4-Stream to Video Out, VDMA, and Video Deinterlacer cores.
The AXI4-Stream to Video Out core has a field ID input, fid, sampled in time with the
AXI4-Stream input bus. This fid bit must be asserted by the upstream source of
AXI4-Stream video. For systems without a frame buffer or de-interlacing, the field ID input
originates from the Video In core, as shown in Figure 3-3.
Video Processing
Video Processing
Frame Buffer
Data in Data in
Core(s)
Core(s)
Active video Active video
vblank vblank
hblank hblank
vsync vsync
hsync
field ID hsync
field_id field_id
fid fid
Video Timing
Controller
(detector) (generator)
X13201-121119
For systems with a frame buffer, the field ID input can come from any core containing a
frame buffer. The field ID from the Video In to AXI4-Stream core can be used by the frame
buffer if necessary, shown in Figure 3-3.
Note: In Figure 3-3, the AXI4-Stream to Video Out core is operating in slave mode.
A deinterlacer can be used after the Video In to AXI4-Stream core to convert the video
format from interlaced to progressive. In this case, the deinterlacer uses the field ID bit,
fid, from the Video In to AXI4-Stream core, as shown in Figure 3-4.
Video In to AXI4-Stream
Video Input
Active video
vblank
hblank
vsync fid
hsync
field_id
(detector)
X13202-121119
On the Video In to AXI4-Stream core, the fid bit changes coincident with SOF and remains
constant throughout the remainder of the field. On the AXI4-Stream to Video Out core, the
fid bit is sampled coincident with SOF in Figure 3-5. Therefore, the Video In to
AXI4-Stream can provide the field bit directly to the AXI4-Stream to Video Out core if no
intervening frame buffer exists. When a deinterlacer or frame buffer is used, a similar
scheme can be employed: generate the field ID coincident with the start of the field, and on
the receiving side sample the field ID coincident with the first received pixel.
X-Ref Target - Figure 3-5
X13203
Module Descriptions
Figure 1-1 shows a block diagram of the Video In to AXI4-Stream core. The video
connections are on the left, and the AXI4-Stream interface is on the right. There are two
main blocks, the data formatter and the stream coupler. The stream coupler contains an
Asynchronous FIFO.
Data Formatter
The data formatter derives the EOL and SOF flags required to transmit AXI4-Stream Video
protocol. It also controls writing of the FIFO in the stream coupler. The flags are generated
by looking at the edges of the data valid (vid_active_video) signal. Since only active pixels
are carried on AXI4-Stream, the FIFO is only written when active pixels are present. There
are input registers on all inputs to minimize input loading. The EOL flag is timed to be
coincident with the last pixel before the falling edge of DE. Video data is delayed so that the
falling edge of DE can be detected, and the EOL flag asserted coincident with the proper
pixel as it is written to the FIFO. Similarly, the SOF flag is created based on the rising edge
of DE, however it additionally requires knowledge of the vertical timing to identify the first
line. This is done using the logical or OR vsync and vblank. The falling edge of either of
these indicates that the input video is in the vertical blanking period. This enables SOF
generation, and the SOF flag is asserted at the next rising edge of DE; the first valid pixel of
the field.
The rising edge of DE also resets the vertical blanking flip-flop. Figure 3-6 shows the timing
of outputs and internal signals relative to the inputs. The de_1 and de_2 signals are
delayed versions of de. The outputs are highlighted in bold.
X-Ref Target - Figure 3-6
video clock
video data in P0 P1 P2 Pn-2 Pn-1
de
de_1
de_2
de_rising
vert_blank
sof
de_falling
eol
Stream Coupler
The Stream Coupler block consists mainly of an asynchronous FIFO and write logic for the
input side of the FIFO. The Output Synchronizer controls the reading of the FIFO. The FIFO
serves two primary purposes:
The buffering requirements depend on the ratio of the AXI4-Stream clock rate to the video
clock rate, as described in Buffer Requirements. The Stream Coupler also contains logic to
ensure that the first AXI4-Stream transaction following a reset is the first pixel of the frame.
Specifically, after a reset or loss of lock, AXI4-Stream tdata_valid is not asserted until the
axis_enable input is active and an SOF is also present.
Read Logic
The read logic controls the handshake for the AXI4-Stream bus and provides pixels to this
bus as rapidly as possible. In general, the strategy for AXI4-Stream is downstream-greedy.
That is, downstream modules take pixels as soon as they are available and there is buffer
space to accommodate them. Since the Video In to AXI4-Stream core is at the front of the
pipeline, it strives to empty its FIFO as fast as possible.
The Read Logic controls the tvalid handshaking signal based on the level and flags from
the FIFO, and the tready signal returned from the downstream module. Whenever data is
available in the FIFO, tvalid is asserted. When tready is returned active, the FIFO is read
and the new pixel is again denoted by the tvalid being active. Thus, the tvalid is
asserted except when there is no valid data available from the FIFO. The FIFO will only begin
filling if the downstream core cannot accept data as fast as it is coming in from the video
bus. This will happen, for example, if the AXI4-Stream clock, aclk, is slower than the video
clock. In this case, during the active portion of each line, pixels will be coming into the FIFO
faster than they can be sent out on the AXI4-Stream bus. Thus the FIFO will begin to fill.
Usually the FIFO will empty at the end of the active line when the downstream core is still
taking pixels, but the incoming video data is in the horizontal blanking period.
• Vivado Design Suite User Guide: Designing IP Subsystems using IP Integrator (UG994)
[Ref 14]
• Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 8]
• Vivado Design Suite User Guide: Getting Started (UG910) [Ref 12]
• Vivado Design Suite User Guide: Logic Simulation (UG900) [Ref 10]
You can customize the IP for use in your design by specifying values for the various
parameters associated with the IP core using the following steps:
For details, see the sections, “Working with IP” and “Customizing IP for the Design” in the
Vivado Design Suite User Guide: Designing with IP (UG896) [Ref 8] and the “Working with the
Vivado IDE” section in the Vivado Design Suite User Guide: Getting Started (UG910) [Ref 12].
If you are customizing and generating the core in the Vivado IP Integrator, see the Vivado
Design Suite User Guide: Designing IP Subsystems Using IP Integrator (UG994) [Ref 14] for
detailed information. IP Integrator might auto-compute certain configuration values when
validating or generating the design. To check whether the values do change, see the
description of the parameter in this chapter. To view the parameter value you can run the
validate_bd_design command in the Tcl console.
Note: Figures in this chapter are illustrations of the Vivado IDE. This layout might vary from the
current version.
The GUI displays a representation of the IP symbol on the left side, and the parameter
assignments on the right side, which are described as follows:
• Component Name: The component name is used as the base name of output files
generated for the module. Names must begin with a letter and must be composed of
characters: a to z, 0 to 9 and “_”.
• Pixels Per Clock: Specifies the number of pixels to be output in parallel. This
parameter affects the data bus width of the input and output. The options for pixels per
clock are 1, 2, or 4.
• Input Component Width: Specifies the video component bit width over the input
video data bus.
• Output Component Width: Specifies the video component bit width over the output
AXI4-Stream TDATA bus.
• Clock Mode: The clock mode is used to specify whether the AXI4-Stream output and
Video input signals are clocked using common or independent clocks.
• Video Format: Specifies the video format used. The video formats are specified in the
Video IP: AXI Feature Adoption section of the Vivado AXI Reference Guide (UG1037)
[Ref 5]. The format selected determines the number of components used. The number
of components (1-4) is multiplied by pixels per clock and the component width to
determine the width of the video data bus, v_data. In turn, this width is rounded up to
the nearest factor of 8 to determine the width of the AXI4-Stream data bus,
m_axis_video_tdata. For example, if the component width is 14, pixels per clock is
2, and the Video Format is RGB (3 components), the vid_data is 84 bits wide and
m_axis_video_tdata is 88 bits. When using IP Integrator, this parameter is
automatically computed based on the Video Format of the video IP core connected to
the slave AXI-Stream video interface.
• FIFO Depth: Specifies the number of locations in the input FIFO. The options for FIFO
depth are 32, 1024, 2048, 4096, and 8192.
Output Generation
For details, see “Generating IP Output Products” in the Vivado Design Suite User Guide:
Designing with IP (UG896) [Ref 8].
Clock Frequencies
The pixel clock frequency is the required frequency for this core. See Maximum Frequencies
in Chapter 2.
Clock Management
There are two clock domains for this core. The clock crossing boundary is handled by the
FIFO and a handshake system for passing pointers between domains.
Clock Placement
There are no specific Clock placement requirements for this core.
Banking
There are no specific Banking rules for this core.
Transceiver Placement
There are no Transceiver Placement requirements for this core.
Simulation
This chapter contains information about simulating IP in the Vivado® Design Suite
environment. For comprehensive information about Vivado simulation components, as well
as information about using supported third party tools, see the Vivado Design Suite User
Guide: Logic Simulation (UG900) [Ref 10].
IMPORTANT: For cores targeting 7 series or Zynq-7000 devices, UNIFAST libraries are not supported.
Xilinx IP is tested and qualified with UNISIM libraries only.
Example Design
This chapter contains information about the provided example design in the Vivado®
Design Suite environment. The Video In to AXI4-Stream core is used in several reference
designs and application notes. For detailed examples of how to use this core, refer to the
following:
• Creating a Video Design From Scratch Tutorial from Avnet Electronics Reference Design
[Ref 2]
• Designing High-Performance Video Systems in 7 Series FPGAs with the AXI Interconnect
(XAPP741) [Ref 4]
Test Bench
This chapter contains information about the provided test bench in the Vivado® Design
Suite environment.
• tb_<IP_instance_name>.v
• tb_<IP_instance_name>
• timing_gen
• test_vid_in
• axis_emulation
The top-level entity test bench module instantiates the following modules:
• DUT
• timing_gen
The timing generator module generates video timing based on the parameters specified
by the test program. It also generates the video data that is input to the DUT.
• test_vid_in
The test program. This program controls the operation of the test bench
• axis_emulation
The AXI4-Stream slave emulator simulates the AXI4-Stream slave interface driven out by
the DUT. It generates handshaking, and receives data from the core. It also generates
expected values and compares them to incoming video data.
Simulation
A test bench incorporating randomization of timing parameters was used to test the Video
In to AXI4-Stream core. Testing included testing with multiple frames of data with many
different timing parameters and frame sizes.
In addition to stand alone simulation, simulation was done on a pass-through video system
consisting of the Video to AXI4-Stream Core core in a system with the AXI4-Stream to Video
Out core and the VTC.
Hardware Testing
The Video In to AXI4-Stream core has been validated in hardware using a complete pass
through design with an external HDMI video source as an input, and an HDMI video display
to verify the output. Re-initialization and re-synchronization was tested by removing and
re-applying the video source multiple times.
Interoperability
The AXI4-Stream output interface is compatible with any video processing block that
implements the Video Over AXI4-Stream protocol.
The video input is compatible with digital video PHYs such as DVI that provide data in the
format provided: Component video data, syncs, blanks, and data valid. With the addition of
additional sync deembed logic external to the core, it can also interface with many other
digital standards such as HDMI and SDI.
Upgrading
This appendix contains information about migrating from an ISE design to the Vivado
Design Suite, and for upgrading to a more recent version of the IP core. For customers
upgrading their IP core, important details (where applicable) about any port changes and
other impact to user logic are included.
Version 4.0 supports IP upgrade from version 3.0. It has the following changes from version
3.0:
Parameter Changes
The Clock Mode parameter has been added to allow for common or independent clocks.
The default clock mode is set to independent.
The Video Component Width parameter has been replaced by Input Video Component
Width and Output Video Component Width parameters to allow for component width
conversion.
Port Changes
Removed the following ports:
• rst
• wr_error
• empty
• vid_io_in_reset
• overflow
• underflow
Debugging
This appendix includes details about resources available on the Xilinx Support website and
debugging tools.
Documentation
This product guide is the main document associated with the Video In to AXI4-Stream. This
guide, along with documentation related to all products that aid in the design process, can
be found on the Xilinx Support web page or by using the Xilinx Documentation Navigator.
Download the Xilinx Documentation Navigator from the Downloads page. For more
information about this tool and the features available, open the online help after
installation.
Answer Records
Answer Records include information about commonly encountered problems, helpful
information on how to resolve these problems, and any known issues with a Xilinx product.
Answer Records are created and maintained daily ensuring that users have access to the
most accurate information available.
Answer Records for this core are listed below, and can also be located by using the Search
Support box on the main Xilinx support web page. To maximize your search results, use
proper keywords such as
• Product name
• Tool message(s)
• Summary of the issue encountered
A filter search is available after results are returned to further target the results.
AR 54538
Technical Support
Xilinx provides technical support in the Xilinx Support web page for this LogiCORE™ IP
product when used as described in the product documentation. Xilinx cannot guarantee
timing, functionality, or support if you do any of the following:
• Implement the solution in devices that are not defined in the documentation.
• Customize the solution beyond that allowed in the product documentation.
• Change any section of the design labeled DO NOT MODIFY.
Debug Tools
There are many tools available to address Video In to AXI4-Stream design issues. It is
important to know which tools are useful for debugging various situations.
Example Design
The Video In to AXI4-Stream core is used in several reference designs and application
notes. Information about the example designs can be found in Chapter 6, Example Design.
The Vivado logic analyzer is used to interact with the logic debug IP cores, including:
Hardware Debug
Hardware issues can range from link bring-up to problems seen after hours of testing. This
section provides debug steps for common issues. The Vivado debug feature is a valuable
resource to use in hardware debug. The signal names mentioned in the following individual
sections can be probed using the Vivado Lab Tools for debugging the specific problems.
General Checks
Ensure that all the timing constraints for the core were properly incorporated from the
example design and that all constraints were met during implementation.
• Does it work in post-place and route timing simulation? If problems are seen in
hardware but not in timing simulation, this could indicate a PCB issue. Ensure that all
clock sources are active and clean.
• If using MMCMs in the design, ensure that all MMCMs have obtained lock by
monitoring the LOCKED port.
• If your outputs go to 0, check your licensing.
Interface Debug
AXI4-Stream Interfaces
Table C-1 describes how to troubleshoot the AXI4-Stream interface.
Other Interfaces
Table C-2 describes how to troubleshoot third-party interfaces.
Xilinx Resources
For support resources such as Answers, Documentation, Downloads, and Forums, see Xilinx
Support.
• From the Vivado IDE, select Help > Documentation and Tutorials.
• On Windows, select Start > All Programs > Xilinx Design Tools > DocNav.
• At the Linux command prompt, enter docnav.
Xilinx Design Hubs provide links to documentation organized by design tasks and other
topics, which you can use to learn key concepts and address frequently asked questions. To
access the Design Hubs:
• In the Xilinx Documentation Navigator, click the Design Hubs View tab.
• On the Xilinx website, see the Design Hubs page.
For more information on Documentation Navigator, see the Documentation Navigator page
on the Xilinx website.
References
These documents provide supplemental material useful with this user guide:
Revision History
The following table shows the revision history for this document.