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

Subversion Repositories qaz_libs

[/] [qaz_libs/] [trunk/] [BFM/] [src/] [axis_video_frame/] [avf_scoreboard.svh] - Blame information for rev 49

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 45 qaztronic
//////////////////////////////////////////////////////////////////////
2
////                                                              ////
3
//// Copyright (C) 2018 Authors and OPENCORES.ORG                 ////
4
////                                                              ////
5
//// This source file may be used and distributed without         ////
6
//// restriction provided that this copyright statement is not    ////
7
//// removed from the file and that any derivative work contains  ////
8
//// the original copyright notice and the associated disclaimer. ////
9
////                                                              ////
10
//// This source file is free software; you can redistribute it   ////
11
//// and/or modify it under the terms of the GNU Lesser General   ////
12
//// Public License as published by the Free Software Foundation; ////
13
//// either version 2.1 of the License, or (at your option) any   ////
14
//// later version.                                               ////
15
////                                                              ////
16
//// This source is distributed in the hope that it will be       ////
17
//// useful, but WITHOUT ANY WARRANTY; without even the implied   ////
18
//// warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR      ////
19
//// PURPOSE.  See the GNU Lesser General Public License for more ////
20
//// details.                                                     ////
21
////                                                              ////
22
//// You should have received a copy of the GNU Lesser General    ////
23
//// Public License along with this source; if not, download it   ////
24
//// from http://www.opencores.org/lgpl.shtml                     ////
25
////                                                              ////
26
//////////////////////////////////////////////////////////////////////
27
 
28
class avf_scoreboard extends uvm_subscriber #(avf_sequence_item);
29
  `uvm_component_utils(avf_scoreboard);
30
 
31
  // --------------------------------------------------------------------
32
  function new (string name, uvm_component parent);
33
    super.new(name, parent);
34
  endfunction : new
35
 
36
  // --------------------------------------------------------------------
37
  function void build_phase(uvm_phase phase);
38
  endfunction : build_phase
39
 
40
  // // --------------------------------------------------------------------
41
  // mailbox #(avf_sequence_item) mb = new();
42
  // avf_sequence_item c_t;
43
  // avf_sequence_item item;
44
  // int m_matches = 0;
45
  // int m_mismatches = 0;
46
 
47
  // function void write(avf_sequence_item t);
48
 
49
    // $cast(c_t, t.clone);
50
 
51
    // if((c_t.command = FIFO_WR) || (c_t.command = FIFO_BOTH))
52
      // mb.try_put(c_t);
53
 
54
    // if((c_t.command = FIFO_RD) || (c_t.command = FIFO_BOTH))
55
      // mb.try_get(item);
56
 
57
    // if(~c_t.compare(item))
58
    // begin
59
      // uvm_report_info(get_name(), $sformatf("^^^ %16.t | %m | MISMATCH!!! | %s", $time, {20{"-"}}));
60
      // uvm_report_info(get_name(), c_t.convert2string);
61
      // uvm_report_info(get_name(), item.convert2string);
62
      // m_mismatches++;
63
    // end
64
    // else
65
      // m_matches++;
66
  // endfunction : write
67
 
68
  // --------------------------------------------------------------------
69
  //
70
  function void print_video_frame(ref video_frame_class f_h);
71
    string s;
72 49 qaztronic
    $display("%s", {80{"="}});
73 45 qaztronic
    $display(f_h.convert2string());
74
  endfunction : print_video_frame
75
 
76
  // --------------------------------------------------------------------
77
  function void write(avf_sequence_item t);
78
    print_video_frame(t.f_h);
79
  endfunction : write
80
 
81
  // --------------------------------------------------------------------
82
  function void report_phase(uvm_phase phase);
83
    // uvm_report_info(get_name(), $sformatf("Matches   : %0d", m_matches));
84
    // uvm_report_info(get_name(), $sformatf("Mismatches: %0d", m_mismatches));
85
  endfunction
86
 
87
// --------------------------------------------------------------------
88
endclass : avf_scoreboard

powered by: WebSVN 2.1.0

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