Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
Video and Image Processing Suite User Guide Avalon st video.pdf
Скачиваний:
81
Добавлен:
11.06.2015
Размер:
2.64 Mб
Скачать

UG-VIPSUITE

 

c_av_st_video_item

A-23

2015.01.23

 

 

 

 

 

 

 

 

 

 

Member

 

Description

 

 

 

 

 

 

 

rand t_packet_control send_garbage_after_

 

 

 

control_packets = off;

 

 

 

 

 

 

 

 

 

 

 

 

rand int early_eop_packet_length = 20;

 

constraint early_eop_length { early_

 

 

 

 

eop_packet_length dist {1:= 10,

 

 

 

 

[2:image_height*image_width-1]:/90};

 

 

 

 

early_eop_packet_length inside

 

 

 

 

{[1:image_height*image_width]}; }

 

 

 

 

 

 

rand int late_eop_packet_length = 20;

 

constraint late_eop_length { late_eop_

 

 

 

packet_length inside {[1:100]}; }

 

 

 

 

 

 

c_av_st_video_item

The declaration for the c_av_st_video_item class:

class c_av_st_video_item;

Table A-10: Method Calls for c_av_st_video_item Class

Method Call

 

 

Description

 

 

 

function new();

 

Constructor

 

 

 

function void copy (c_av_st_video_item c);

 

Sets this.packet_type to match that of c.

 

 

 

 

function void set_packet_type (t_packet_types

 

 

ptype);

 

 

 

 

 

 

 

 

 

function t_packet_typesget_packet_type();

 

 

 

 

 

 

Table A-11: Members of c_av_st_video_item Class

 

 

 

 

 

 

 

Member

 

 

Description

 

 

 

t_packet_types packet_type;

 

Packet_type must be one of the following:

 

 

video_packet

 

 

control_packet

 

 

user_packet

 

 

generic_packet

 

 

undefined

 

 

 

 

c_av_st_video_source_sink_base

The declaration for the c_av_st_video_source_sink_base class:

class c_av_st_video_source_sink_base;

Avalon-ST Video Verification IP Suite

Altera Corporation

 

 

Send Feedback

A-24

c_av_st_video_source_sink_base

 

UG-VIPSUITE

2015.01.23

 

 

 

 

Table A-12: Method Calls for c_av_st_video_source_sink_base Class

 

 

 

 

 

 

 

 

Method Call

 

Description

 

 

 

 

 

 

 

 

 

function new(mailbox #(c_av_st_video_item)m_

 

Constructor. The video source and sink classes

 

 

vid);

 

transfer video objects through their mailboxes.

 

 

 

 

 

 

 

 

function void set_readiness_probability(int

 

 

 

percentage);

 

 

 

 

 

 

 

 

 

 

 

function int get_readiness_probability();

 

 

 

 

 

 

 

 

 

function void set_long_delay_probability(real

 

 

 

percentage);

 

 

 

 

 

 

 

 

 

 

 

function real get_long_delay_probability();

 

 

 

 

 

 

 

 

 

function void set_long_delay_duration_min_

 

 

 

beats(int percentage);

 

 

 

 

 

 

 

 

 

 

 

function int get_long_delay_duration_min_

 

 

 

beats();

 

 

 

 

 

 

 

 

 

 

 

function void set_long_delay_duration_max_

 

 

 

beats(int percentage);

 

 

 

 

 

 

 

 

 

 

 

function int get_long_delay_duration_max_

 

 

 

beats();

 

 

 

 

 

 

 

 

 

 

 

function void set_pixel_transport(t_pixel_

 

 

 

format in_parallel);

 

 

 

 

 

 

 

 

 

 

 

function t_pixel_format get_pixel_transport();

 

 

 

 

 

 

 

 

 

function void set_name(string s);

 

 

 

 

 

 

 

 

 

function string get_name();

 

 

 

 

 

 

 

Table A-13: Members of c_av_st_video_source_sink_base Class

 

 

 

 

 

 

 

Member

 

Description

 

 

 

 

 

 

 

 

 

mailbox # (c_av_st_video_item) m_video_items=

 

The Avalon-ST video standard allows you to

 

 

new(0);

 

send symbols in serial or parallel format. You

 

 

 

 

can set this control to either format.

 

 

 

 

 

 

 

 

t_pixel_format pixel_transport = parallel;

 

 

 

 

 

 

 

 

 

string name = "undefined";

 

 

 

 

 

 

 

 

 

int video_packets_sent = 0;

 

 

 

 

 

 

 

 

 

int control_packets_sent = 0;

 

 

 

 

 

 

 

 

 

int user_packets_sent = 0;

 

 

 

 

 

 

 

Altera Corporation

Avalon-ST Video Verification IP Suite

 

 

Send Feedback

UG-VIPSUITE

 

c_av_st_video_sink_bfm_’SINK

A-25

2015.01.23

 

 

 

 

 

 

 

 

 

 

Member

 

Description

 

 

 

 

 

 

int readiness_probability = 80;

 

Determines the probability of when a sink or

 

 

 

source is ready to receive or send data in any

 

 

 

 

given clock cycle, as manifested on the bus by

 

 

 

the READY and VALID signals, respectively.

 

 

 

 

 

 

 

real long_delay_probability = 0.01;

 

• The readiness_probability control

 

 

 

 

provides a steady state readiness condition.

 

 

 

• The long_delay_probability allows for

 

 

 

the possibility of a much rarer and longer

 

 

 

 

period of unreadiness, of durations of the

 

 

 

 

order of the raster line period or even field

 

 

 

period.

 

 

 

 

 

 

 

rand int long_delay_duration_min_beats= 100;

 

This control sets the minimum duration (as

 

 

 

 

measured in data beats of) a long delay.

 

 

 

 

Note: If pixel_transport = parallel than

 

 

 

 

one data beats = one pixel = one

 

 

 

 

clock cycle.

 

 

 

 

 

 

 

rand int long_delay_duration_max_beats = 1000;

 

This control sets the maximum duration (as

 

 

 

 

measured in data beats) of a long delay.

 

 

 

 

 

 

 

rand int long_delay_duration = 80;

 

constraint c1 {long_delay_duration

 

 

 

 

inside [long_delay_duration_min_beats:

 

 

 

long_delay_duration_max_beats]};}

 

 

 

 

 

 

c_av_st_video_sink_bfm_’SINK

The declaration for the c_av_st_video_sink_bfm_’SINK class:

‘define CLASSNAME c_av_st_video_sink_bfm_’SINK;

class ‘CLASSNAME extends c_av_st_video_source_sink_base;

Table A-14: Method Calls for c_av_st_video_sink_bfm_’SINK Class

This class does not have additional members to those of the base class.

Method Call

 

Description

 

 

 

function new(mailbox#(c_av_st_video_item)m_

 

Constructor.

vid);

 

 

 

 

 

task start;

 

The start method simply waits until the reset

 

 

of the Avalon-ST sink BFM goes inactive, then

 

 

calls the receive_video()task.

 

 

 

Avalon-ST Video Verification IP Suite

Altera Corporation

 

 

Send Feedback

A-26

c_av_st_video_source_bfm_’SOURCE

UG-VIPSUITE

2015.01.23

 

 

Method Call

 

Description

 

 

 

task receive_video;

 

The receive_video task continually drives

 

 

the Avalon-ST sink BFM’s ready signal in

 

 

accordance with the probability settings in the

 

 

base class. It also continually captures signal_

 

 

received_transaction events from the

 

 

Avalon-ST sink BFM and uses the Avalon-ST

 

 

sink BFM API to read bus data.

 

 

Bus data is decoded according to the Avalon-

 

 

ST video specification and data is packed into

 

 

an object of the appropriate type (video,

 

 

control or, user). The object is then put into

 

 

the mailbox.

 

 

 

c_av_st_video_source_bfm_’SOURCE

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-15: Method Calls for c_av_st_video_source_bfm_’SOURCE Class

This class does not have additional members to those of the base class.

Method Call

 

Description

 

 

 

function new(mailbox#(c_av_st_video_item)m_

 

Constructor.

vid)

 

 

 

 

 

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.

 

 

 

Altera Corporation

Avalon-ST Video Verification IP Suite

 

 

Send Feedback

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]