URL
https://opencores.org/ocsvn/uart2bus_testbench/uart2bus_testbench/trunk
Subversion Repositories uart2bus_testbench
[/] [uart2bus_testbench/] [trunk/] [tb/] [agent/] [transaction/] [uart_dashboard.svh] - Rev 19
Compare with Previous | Blame | View Log
//-------------------------------------------------------------------------------------------------//// UART2BUS VERIFICATION////-------------------------------------------------------------------------------------------------// CREATOR : HANY SALAH// PROJECT : UART2BUS UVM TEST BENCH// UNIT : DASHBOARD//-------------------------------------------------------------------------------------------------// TITLE : UART DASHBOARD// DESCRIPTION: THIS OBJECTS HOLD THE SHARED ATTRIBUTES AMONG ALL COMPONENTS AND THE UPDATED RESULTS//-------------------------------------------------------------------------------------------------// LOG DETAILS//-------------// VERSION NAME DATE DESCRIPTION// 1 HANY SALAH 14072017 FILE CREATION//-------------------------------------------------------------------------------------------------// 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//-------------------------------------------------------------------------------------------------class uart_dashboard extends uvm_object;// Coverage Fields// Thresholdsprotected int hit_text_cov=90;protected int hit_bin_cov=90;protected int hit_mode_cov=90;protected int hit_two_bursts_cov=90;protected int hit_four_bursts_cov=90;// Ratiosint unsigned trans_attribute_cov;int unsigned text_mode_cov;int unsigned binary_mode_cov;int unsigned two_binary_bursts_cov;int unsigned four_bursts_cov;bit hit_coverage=1'b0;uvm_table_printer pr;`uvm_object_utils_begin(uart_dashboard);`uvm_field_int(trans_attribute_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(two_binary_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_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_two_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)`uvm_field_int(hit_four_bursts_cov,UVM_ALL_ON|UVM_NOPRINT)`uvm_object_utils_endfunction new (string name="uart_dashboard");super.new(name);pr = new ();pr.knobs.default_radix=UVM_DEC;endfunction // newfunction void set_cov_threshold(int hit_text_cov,int hit_bin_cov,int hit_mode_cov,int hit_two_bursts_cov,int hit_four_bursts_cov);this.hit_text_cov = hit_text_cov;this.hit_bin_cov = hit_bin_cov;this.hit_mode_cov = hit_mode_cov;this.hit_two_bursts_cov = hit_two_bursts_cov;this.hit_four_bursts_cov = hit_four_bursts_cov;print_thresholds();endfunction // set_cov_thresholdfunction void evaluate_coverage();if((text_mode_cov >= hit_text_cov) &&(binary_mode_cov >= hit_bin_cov) &&(trans_attribute_cov >= hit_mode_cov) &&(two_binary_bursts_cov >= hit_two_bursts_cov)&&(four_bursts_cov >= hit_four_bursts_cov))hit_coverage = 1'b1;endfunction // evaluate_coveragevirtual 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_thresholdsendclass
