How to print UVM Report Summary UVM1.2 with UVM_NONE verbosity

In UVM1.2, UVM Report Summmary has verbosity of UVM_LOW. I am using UVM_NONE as the global verbosity. Due to this UVM report summary is not getting printed at the end of simulation.
I have tried passing

+uvm_set_verbosity=*,UVM/REPORT/SERVER,UVM_NONE,report

. This is not helping to solve the issue.
I also tried to override

report_summarize

function in another custom report_server by extending

uvm_default_report_server

But there are lot of local variables used in the base report_summarize method leading to compilation issue.
Kindly let me know how to solve the issue.

In reply to aditya.polepeddi:

If the UVM report summary is not printed at the end of your simulation something is wrong with your simulation. It does not come to a regular end. This is independent on the verbosity level.
BTW the default UVM_VERBoSITY for `uvm_info is UVM_MEDIUM.

In reply to chr_sue:

I see that UVM Report Summary gets printed if I use UVM_LOW or UVM_MEDIUM or UVM_HIGH or UVM_DEBUG as verbosity, but doesn’t get printed when verbosity kept as UVM_NONE.
I think it is expected as in UVM1.2 the report_summarize function has following `uvm_info with UVM_LOW verbosity in uvm_report_server.svh

847 `uvm_info("UVM/REPORT/SERVER",`UVM_STRING_QUEUE_STREAMING_PACK(q),UVM_LOW)

I am finding ways to make this `uvm_info verbosity to UVM_NONE

I also tried using custom report catcher extending from uvm_report_catcher but still the summary print is not happening
Here’s the code:-


class my_error_promoted extends uvm_report_catcher;
    function new(string name="my_error_promoted");
        super.new(name);
    endfunction    
  
    function action_e catch();
        if(get_severity() == UVM_LOW && get_id() == "UVM/REPORT/SERVER")
            set_severity(UVM_NONE);
        return THROW;
    endfunction

endclass : my_error_promoted

class base_test extends uvm_test;

my_error_promoted my_error_promoted_h;
my_error_promoted_h = new();

/*
Some more code
*/

task run_phase(uvm_phase phase);
    uvm_report_cb::add(null, my_error_promoted_h);
/*
Some more code
*/
endtask: run_phase

endclass : base_test

In reply to aditya.polepeddi:

It looks like we have adiiferent understanding about the UVM Report Summary. I mean the report like this:

— UVM Report Summary —

** Report counts by severity

UVM_INFO : 39

UVM_WARNING : 0

UVM_ERROR : 0

UVM_FATAL : 0

** Report counts by id

[Questa UVM] 2

[RNTST] 1

[TEST_DONE] 1

[UVM/RELNOTES] 1

[arb_example_seq] 5

[arb_seq] 2

[arb_seq_grab] 3

[arb_seq_lock] 3

[arb_test] 1

[seq_arb_driver] 20

And this is independent on any verbosity setting.

In reply to chr_sue:

I am referring to the above UVM report summary itself. I found one other thread where this problem is highlighted in UVM1.2. UVM Report Summary has gone missing | Verification Academy

I want to know ways on how to get around this issue and have UVM Report Summary printed.

In reply to aditya.polepeddi:

If i understood you question then you want to change uvm info verbosity from UVM_LOW to UVM_NONE through command line argument.


//Option 1: This command line argument will change all the uvm_info verbosity to UVM_NONE irrespective of ID value. 
//UVM_NONE is lowest verbosity level. `uvm_info with UVM_NONE verbosity won't be printed in log. 
 +UVM_VERBOSITY=UVM_NONE

//Option 2: 
+uvm_set_verbosity=<comp>,<id>,<verbosity>,<phase> 

//all the uvm_info statement in "report phase" and after that with ID=UVM/REPORT/SERVER won't be printed   
+uvm_set_verbosity="*,UVM/REPORT/SERVER,UVM_NONE,report"

//all the uvm_info statement in "run phase" and after that with ID=UVM/REPORT/SERVER won't be printed   
+uvm_set_verbosity="*,UVM/REPORT/SERVER,UVM_NONE,run"

//all the uvm_info statement in "run phase" with any ID won't be printed   
+uvm_set_verbosity="*,_ALL_,UVM_NONE,run"


//Option 3:
+uvm_set_verbosity=<comp>,<id>,<verbosity>,time,<time>

//all the uvm_info statement executed at 0ns or after that with ID=UVM/REPORT/SERVER won't be printed   
+uvm_set_verbosity="*,UVM/REPORT/SERVER,UVM_NONE,time,0"


https://www.linkedin.com/in/patel-rahulkumar/

In reply to aditya.polepeddi:

UVM 1.1 report summary code:


  // See <uvm_report_object::report_summarize> method.

  virtual function void summarize(UVM_FILE file=0);
    string id;
    string name;
    string output_str;
    uvm_report_catcher::summarize_report_catcher(file);
    f_display(file, "");
    f_display(file, "--- UVM Report Summary ---");
    f_display(file, "");

    if(max_quit_count != 0) begin
      if ( quit_count >= max_quit_count ) f_display(file, "Quit count reached!");
      $sformat(output_str, "Quit count : %5d of %5d",
                             quit_count, max_quit_count);
      f_display(file, output_str);
    end

    f_display(file, "** Report counts by severity");
    for(uvm_severity_type s = s.first(); 1; s = s.next()) begin
      if(severity_count.exists(s)) begin
        int cnt;
        cnt = severity_count[s];
        name = s.name();
        $sformat(output_str, "%s :%5d", name, cnt);
        f_display(file, output_str);
      end
      if(s == s.last()) break;
    end

    if (enable_report_id_count_summary) begin

      f_display(file, "** Report counts by id");
      for(int found = id_count.first(id);
           found;
           found = id_count.next(id)) begin
        int cnt;
        cnt = id_count[id];
        $sformat(output_str, "[%s] %5d", id, cnt);
        f_display(file, output_str);
      end

    end

  endfunction

UVM 1.2 report summary code:


  virtual function void report_summarize(UVM_FILE file = 0);
    string id;
    string name;
    string output_str;
    string q[$];

    uvm_report_catcher::summarize();
    q.push_back("\n--- UVM Report Summary ---\n\n");

    if(m_max_quit_count != 0) begin
      if ( m_quit_count >= m_max_quit_count )
        q.push_back("Quit count reached!\n");
      q.push_back($sformatf("Quit count : %5d of %5d\n",m_quit_count, m_max_quit_count));
    end

    q.push_back("** Report counts by severity\n");
    foreach(m_severity_count[s]) begin
      q.push_back($sformatf("%s :%5d\n", s.name(), m_severity_count[s]));
    end

    if (enable_report_id_count_summary) begin
      q.push_back("** Report counts by id\n");
      foreach(m_id_count[id])
        q.push_back($sformatf("[%s] %5d\n", id, m_id_count[id]));
    end

    `uvm_info("UVM/REPORT/SERVER",`UVM_STRING_QUEUE_STREAMING_PACK(q),UVM_LOW)
  endfunction

  
//last line in report_summarize function in uvm 2.0
`uvm_info("UVM/REPORT/SERVER",`UVM_STRING_QUEUE_STREAMING_PACK(q),UVM_LOW)

So, In uvm 2.0 if you change default uvm verbosity to UVM_NONE then “UVM Report Summary …” won’t be printed at the end of simulation.


// If you want change verbosity to UVM_NONE and still want to print it in uvm 2.0 then specify the verbosity change only uvm_test_top.* components
// so, it won't affect the "UVM Report Summary..." which is printed by reporter. 

UVM_INFO /pkg/qct/software/synopsys/vcs/vcs-mx_vP-2019.06-1//etc/uvm-1.2/base/uvm_report_server.svh(894) @ 120000: reporter [UVM/REPORT/SERVER] 
--- UVM Report Summary ---


+uvm_set_verbosity="uvm_test_top.*,UVM/REPORT/SERVER,UVM_NONE,run"


Why are you using ID “UVM/REPORT/SERVER” in your test for uvm_info?
If you use any other id then you don’t have to worry about all this.


https://www.linkedin.com/in/patel-rahulkumar/

In reply to Rahulkumar:

+uvm_set_verbosity="uvm_test_top.*,_ALL_,UVM_NONE,run" 

I have `uvm_info messages in non-uvm_components also like modules/interfaces. The above option changes severity only for UVM components.
Is there a way where globally UVM_NONE verbosity is set. And I override the below message severity to UVM_NONE so that the summary gets printed ?


//last line in report_summarize function in uvm 2.0
`uvm_info("UVM/REPORT/SERVER",`UVM_STRING_QUEUE_STREAMING_PACK(q),UVM_LOW)

In reply to aditya.polepeddi:

change`uvm_info ID other than “UVM/REPORT/SERVER” in your testbench.

Why do you want to use ID value “UVM/REPORT/SERVER” in your testbench? Use some meaningful id value. you don’t require to use “UVM/REPORT/SERVER” as ID, any string will work.


https://www.linkedin.com/in/patel-rahulkumar/

In reply to Rahulkumar:

I am not using `uvm_info as “UVM/REPORT/SERVER” ID value anywhere in my testbench. I want to change the severity of this ID from UVM_LOW to UVM_NONE so that the summary gets printed when I set +UVM_VERBOSITY=UVM_NONE

In reply to aditya.polepeddi:

Did you try this?

function void set_report_id_verbosity_hier (string id, int verbosity)

This changes the verbosity for a specific ID.
You can call this from any component after constructing.
A good place is the start_of_simulation_phase of your env:

this.set_report_id_verbosity_hier("UVM/REPORT/SERVER", UVM_NONE);

In reply to aditya.polepeddi:

If you want to print then why are you changing verbosity to UVM_NONE? When you change verbosity to UVM_NONE then only uvm_info statement with UVM_NONE verbosity level will be printed.


//Verbosity level :
typedef enum
{
  UVM_NONE   = 0,
  UVM_LOW    = 100,
  UVM_MEDIUM = 200,
  UVM_HIGH   = 300,
  UVM_FULL   = 400,
  UVM_DEBUG  = 500
} uvm_verbosity;


//  UVM_NONE   - Report is always printed. Verbosity level setting can not
//               disable it.
//  UVM_LOW    - Report is issued if configured verbosity is set to UVM_LOW
//               or above.
//  UVM_MEDIUM - Report is issued if configured verbosity is set to UVM_MEDIUM
//               or above.
//  UVM_HIGH   - Report is issued if configured verbosity is set to UVM_HIGH
//               or above.
//  UVM_FULL   - Report is issued if configured verbosity is set to UVM_FULL
//               or above.
//  UVM_DEBUG  - Report is issued if configured verbosity is set to UVM_DEBUG

Example 1: 
+UVM_VERBOSITY=UVM_LOW 

`uvm_info("EXAMPLE : 1", "Verbosity is UVM_NONE", UVM_NONE);  //printed as verbosity level is UVM_LOW which is higher than UVM_NONE
`uvm_info("EXAMPLE : 1", "Verbosity is UVM_LOW or above" ,UVM_LOW); //printed as verbosity level is UVM_LOW  
`uvm_info("EXAMPLE : 1", "Verbosity is UVM_MEDIUM or above" ,UVM_MEDIUM); //won't print as verbosity level is UVM_LOW which is lower than UVM_MEDIUM
`uvm_info("EXAMPLE : 1", "Verbosity is UVM_HIGH or above" ,UVM_HIGH);//won't print as verbosity level is UVM_LOW which is lower than UVM_HIGH
`uvm_info("EXAMPLE : 1", "Verbosity is UVM_FULL or above" ,UVM_FULL); //won't print as verbosity level is UVM_LOW which is lower than UVM_FULL


Example 2: 
+UVM_VERBOSITY=UVM_HIGH 

`uvm_info("EXAMPLE : 2", "Verbosity is UVM_NONE", UVM_NONE);  //printed as verbosity level is UVM_HIGH which is higher than UVM_NONE
`uvm_info("EXAMPLE : 2", "Verbosity is UVM_LOW or above" ,UVM_LOW); //printed as verbosity level is UVM_HIGH which is higher than UVM_LOW
`uvm_info("EXAMPLE : 2", "Verbosity is UVM_MEDIUM or above" ,UVM_MEDIUM); //printed as verbosity level is UVM_HIGH which is higher than UVM_MEDIUM
`uvm_info("EXAMPLE : 2", "Verbosity is UVM_HIGH or above" ,UVM_HIGH);//printed as verbosity level is UVM_HIGH 
`uvm_info("EXAMPLE : 2", "Verbosity is UVM_FULL or above" ,UVM_FULL); //won't print as verbosity level is UVM_HIGH which is lower than UVM_FULL


https://www.linkedin.com/in/patel-rahulkumar/

I’m also trying to enable the report summary for all verbosities, and I’m getting the opposite effect when I try the following in my env

    virtual function void end_of_elaboration_phase(uvm_phase phase);
        super.end_of_elaboration_phase(phase);
        `uvm_info("REPORT", "Always Print UVM Report Summary", UVM_NONE);
        // Always print UVM Report Summary
        uvm_root::get().set_report_id_verbosity_hier("UVM/REPORT/CATCHER", UVM_NONE);
        uvm_root::get().set_report_id_verbosity_hier("UVM/REPORT/SERVER", UVM_NONE);
    endfunction

This is actually causing nothing to be printed.
Whereas when that is absent, it prints UVM_LOW and above something like the following:

36452ns :: UVM_INFO : /tools/cad/vcs/vcs_vT-2022.06-SP1-1/etc/uvm-1.2/base/uvm_report_catcher.svh(705): 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

   36452ns :: UVM_INFO : /tools/cad/vcs/vcs_vT-2022.06-SP1-1/etc/uvm-1.2/base/uvm_report_server.svh(904): reporter [UVM/REPORT/SERVER] 
--- UVM Report Summary ---

Quit count :     0 of    10
** Report counts by severity
UVM_INFO :  198
UVM_WARNING :    0
UVM_ERROR :    0
UVM_FATAL :    0
** Report counts by id
[]   131
[BUILD]     1
[CMOD]     4
[DELAYS]     5
[DRIVER]     7
[FRAME_TRACE]     1
[MAXQUITSET]     1
[MON]     1
[MONITOR]     1
[PLUSARGS]     1
[REPORT]     2
[RNTST]     1
[SUBSYS]     2
[TB]     8
[TESTNAME]     2
[TRACE]    26
[UVM/FACTORY/PRINT]     1
[UVM/RELNOTES]     1
[UVM/REPORT/CATCHER]     1
[generate_frame]     1

In reply to bcassell:

You are so close! Since report_summarize() has:

`uvm_info("UVM/REPORT/SERVER",`UVM_STRING_QUEUE_STREAMING_PACK(q),UVM_LOW)

You need to raise the verbosity of that ID to UVM_LOW with:

uvm_root::get().set_report_id_verbosity_hier("UVM/REPORT/CATCHER", UVM_LOW);

Below is the full testcase that prints the UVM Report Summary in UVM 1.2 with +UVM_VERBOSITY=UVM_NONE

module t;
import uvm_pkg::*;
`include "uvm_macros.svh"

  class test extends uvm_test;
    `uvm_component_utils(test);
    function new(string name, uvm_component parent);
      super.new(name, parent);
    endfunction

    task run_phase(uvm_phase phase);
      uvm_root::get().set_report_id_verbosity_hier("UVM/REPORT/SERVER", UVM_LOW);
      `uvm_info("TEST", "UVM_LOW", UVM_LOW)
      `uvm_info("TEST", "UVM_NONE", UVM_NONE)
    endtask
  endclass

  initial run_test("test");
endmodule

In reply to chrisspear:

I see that working on edaPlayground, but what you’re saying doesn’t make sense this me. When I read the function spec (url below) I’m interpreting it as “set all matching IDs to new verbosity”, but that’s not what is happening.

So … it was already UVM_LOW, and now we’ve set(raised?) it to UVM_LOW [again], but now it’s working at UVM_NONE? Either I’m being dense, or the document is just terribly written.

https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.2/html/files/base/uvm_component-svh.html#uvm_component.set_report_id_verbosity_hier

And what I’m saying is exactly what was previously suggested:

In reply to chr_sue:

this.set_report_id_verbosity_hier("UVM/REPORT/SERVER", UVM_NONE);

[/quote]

In reply to bcassell:

There is the report verbosity, +UVM_VERBOSITY=UVM_NONE, and the message verbosity, which is `uvm_info(“ID”, “msg”, UVM_LOW). The method set_report_id_verbosity_hier(“ID”, UVM_LOW) acts as if you changed the report verbosity, but just for that “ID”. It does not change the message verbosity.

In reply to chrisspear:

Thanks, now it makes full sense. I haven’t used this feature in a decade and forgot.
Set them to UVM_DEBUG for futureproofing.