Jump to content

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?

Link to comment
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.

Link to comment
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

Link to comment
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

Link to comment
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

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...