Code for scoreboards – Altera Video and Image Processing Suite User Manual

Page 285

Advertising
background image

m_video_items_for_scoreboard.put(video_data_pkt2);
end

else if (r>34)
begin
video_control_pkt1.randomize();
m_video_items_for_src_bfm.put(video_control_pkt1);

// Copy and send to scoreboard :
video_control_pkt2 = new();
video_control_pkt2.copy(video_control_pkt1);
m_video_items_for_scoreboard.put(video_control_pkt2);
end

else
begin
user_pkt1.set_max_length(33);
user_pkt1.randomize() ;
m_video_items_for_src_bfm.put(user_pkt1);

// Copy and send to scoreboard :
user_pkt2 = new();
user_pkt2.copy(user_pkt1);
m_video_items_for_scoreboard.put(user_pkt2);
end

// Video items have been sent to the DUT and the scoreboard,
//wait for the analysis :
-> event_constrained_random_generation;
wait(event_dut_output_analyzed);

end

join

This code starts the source and sink, then randomly generates either a video data, control or user packet.

Generation is achieved by simply calling randomize() on the objects previously created at the end of this

code, putting the objects in the source BFM’s mailbox (

m_video_items_for_src_bfm

), making a copy of

the objects, and putting that in a reference mailbox used by the scoreboard

(

m_video_items_for_scoreboard

).

Finally, the code signals to the scoreboard that a video item has been sent and waits for the output of the

DUT to be analyzed, also signalled by an event from the scoreboard.
All that remains now is to create the scoreboard, which retrieves the video item objects from the two

scoreboard mailboxes and compares the ones from the DUT with the reference objects.
Note: The scoreboard expects to see the DUT returning greyscale video data. You must customize the

data to mirror the behavior of individual DUTs exactly.

Code for Scoreboards

c_av_st_video_item ref_pkt;
c_av_st_video_item dut_pkt;

initial
begin

forever
begin

@event_constrained_random_generation

UG-VIPSUITE

2015.05.04

Code for Scoreboards

A-17

Avalon-ST Video Verification IP Suite

Altera Corporation

Send Feedback

Advertising