User guide
Table Of Contents
- Contents
- 1. About This MegaCore Function Suite
- Release Information
- Device Family Support
- Features
- Design Example
- Performance and Resource Utilization
- 2D FIR Filter
- 2D Median Filter
- Alpha Blending Mixer
- Avalon-ST Video Monitor
- Chroma Resampler
- Clipper
- Clocked Video Input
- Clocked Video Output
- Color Plane Sequencer
- Color Space Converter
- Control Synchronizer
- Deinterlacer
- Deinterlacer II
- Frame Buffer
- Gamma Corrector
- Interlacer
- Scaler
- Scaler II
- Switch
- Test Pattern Generator
- Trace System
- 2. Getting Started with Altera IP Cores
- 3. Interfaces
- Interface Types
- Avalon-ST Video Protocol
- Avalon-MM Slave Interfaces
- Avalon-MM Master Interfaces
- Buffering of Non-Image Data Packets in Memory
- 4. 2D FIR Filter MegaCore Function
- 5. 2D Median Filter MegaCore Function
- 6. Alpha Blending MegaCore Function
- 7. Avalon-ST Video Monitor MegaCore Function
- 8. Chroma Resampler MegaCore Function
- 9. Clipper MegaCore Function
- 10. Clocked Video Input MegaCore Function
- 11. Clocked Video Output MegaCore Function
- 12. Color Plane Sequencer MegaCore Function
- 13. Color Space Converter MegaCore Function
- 14. Control Synchronizer MegaCore Function
- 15. Deinterlacer MegaCore Function
- Core Overview
- Functional Description
- Parameter Settings
- Signals
- Control Register Maps
- 16. Deinterlacer II MegaCore Function
- 17. Frame Reader MegaCore Function
- 18. Frame Buffer MegaCore Function
- 19. Gamma Corrector MegaCore Function
- 20. Interlacer MegaCore Function
- 21. Scaler MegaCore Function
- 22. Scaler II MegaCore Function
- 23. Switch MegaCore Function
- 24. Test Pattern Generator MegaCore Function
- 25. Trace System MegaCore Function
- A. Avalon-ST Video Verification IP Suite
- B. Choosing the Correct Deinterlacer
- Additional Information

Appendix A: Avalon-ST Video Verification IP Suite A–21
Constrained Random Test
January 2013 Altera Corporation Video and Image Processing Suite
User Guide
Example A–6 shows the codes for the scoreboards.
Example A–6. Scoreboard
c_av_st_video_item ref_pkt;
c_av_st_video_item dut_pkt;
initial
begin
forever
begin
@event_constrained_random_generation
begin
// Get the reference item from the scoreboard mailbox :
m_video_items_for_scoreboard.get(ref_pkt);
// If the reference item is a video packet, then check
// for the control & video packet response :
if (ref_pkt.get_packet_type() == video_packet)
begin
m_video_items_for_sink_bfm.get(dut_pkt);
if (dut_pkt.get_packet_type() != control_packet)
$fatal(1,"SCOREBOARD ERROR”);
m_video_items_for_sink_bfm.get(dut_pkt);
if (dut_pkt.get_packet_type() != video_packet)
$fatal(1, "SCOREBOARD ERROR”);
// A video packet has been received, as expected.
// Now compare the video data itself :
dut_video_pkt = c_av_st_video_data'(dut_pkt);
if (dut_video_pkt.compare (to_grey(c_av_st_video_data'(ref_pkt))))
$display("%t Scoreboard match”);
else
$fatal(1, "SCOREBOARD ERROR : Incorrect video packet.\n");
end
-> event_dut_output_analyzed;
end
end
end
initial
#1000000 $finish;