User guide

Table Of Contents
A–14 Appendix A: Avalon-ST Video Verification IP Suite
Video File Reader Test
Video and Image Processing Suite January 2013 Altera Corporation
User Guide
tb_test.sv—Section 3
Example A–3 shows the third section of the code.
In this code, after reset has gone high, the video source and sink BFM objects are
constructed with the previously declared mailboxes. Then, some method calls are
made to configure the transport mechanism, name the objects (for reporting
purposes), and set some attributes regarding readiness and probability of long delays.
Example A–3. tb_test.sv (Section 3)
initial
begin
wait (resetn == 1'b1)
repeat (4) @ (posedge (clk));
// Constructors associate the mailboxes with the source and sink classes
`SOURCE = new(m_video_items_for_src_bfm);
`SINK = new(m_video_items_for_sink_bfm);
`SOURCE.set_pixel_transport(`TRANSPORT);
`SINK.set_pixel_transport(`TRANSPORT);
`SOURCE.set_name(`SOURCE_STR);
`SINK.set_name( `SINK_STR);
`SOURCE.set_readiness_probability(90);
`SINK.set_readiness_probability(90);
`SOURCE.set_long_delay_probability(0.01);
`SINK.set_long_delay_probability(0.01);