Jump to content
Sign in to follow this  
soloist_huaxin

uvm_report_server performance

Recommended Posts

I'm implementing our own version of uvm_report_server to format our log file format, and I noticed that simulation performance took a pretty big hit, and there is a fairly long delay at beginning of simulation before things start running. Is this normal when you overload default uvm_report_server? Are there practices that improve performance of uvm_report_server?

Share this post


Link to post
Share on other sites

We strongly recommend that you do not override uvm_report_server for two key reasons:

 

  1. Only one entity can effectively override uvm_report_server to achieve the formatting they want. If you try to combine code from multiple entities (from within or outside your organization) that try to override uvm_report_server, things will fail miserably.
  2. Many vendors tightly integrate the uvm_report_server with their tools. Messages get recorded so that they can be displayed with the waveforms and hyper-linked to their location in your source code. Overriding may break that integration.

A better options would be to post-process the log files to get the format you want. Otherwise I have no idea why the performance has degraded other than because of something in your code.

Share this post


Link to post
Share on other sites

Huaxin,

 

As you already know, I fully support overriding the report_server in UVM and I believe that there are numerous good reasons to do so. Of course, do a cost-benefit analysis to determine whether using vendor-supplied hooks is right for you.

 

At my company, we have used our own report server class for several years without issue because pretty log files are all the rage.  :) 

 

As for your slowdown, one possibility is that you are using the factory to perform the override. That might be your problem if thousands of uvm objects must perform the database lookup--I'm actually not sure.

 

Instead, we use this code to set it at time 0:  uvm_pkg::uvm_report_server::set_server(my_report_server);

 

If that doesn't help, I suggest that you run the free profiler that comes with your tool. If you have a 15 second delay (!), look at memory consumption and look for disk thrashing.

 

 

Brian

Share this post


Link to post
Share on other sites

hi,

 

both prior posts highlight two important points:

 

1. uvm_report_server's prior to uvm12 could not be chained properly resulting in formatting problems and/or message/error count/display problems. with uvm12 you can chain a vendor server with hyperlinking etc with your formatting.

 

2. if you have performance issues use the profiler to figure out where time is spend. there are various potential places and without the profiler its just guessing. 

 

/uwe

Share this post


Link to post
Share on other sites

class my_report_server extends uvm_report_server;
  virtual function string compose_message( uvm_severity severity,
                                           string name,
                                           string id,
                                           string message,
                                           string filename,
                                           int line );
    uvm_severity_type severity_type = uvm_severity_type'(severity);

    // Original: return $psprintf( "%8s | %16s | %2d | %0t | %21s | %7s | %s",
    //           severity_type.name(), filename, line, $time, name, id, message);
    return $psprintf( "%9s@%0t: [%30s] %s", severity_type.name(),
                                            $time,
                                            id,
                                            message);
  endfunction: compose_message
endclass: my_report_server

 

 

 

virtual class my_test_report extends uvm_test;

  my_report_server my_rpt_server;

  ...

endclass: my_test_report

 

 

 

class my_test_base extends my_test_report;

  ...

endclass: my_test_base

 

 

 

class my_specific_test1 extendes my_test_base;

  ...

endclass: my_specific_test1

 

 

 

class my_specific_test2 extendes my_test_base;

...

endclass: my_specific_test2

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×