Visible to Intel only — GUID: bhc1411020530895
Ixiasoft
1. About the Video and Image Processing Suite
2. Avalon Streaming Video
3. Clocked Video
4. VIP Run-Time Control
5. Getting Started
6. VIP Connectivity Interfacing
7. Clocked Video Interface IPs
8. 2D FIR II IP Core
9. Mixer II IP Core
10. Clipper II IP Core
11. Color Plane Sequencer II IP Core
12. Color Space Converter II IP Core
13. Chroma Resampler II IP Core
14. Control Synchronizer IP Core
15. Deinterlacer II IP Core
16. Frame Buffer II IP Core
17. Gamma Corrector II IP Core
18. Configurable Guard Bands IP Core
19. Interlacer II IP Core
20. Scaler II IP Core
21. Switch II IP Core
22. Test Pattern Generator II IP Core
23. Trace System IP Core
24. Warp Lite Intel FPGA IP
25. Avalon-ST Video Stream Cleaner IP Core
26. Avalon-ST Video Monitor IP Core
27. VIP IP Core Software Control
28. Security Considerations
29. Video and Image Processing Suite User Guide Archives
30. Document Revision History for the Video and Image Processing Suite User Guide
A. Avalon-ST Video Verification IP Suite
7.1. Supported Features for Clocked Video Output II IP
7.2. Control Port
7.3. Clocked Video Input IP Format Detection
7.4. Clocked Video Output IP Video Modes
7.5. Clocked Video Output II Latency Mode
7.6. Generator Lock
7.7. Underflow and Overflow
7.8. Timing Constraints
7.9. Handling Ancillary Packets
7.10. Modules for Clocked Video Input II IP Core
7.11. Clocked Video Input II Signals, Parameters, and Registers
7.12. Clocked Video Output II Signals, Parameters, and Registers
15.1. Deinterlacing Algorithm Options
15.2. Deinterlacing Algorithms
15.3. Run-time Control
15.4. Pass-Through Mode for Progressive Frames
15.5. Cadence Detection (Motion Adaptive Deinterlacing Only)
15.6. Avalon-MM Interface to Memory
15.7. Motion Adaptive Mode Bandwidth Requirements
15.8. Avalon-ST Video Support
15.9. 4K Video Passthrough Support
15.10. Behavior When Unexpected Fields are Received
15.11. Handling of Avalon-ST Video Control Packets
15.12. Deinterlacer II Parameter Settings
15.13. Deinterlacing Control Registers
A.3.1. c_av_st_video_control
A.3.2. c_av_st_video_data
A.3.3. c_av_st_video_file_io
A.3.4. c_av_st_video_item
A.3.5. c_av_st_video_source_sink_base
A.3.6. c_av_st_video_sink_bfm_’SINK
A.3.7. c_av_st_video_source_bfm_’SOURCE
A.3.8. c_av_st_video_user_packet
A.3.9. c_pixel
A.3.10. av_mm_transaction
A.3.11. av_mm_master_bfm_`MASTER_NAME
A.3.12. av_mm_slave_bfm_`SLAVE_NAME
A.3.13. av_mm_control_register
A.3.14. av_mm_control_base
Visible to Intel only — GUID: bhc1411020530895
Ixiasoft
A.3.3. c_av_st_video_file_io
The declaration for the c_av_st_video_file_io class:
class c_av_st_video_file_io#(parameter BITS_PER_CHANNEL = 8, CHANNELS_PER_PIXEL = 3);
Method Call | Description |
---|---|
function void set_send_control_packets(t_packet_controls); | If this method is used to set the send_control_packet control to off, then one control packet is sent at the beginning of video data, but no further control packets are sent. |
function t_packet_control get_send_control_packets(); | — |
function void set_send_user_packets(t_packet_control s); | If the send_user_packets control is off, no user packets at all are sent. Otherwise, user packets are sent before and after any control packets. |
function t_packet_control get_send_user_packets(); | — |
function void set_send_early_eop_packets(t_packet_control s); | If the send_eop_packets control is off, all packets are of the correct length (or longer). Otherwise, early EOP are sent of a length determined by the constraints on early_eop_packet_length. |
function t_packet_control get_send_early_eop_packets(); | — |
function void set_early_eop_probability(int s); | If the send_early_eop_packets control is set to random, the early_eop_probability control determines what proportion of video packets are terminated early. |
function int get_early_eop_probability(); | — |
function void set_send_late_eop_packets(t_packet_controls); | If the send_late_eop_packets control is off, all packets are of the correct length (or longer). Otherwise, late EOP are sent of a length determined by the constraints on late_eop_packet_length. |
function t_packet_control get_send_late_eop_packets(); | — |
function void set_late_eop_probability (int s); | If the send_late_eop_packets control is set to random, the late_eop_probability control determines what proportion of video packets are terminated late. |
function int get_late_eop_probability (); | — |
function void set_user_packet_probability (int s); | If the send_user_packets is set to random, the user_packet_probability control determines the probability that a user packet being sent before a control packet. It also determines the probability that a user packet will be sent after a control packet. |
function int get_user_packet_probability (); | — |
function void set_control_packet_probability(int s); | If the send_control_packets control is set to random, the control_packet_probability control determines the probability of a control packet being sent before a video packet. |
function int get_control_packet_probability(); | — |
function void set_send_garbage_after_control_packets (t_packet_control s); | When the send_control_packet() method puts a control packet into the m_video_item_out mailbox, the append_garbage member of the control packet object is set to the value of send_garbage_after_control_packets. |
function t_packet_control get_send_garbage_after_control_packets(); | — |
function void set_object_name(string s); | You can use object_name to name a given object instance of a class to ensure any reporting that the class generates is labeled with the originating object’s name. |
function string get_object_name(); | — |
function string get_filename(); | This returns the filename associated with the object, by the open_file call. |
function void set_image_height(bit[15:0]height); | — |
function bit[15:0]get_image_height(); | — |
function void set_image_width(bit[15:0] width); | — |
function bit[15:] get_image_width(); | — |
function void set_video_data_type(string s); |
Sets the fourcc[3] code associated with the raw video data. The following are the supported four character code (FOURCC) codes:
|
function string get_video_data_type(); | Returns the FOURCC code (for example, RGB32) being used for the raw video data. |
function int get_video_packets_handled(); | — |
function new(mailbox #(c_av_st_video_item)m_vid_out); | Constructor. The mailbox is used to pass all packets in and out of the file I/O object. |
function void open_file(string fname, t_rwrw); | Files are opened using this method. For example: video_file_reader.open_file(‘’vip_car_0.bin”, read); t_rw is an enumerated type with values read or write. NB. The read fails if there is no associated .spc file, for example, vip_car_o.spc). |
function void close_file(); | For example, video_file_reader.close_file(); |
task read_file(); | Read_file() optionally calls send_user_packet() and send_control_packet(), then calls read_video_packet(). |
task send_control_packet(); | The control packet sent is derived from the image height, width, and interlace fields as provided by open_file(). |
task send_user_packet(); | The user packet sent is always comprised of random data and had a maximum length hard-coded to 33 data items. |
task_generate_spc_file(); | When writing a file, this call creates the necessary associated .spc file. |
task read_video_packet(); | The main file reading method call. Binary data is read from the file and packed into pixel objects according to the settings of ycbr_pixel_order and endianism. Pixel objects are packed into a video data object, with some pixels optionally added or discarded if late/early EOP is being applied. When one complete field of video has been read (as determined by the height and width controls), the video_data object is put in the mailbox. |
task wait_for_and_write_video_packet_to_file(); | When called, this method waits for an object to be put in the mailbox (usually from a sink BFM). When a control or a user packet object arrives, this call is reported and ignored. When a video packet arrives, the video data is written to the open file in little endianism format. |
Member | Description |
---|---|
local int video_packets_handled = 0; |
video_packets_handled is added whenever a packet is read or written to or from the file. |
local int control_packets_handled = 0; | control_packets_handled is added whenever a control packet is put in the object’s mailbox. |
local int user_packets_handled = 0; | user_packets_handled is added whenever a user packet is put in the object's mailbox. |
local reg[15:0] image_height; | — |
local reg[15:0] image_width; | — |
local reg[3:0] image_interlaced; | — |
string image_fourcc; | — |
local string object_name = "file_io"; | — |
local string filename; | — |
local string spc_filename; | — |
local int fourcc_channels_per_pixel; | Set when the associate .spc file is read. |
local int fourcc_bits_per_channel; | Set when the associate .spc file is read. |
local int fourcc_pixels_per_word; | Set when the associate .spc file is read. |
local int fourcc_channel_lsb; | Set when the associate .spc file is read. |
int early_eop_probability = 20; | — |
Int late_eop_probability = 20; | — |
int user_packet_probability = 20; | — |
int control_packet_probability = 20; | — |
mailbox #(c_av_st_video_item) m_video_item_out = new(0); | The mailbox is used to pass all packets in/out of the file i/o object. |
rand t_packet_control send_control_packets = on; | — |
rand t_packet_control send_user_packets = off; | — |
rand t_packet_control send_early_eop_packets = off; | — |
rand t_packet_control send_late_eop_packets = off; | If both send_late_eop_packets and send_early_eop_packets are set to random, a late EOP will only be generated if an early EOP has not been generated. |
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]}; } |