Altera Video and Image Processing Suite User Manual
Page 274

Class
Description
class c_av_st_video_source_bfm_
’SOURCE
Extends c_av_st_video_source_sink_base.
Named according to the instance names of the Avalon-ST source
and sink BFMs in the SystemVerilog netlist. This is because you
must access the API functions in the Avalon-ST BFMs by directly
calling them through the design hierarchy. Therefore, this
hierarchy information is required in the Avalon-ST video source
and sink classes. This means that a unique class with the correct
design hierarchy information for target source or sink is required
for every object created of that class type.
To overcome this limitation, create the source and sink class files
(av_st_video_bfm_class.sv and av_st_video_sink_bfm_class.sv)
which are designed to be ‘included into the test environment with
‘defines set to point to the correct hierarchy.
The source class comprises of a simple
start()
task and a
send_
video
task (called by the start task). The
send_video
task
continually polls its mailbox. When a
video_item
arrives, the
video_item
is assembled into a set of transactions according to its
type and the transport mechanism specified. Then, the
video_
item
is sent to the Avalon-ST BFM.
One Avalon-ST BFM transaction is considered as one beat on the
Avalon-ST bus, comprised of the logic levels on the
SOP
,
EOP
,
READY
,
VALID
signals, as well as the data on the bus in a given
clock cycle. For example, a video packet is sent to the BFM
preceded by a 0x0 on the LSB of the first transaction, as per the
Avalon-ST video protocol. A control packet is preceded by a 0xf
on the LSB. Then, the height, width and interlacing fields are sent
in subsequent transaction in accordance to the Avalon-ST Video
protocol.
The class c_av_st_video_source_bfm_`SOURCE requires you to
create an object from it and to call the
start()
task as it automati‐
cally handles any
video_item
sent to its mailbox. No other
interaction is required.
class c_av_st_video_sink_bfm_’SINK Operates in the same way as the source class, except it contains a
receive_video()
task and performs the opposite function to the
source.
This class receives incoming transactions from the Avalon-ST sink
BFM, decoding their type, assembling them into the relevant
objects (control, video, or user packets), and pushing them out of
its mailbox. No further interaction is required from the user.
A-6
Avalon-ST Video Class Library
UG-VIPSUITE
2015.05.04
Altera Corporation
Avalon-ST Video Verification IP Suite