Video and Image Processing Suite User Guide

ID 683416
Date 4/04/2022
Public
Document Table of Contents

A.3.8. 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 103.  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 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 if otherwise.
function void set_max_length(int l); Minimum and maximum lengths are used for constrained random testing only.
function void set_min_length(int l); Minimum and maximum lengths are used for constrained random testing only.
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[3:0] set_identifier(int i);
function bit [BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-1:0] pop_data(); Returns the next beat of user data.
function bit [BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-1:0] query_data(int i);; Returns the next beat of user data without removing it from the object.
function void push_data(bit [BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-1:0] d);
Table 104.  Members of c_av_st_video_user_packet Class
Member Description
rand bit[BITS_PER_CHANNEL*CHANNELS_PER_PIXEL-1:0]data[$] User data is stored as a queue of words.
rand bit[3:0] identifier; constraint c2 {identifier inside {[1:9]};}
int max_length = 10; constraint c1 { data.size() inside {[min_length:max_length]}; data.size() % pixels_in_parallel == 0; }
int min_length = 5; constraint c1 { data.size() inside {[min_length:max_length]}; data.size() % pixels_in_parallel == 0; }