# How do I override the UVM report summary in UVM1.2 (make a custom uvm\_report\_server?)

**URL:** <https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771>\
**Category:** UVM\
**Tags:** UVM, uvm\_default\_report\_server, report-summary, custom\_report\_server\
**Created:** [June 23, 2015, 4:51pm UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771 "2015-06-23T16:51:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![danielashercohen](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/da6949/32.png) [@danielashercohen](https://verificationacademy.com/forums/u/danielashercohen)\
**Post date:** [June 23, 2015, 4:51pm UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/1 "2015-06-23T16:51:01Z")

</div>

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](https://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

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kaushalmodi](https://verificationacademy.com/forums/u/kaushalmodi)\
**Post date:** [July 11, 2015, 9:40pm UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/2 "2015-07-11T21:40:42Z")

</div>

Check out [my solution](https://github.com/kaushalmodi/custom_uvm_report_server) on how to customize the uvm\_report\_server. It works for both UVM 1.1d and UVM 1.2.

---

<div class="post-metadata">

**Author:** ![danielashercohen](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/da6949/32.png) [@danielashercohen](https://verificationacademy.com/forums/u/danielashercohen)\
**Post date:** [July 12, 2015, 2:49am UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/3 "2015-07-12T02:49:25Z")

</div>

_In reply to [danielashercohen](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/2):_

Hi,

actually (thanks to Axel Sherer) I have a solution to make the code originally posted work.  
I should have overridden report\_summarize, not summarize.

If you do that then you can add a few additional fields / values to the summary which is what I wanted to do.

Kushalmodi’s solution demonstrates how to do far more modification than that if you want to go further.

Dan

---

<div class="post-metadata">

**Author:** ![Phill\_Ferg](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/p/d26b3c/32.png) [@Phill\_Ferg](https://verificationacademy.com/forums/u/Phill_Ferg)\
**Post date:** [January 5, 2016, 3:13pm UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/4 "2016-01-05T15:13:38Z")

</div>

_In reply to [kaushalmodi](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/3):_

Kushalmodi,

great piece of flexible code, but i found a slight compilation bug.

From line 169, the string variable is still an integer for uvm-1.2 as well as uvm-1.1d

```verilog

`ifndef UVM_1p1d
      virtual function string compose_report_message (uvm_report_message report_message,
                                                      string report_object_name = "");
         uvm_severity l_severity;
         uvm_verbosity l_verbosity;
         uvm_report_message_element_container el_container;
         uvm_report_handler l_report_handler;
         string message = "";
         string filename = "";
         string line = "";
         string id = "";
`else
         virtual function string compose_message
           ( uvm_severity severity,
             string name,
             string id,
             string message,
             string filename,
             int line );
            // Do nothing
            return "";
         endfunction // compose_message

```

Although this has been coded for VCS it is a good start for other custom report servers. Thank you!

---

<div class="post-metadata">

**Author:** ![kaushalmodi](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/k/6bbea6/32.png) [@kaushalmodi](https://verificationacademy.com/forums/u/kaushalmodi)\
**Post date:** [April 22, 2019, 11:04pm UTC](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/5 "2019-04-22T23:04:38Z")

</div>

_In reply to [Phill\_Ferg](https://verificationacademy.com/forums/t/how-do-i-override-the-uvm-report-summary-in-uvm1-2-make-a-custom-uvm-report-server/30771/4):_

Thanks for catching that, and sorry for that super-late reply. I’ve now fixed that in my repo.
