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

Subversion Repositories uart2bus_testbench

[/] [uart2bus_testbench/] [trunk/] [tb/] [agent/] [transaction/] [uart_dashboard.svh] - Blame information for rev 19

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 18 HanySalah
//-------------------------------------------------------------------------------------------------
2
//
3
//                             UART2BUS VERIFICATION
4
//
5
//-------------------------------------------------------------------------------------------------
6
// CREATOR    : HANY SALAH
7
// PROJECT    : UART2BUS UVM TEST BENCH
8
// UNIT       : DASHBOARD
9
//-------------------------------------------------------------------------------------------------
10
// TITLE      : UART DASHBOARD
11
// DESCRIPTION: THIS OBJECTS HOLD THE SHARED ATTRIBUTES AMONG ALL COMPONENTS AND THE UPDATED RESULTS
12
//-------------------------------------------------------------------------------------------------
13
// LOG DETAILS
14
//-------------
15
// VERSION      NAME        DATE        DESCRIPTION
16
//    1       HANY SALAH    14072017    FILE CREATION
17
//-------------------------------------------------------------------------------------------------
18
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
19
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
20
//-------------------------------------------------------------------------------------------------
21
class uart_dashboard extends uvm_object;
22
 
23
   //  Coverage Fields
24
   //  Thresholds
25
   protected int    hit_text_cov=90;
26
   protected int    hit_bin_cov=90;
27
   protected int    hit_mode_cov=90;
28
   protected int    hit_two_bursts_cov=90;
29
   protected int    hit_four_bursts_cov=90;
30
 
31
 
32
   //  Ratios
33
   int unsigned trans_attribute_cov;
34
   int unsigned text_mode_cov;
35
   int unsigned binary_mode_cov;
36
   int unsigned two_binary_bursts_cov;
37
   int unsigned four_bursts_cov;
38
 
39
   bit hit_coverage=1'b0;
40
 
41
   uvm_table_printer   pr;
42
 
43
   `uvm_object_utils_begin(uart_dashboard);
44
      `uvm_field_int(trans_attribute_cov,UVM_ALL_ON)
45
      `uvm_field_int(text_mode_cov,UVM_ALL_ON)
46
      `uvm_field_int(binary_mode_cov,UVM_ALL_ON)
47
      `uvm_field_int(two_binary_bursts_cov,UVM_ALL_ON)
48
      `uvm_field_int(four_bursts_cov,UVM_ALL_ON)
49
 
50 19 HanySalah
      `uvm_field_int(hit_text_cov,UVM_ALL_ON|UVM_NOPRINT)
51 18 HanySalah
      `uvm_field_int(hit_bin_cov,UVM_ALL_ON|UVM_NOPRINT)
52
      `uvm_field_int(hit_mode_cov,UVM_ALL_ON|UVM_NOPRINT)
53
      `uvm_field_int(hit_two_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
54
      `uvm_field_int(hit_four_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
55
   `uvm_object_utils_end
56
 
57
   function new (string name="uart_dashboard");
58
      super.new(name);
59
      pr = new ();
60
      pr.knobs.default_radix=UVM_DEC;
61
   endfunction // new
62
 
63 19 HanySalah
   function void set_cov_threshold(int hit_text_cov,
64
                                   int hit_bin_cov,
65
                                   int hit_mode_cov,
66
                                   int hit_two_bursts_cov,
67
                                   int hit_four_bursts_cov);
68 18 HanySalah
      this.hit_text_cov        = hit_text_cov;
69
      this.hit_bin_cov         = hit_bin_cov;
70
      this.hit_mode_cov        = hit_mode_cov;
71
      this.hit_two_bursts_cov  = hit_two_bursts_cov;
72
      this.hit_four_bursts_cov = hit_four_bursts_cov;
73 19 HanySalah
      print_thresholds();
74 18 HanySalah
   endfunction // set_cov_threshold
75
 
76
   function void evaluate_coverage();
77
      if((text_mode_cov         >= hit_text_cov)     &&
78
         (binary_mode_cov       >= hit_bin_cov)      &&
79
         (trans_attribute_cov   >= hit_mode_cov)     &&
80
         (two_binary_bursts_cov >= hit_two_bursts_cov)&&
81
         (four_bursts_cov       >= hit_four_bursts_cov))
82
        hit_coverage = 1'b1;
83
   endfunction // evaluate_coverage
84
 
85 19 HanySalah
   virtual function void print_thresholds ();
86
      $display("-------------------------------");
87
      $display("hit_text_cov\t\t\t=%d",hit_text_cov);
88
      $display("hit_bin_cov\t\t\t=%d",hit_bin_cov);
89
      $display("hit_mode_cov\t\t\t=%d",hit_mode_cov);
90
      $display("hit_two_bursts_cov\t\t=%d",hit_two_bursts_cov);
91
      $display("hit_four_bursts_cov\t\t=%d",hit_four_bursts_cov);
92
      $display("-------------------------------");
93
   endfunction // print_thresholds
94
 
95
 
96 18 HanySalah
endclass

powered by: WebSVN 2.1.0

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