Добавил:
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_user_packet

A-27

2015.01.23

 

 

c_av_st_video_user_packet

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-16: Method Calls for c_av_st_video_user_packet Class

Method Call

 

Description

 

 

 

function new();

 

Constructor.

 

 

 

function void copy (c_av_st_video_user_packet

 

Copies object c into this object.

c);

 

 

 

 

 

function bit compare (c_av_st_video_user_

 

Compares this instance to object r. Returns 1 if

packet r);

 

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_

 

Returns the next beat of user data.

PIXEL-1:0] pop_data();

 

 

 

 

 

function bit [BITS_PER_CHANNEL*CHANNELS_PER_

 

Returns the next beat of user data without

PIXEL-1:0] query_data(int i);;

 

removing it from the object.

 

 

 

function void push_data(bit [BITS_PER_

 

CHANNEL*CHANNELS_PER_PIXEL-1:0] d);

 

 

 

 

 

Table A-17: Members of c_av_st_video_user_packet Class

 

 

 

 

 

Member

 

Description

 

 

 

rand bit[BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-

 

User data is stored as a queue of words.

1:0]data[$]

 

 

 

 

 

rand bit[3:0] identifier;

 

constraint c2 {identifier inside

 

 

{[4:14]};}

 

 

 

int max_length = 10;

 

constraint c1 {data.size() inside

 

 

{[1:max_length]};}

 

 

 

Avalon-ST Video Verification IP Suite

Altera Corporation

 

 

Send Feedback

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