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

Subversion Repositories qaz_libs

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

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 45 Rev 47
Line 27... Line 27...
 
 
class avf_config #(N, U);
class avf_config #(N, U);
 
 
  virtual axis_if #(.N(N), .U(U)) vif;
  virtual axis_if #(.N(N), .U(U)) vif;
  protected uvm_active_passive_enum is_active; // UVM_ACTIVE or UVM_PASSIVE
  protected uvm_active_passive_enum is_active; // UVM_ACTIVE or UVM_PASSIVE
  int pixels_per_line;
  video_frame_config c_h;
  int lines_per_frame;
 
  int bits_per_pixel;
 
  int bytes_per_pixel;
 
  int pixels_per_clk;
 
  string name;
 
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  function void init
  function void init
  ( int pixels_per_line
  ( int pixels_per_line
  , int lines_per_frame
  , int lines_per_frame
  , int bits_per_pixel
  , int bits_per_pixel
  , string    name = ""
  , string    name = ""
  );
  );
    this.pixels_per_line  = pixels_per_line;
    c_h = new();
    this.lines_per_frame  = lines_per_frame;
    c_h.init( .pixels_per_line(pixels_per_line)
    this.bits_per_pixel   = bits_per_pixel;
            , .lines_per_frame(lines_per_frame)
    this.name             = name;
            , .bits_per_pixel(bits_per_pixel)
    this.bytes_per_pixel  = (bits_per_pixel % 8 == 0)
            , .bus_width(N)
                          ? (bits_per_pixel / 8)
            );
                          : (bits_per_pixel / 8) + 1;
 
    assert(N % bytes_per_pixel == 0) else
 
      `uvm_fatal("avf_config", "N % bytes_per_pixel != 0")
 
    this.pixels_per_clk   = N / bytes_per_pixel;
 
  endfunction: init
  endfunction: init
 
 
  // --------------------------------------------------------------------
  // --------------------------------------------------------------------
  function new
  function new
  (  virtual axis_if #(.N(N), .U(U)) vif
  (  virtual axis_if #(.N(N), .U(U)) vif

powered by: WebSVN 2.1.0

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