User guide

Table Of Contents
A–32 Appendix A: Avalon-ST Video Verification IP Suite
Complete Class Reference
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
c_av_st_video_source_bfm_’SOURCE
The following is the declaration for the c_av_st_video_source_bfm_’SOURCE class:
‘define CLASSNAME c_av_st_video_source_bfm_’SOURCE
class ‘CLASSNAME extends c_av_st_video_source_sink_base;
Table A–14 lists the method calls for the c_av_st_video_source_bfm_’SOURCE class.
1 This class has no additional members to those of the base class.
c_av_st_video_user_packet
The following is the declaration for the c_av_st_video_user_packet class:
class c_av_st_video_user_packet#(parameters BITS_PER_CHANNEL=8,
CHANNELS_PER_PIXEL=3) extends c_av_st_video_item;
Table A–15 lists the method calls for the c_av_st_video_user_packet class.
Table A–14. Method Calls for the c_av_st_video_source_bfm_’SOURCE Class
Method Call Description
function
new(mailbox#(c_av_st_video_item)m_vid);
Constructor.
task start;
The start method simply waits until the reset of the
Avalon-ST source BFM goes inactive, then continually calls
the
send_video()
task.
task send_video;
The
send_video()
task waits until a video item is put into
the mailbox, then it drives the Avalon-ST sink BFM's API
accordingly. The
set_transaction_idles()
call is used
to set the valid signal in accordance with the probability
settings in the base class. The mailbox object is categorized
according to object type. Each object is presented to the bus
according to the Avalon-ST Video specification and the
setting of the
pixel_transport
control.
Table A–15. Method Calls for the c_av_st_video_user_packet Class (Part 1 of 2)
Method Call Description
function new();
Constructor.
function void copy (c_av_st_video_user_packet c);
Copies object c into this object.
function bit compare (c_av_st_video_user_packet r);
Compares this instance to object r. Returns 1 if
identical, 0 for otherwise.
function void set_max_length(int l);
For constrained random generation, this method is
used to apply a maximum length to the user packets.
function int get_length();
function bit[3:0] get_identifier();
The identifier is the Avalon-ST video packet identifier.
0x0 indicates video, 0xf indicates a control packet and
the user packets take random values from 0x4 to 0xe.
function bit [BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-
1:0] pop_data();
Returns the next beat of user data.