Hi Everyone,
I am trying to extend the uvm_default_report_server to add some more project specific information I want to capture at the end of the test and to add a nice large pass/fail banner.
I ran the example below and didn’t get any errors, but also didn’t get a new banner with “hello world” in it.
Can you see what I am doing wrong here?
I am using UVM1.2.
thanks,
Dan
`timescale 1ns/1ns
package my_pkg;
`include “uvm_macros.svh”
import uvm_pkg::*;
class my_report_server extends uvm_default_report_server;
function void summarize(UVM_FILE file = 0);
//super.summarize();
// q.push_back(“hello world”);
$display(“hello world”);
endfunction
function void report_header(UVM_FILE file = 0);
endfunction // report_header
function new();
super.new();
`uvm_info(get_type_name(),“new report server constructed”, UVM_LOW);
endfunction // new
endclass
class my_test extends uvm_test;
uvm_component_utils(my_test)
uvm_new_func
function void build_phase(uvm_phase phase);
my_report_server my_report_server_h;
super.build();
my_report_server_h = new();
uvm_report_server::set_server(my_report_server_h);
endfunction
task run_phase(uvm_phase phase);
uvm_info(get_type_name(),"starting test", UVM_LOW); phase.raise_objection(this); #10ns; set_report_max_quit_count(6);
uvm_info(get_type_name(),“Quit count set to five”, UVM_LOW);
for (int loop=0;loop<20;loop++) begin
`uvm_error(get_type_name(), $sformatf(“error %0d”, loop))
#10ns;
end
phase.drop_objection(this);
endtask // run_phase
endclass // my_test
endpackage // my_pkg
module tb_top();
`include “uvm_macros.svh”
import uvm_pkg::;
import my_pkg::;
initial begin
run_test(“my_test”);
end
endmodule // tb_top
=====================================================
UVM_ERROR uvm_error_count_report.sv(45) @ 50: uvm_test_top [my_test] error 4
UVM_ERROR uvm_error_count_report.sv(45) @ 60: uvm_test_top [my_test] error 5
UVM_INFO /auto/edatools/cadence/incisiv_14.20.008//tools.lnx86/methodology/UVM/CDNS-1.2/sv//src/base/uvm_report_catcher.svh(705) @ 60: reporter [UVM/REPORT/CATCHER]
— UVM Report catcher Summary —
Number of demoted UVM_FATAL reports : 0
Number of demoted UVM_ERROR reports : 0
Number of demoted UVM_WARNING reports: 0
Number of caught UVM_FATAL reports : 0
Number of caught UVM_ERROR reports : 0
Number of caught UVM_WARNING reports : 0
UVM_INFO /auto/edatools/cadence/incisiv_14.20.008//tools.lnx86/methodology/UVM/CDNS-1.2/sv//src/base/uvm_report_server.svh(847) @ 60: reporter [UVM/REPORT/SERVER]
— UVM Report Summary —
Quit count reached!
Quit count : 6 of 6
** Report counts by severity
UVM_INFO : 6
UVM_WARNING : 0
UVM_ERROR : 6
UVM_FATAL : 0
** Report counts by id
[RNTST] 1
[UVM/RELNOTES] 1
[UVM/REPORT/CATCHER] 1
[my_test] 8
[uvm_default_report_server] 1