OpenCores
URL https://opencores.org/ocsvn/qaz_libs/qaz_libs/trunk

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [BFM/] [src/] [axis_video_frame/] [s_avf_api.svh] - Diff between revs 45 and 47

Show entire file | Details | Blame | View Log

Rev 45 Rev 47
Line 28... Line 28...
class s_avf_api
class s_avf_api
  extends uvm_sequence #(avf_sequence_item);
  extends uvm_sequence #(avf_sequence_item);
  `uvm_object_utils(s_avf_api)
  `uvm_object_utils(s_avf_api)
 
 
  avf_sequence_item item;
  avf_sequence_item item;
 
 
  // --------------------------------------------------------------------
 
  mailbox #(video_frame_class) frame_buffer;
  mailbox #(video_frame_class) frame_buffer;
  int pixels_per_line;
 
  int lines_per_frame;
 
  int bits_per_pixel;
 
  int bytes_per_pixel;
 
  int pixels_per_clk;
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  function void init( int pixels_per_line
  video_frame_config c_h;
                    , int lines_per_frame
 
                    , int bits_per_pixel
  function void init(video_frame_config c_h);
                    , int pixels_per_clk
    this.c_h = c_h;
                    );
 
    this.pixels_per_line  = pixels_per_line;
 
    this.lines_per_frame  = lines_per_frame;
 
    this.bits_per_pixel   = bits_per_pixel;
 
    this.bytes_per_pixel  = (bits_per_pixel % 8 == 0)
 
                          ? (bits_per_pixel / 8)
 
                          : (bits_per_pixel / 8) + 1;
 
    this.pixels_per_clk   = pixels_per_clk;
 
  endfunction : init
  endfunction : init
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  task automatic put_frame(string pattern, int pixel = 0);
  task automatic put_frame(string pattern, int pixel = 0);
    video_frame_class f_h = new;
    video_frame_class f_h = new;
    f_h.init( pixels_per_line
    f_h.init( c_h.pixels_per_line
            , lines_per_frame
            , c_h.lines_per_frame
            , bits_per_pixel
            , c_h.bits_per_pixel
            , pixels_per_clk
            , c_h.pixels_per_clk
            );
            );
    case(pattern.tolower)
    case(pattern.tolower)
      "constant":   f_h.make_constant(pixel);
      "constant":   f_h.make_constant(pixel);
      "counting":   f_h.make_counting();
      "counting":   f_h.make_counting();
      "horizontal": f_h.make_horizontal();
      "horizontal": f_h.make_horizontal();

powered by: WebSVN 2.1.0

© copyright 1999-2020 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.