//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
//
|
//
|
// UART2BUS VERIFICATION
|
// UART2BUS VERIFICATION
|
//
|
//
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// CREATOR : HANY SALAH
|
// CREATOR : HANY SALAH
|
// PROJECT : UART2BUS UVM TEST BENCH
|
// PROJECT : UART2BUS UVM TEST BENCH
|
// UNIT : DASHBOARD
|
// UNIT : DASHBOARD
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// TITLE : UART DASHBOARD
|
// TITLE : UART DASHBOARD
|
// DESCRIPTION: THIS OBJECTS HOLD THE SHARED ATTRIBUTES AMONG ALL COMPONENTS AND THE UPDATED RESULTS
|
// DESCRIPTION: THIS OBJECTS HOLD THE SHARED ATTRIBUTES AMONG ALL COMPONENTS AND THE UPDATED RESULTS
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// LOG DETAILS
|
// LOG DETAILS
|
//-------------
|
//-------------
|
// VERSION NAME DATE DESCRIPTION
|
// VERSION NAME DATE DESCRIPTION
|
// 1 HANY SALAH 14072017 FILE CREATION
|
// 1 HANY SALAH 14072017 FILE CREATION
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
|
// ALL COPYRIGHTS ARE RESERVED FOR THE PRODUCER ONLY .THIS FILE IS PRODUCED FOR OPENCORES MEMBERS
|
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
|
// ONLY AND IT IS PROHIBTED TO USE THIS MATERIAL WITHOUT THE CREATOR'S PERMISSION
|
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
class uart_dashboard extends uvm_object;
|
class uart_dashboard extends uvm_object;
|
|
|
// Coverage Fields
|
// Coverage Fields
|
// Thresholds
|
// Thresholds
|
protected int hit_text_cov=90;
|
protected int hit_text_cov=90;
|
protected int hit_bin_cov=90;
|
protected int hit_bin_cov=90;
|
protected int hit_mode_cov=90;
|
protected int hit_mode_cov=90;
|
protected int hit_two_bursts_cov=90;
|
protected int hit_two_bursts_cov=90;
|
protected int hit_four_bursts_cov=90;
|
protected int hit_four_bursts_cov=90;
|
|
|
|
|
// Ratios
|
// Ratios
|
int unsigned trans_attribute_cov;
|
int unsigned trans_attribute_cov;
|
int unsigned text_mode_cov;
|
int unsigned text_mode_cov;
|
int unsigned binary_mode_cov;
|
int unsigned binary_mode_cov;
|
int unsigned two_binary_bursts_cov;
|
int unsigned two_binary_bursts_cov;
|
int unsigned four_bursts_cov;
|
int unsigned four_bursts_cov;
|
|
|
bit hit_coverage=1'b0;
|
bit hit_coverage=1'b0;
|
|
|
uvm_table_printer pr;
|
uvm_table_printer pr;
|
|
|
`uvm_object_utils_begin(uart_dashboard);
|
`uvm_object_utils_begin(uart_dashboard);
|
`uvm_field_int(trans_attribute_cov,UVM_ALL_ON)
|
`uvm_field_int(trans_attribute_cov,UVM_ALL_ON)
|
`uvm_field_int(text_mode_cov,UVM_ALL_ON)
|
`uvm_field_int(text_mode_cov,UVM_ALL_ON)
|
`uvm_field_int(binary_mode_cov,UVM_ALL_ON)
|
`uvm_field_int(binary_mode_cov,UVM_ALL_ON)
|
`uvm_field_int(two_binary_bursts_cov,UVM_ALL_ON)
|
`uvm_field_int(two_binary_bursts_cov,UVM_ALL_ON)
|
`uvm_field_int(four_bursts_cov,UVM_ALL_ON)
|
`uvm_field_int(four_bursts_cov,UVM_ALL_ON)
|
|
|
`uvm_field_int(hit_text_cov,UVM_ALL_ON|UVM_NOPRINT|UVM_DEC)
|
`uvm_field_int(hit_text_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_bin_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_bin_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_mode_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_mode_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_two_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_two_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_four_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_field_int(hit_four_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)
|
`uvm_object_utils_end
|
`uvm_object_utils_end
|
|
|
function new (string name="uart_dashboard");
|
function new (string name="uart_dashboard");
|
super.new(name);
|
super.new(name);
|
pr = new ();
|
pr = new ();
|
pr.knobs.default_radix=UVM_DEC;
|
pr.knobs.default_radix=UVM_DEC;
|
endfunction // new
|
endfunction // new
|
|
|
function void set_cov_threshold(hit_text_cov,
|
function void set_cov_threshold(int hit_text_cov,
|
hit_bin_cov,
|
int hit_bin_cov,
|
hit_mode_cov,
|
int hit_mode_cov,
|
hit_two_bursts_cov,
|
int hit_two_bursts_cov,
|
hit_four_bursts_cov);
|
int hit_four_bursts_cov);
|
this.hit_text_cov = hit_text_cov;
|
this.hit_text_cov = hit_text_cov;
|
this.hit_bin_cov = hit_bin_cov;
|
this.hit_bin_cov = hit_bin_cov;
|
this.hit_mode_cov = hit_mode_cov;
|
this.hit_mode_cov = hit_mode_cov;
|
this.hit_two_bursts_cov = hit_two_bursts_cov;
|
this.hit_two_bursts_cov = hit_two_bursts_cov;
|
this.hit_four_bursts_cov = hit_four_bursts_cov;
|
this.hit_four_bursts_cov = hit_four_bursts_cov;
|
|
print_thresholds();
|
endfunction // set_cov_threshold
|
endfunction // set_cov_threshold
|
|
|
function void evaluate_coverage();
|
function void evaluate_coverage();
|
if((text_mode_cov >= hit_text_cov) &&
|
if((text_mode_cov >= hit_text_cov) &&
|
(binary_mode_cov >= hit_bin_cov) &&
|
(binary_mode_cov >= hit_bin_cov) &&
|
(trans_attribute_cov >= hit_mode_cov) &&
|
(trans_attribute_cov >= hit_mode_cov) &&
|
(two_binary_bursts_cov >= hit_two_bursts_cov)&&
|
(two_binary_bursts_cov >= hit_two_bursts_cov)&&
|
(four_bursts_cov >= hit_four_bursts_cov))
|
(four_bursts_cov >= hit_four_bursts_cov))
|
hit_coverage = 1'b1;
|
hit_coverage = 1'b1;
|
endfunction // evaluate_coverage
|
endfunction // evaluate_coverage
|
|
|
|
virtual function void print_thresholds ();
|
|
$display("-------------------------------");
|
|
$display("hit_text_cov\t\t\t=%d",hit_text_cov);
|
|
$display("hit_bin_cov\t\t\t=%d",hit_bin_cov);
|
|
$display("hit_mode_cov\t\t\t=%d",hit_mode_cov);
|
|
$display("hit_two_bursts_cov\t\t=%d",hit_two_bursts_cov);
|
|
$display("hit_four_bursts_cov\t\t=%d",hit_four_bursts_cov);
|
|
$display("-------------------------------");
|
|
endfunction // print_thresholds
|
|
|
|
|
endclass
|
endclass
|
|
|