I tried the same code and it prints messages from overridden class. There is no uvm_default_report_server
class. Rather than it is simply uvm_report_server
.
The following is my code snippet, which prints output as required:
// User report server
class my_report_server extends uvm_report_server;
`uvm_object_utils(my_report_server)
function new(string name="my_report_server");
super.new();
$display( "Constructing report serevr %0s",name);
endfunction : new
// Return type is string
virtual function string compose_message( uvm_severity severity,string name,string id,string message,string filename,int line );
// DEBUG MESSAGE
$display("From Super: \n %0s",super.compose_message(severity,name,id,message,filename,line));
//This display comes.
$display("This is from extended class");
endfunction
class test extends uvm_test;
// ... Some stuff here...
// Declare handle here.
my_report_server srv_h;
function void build_phase(uvm_phase phase);
super.build_phase(phase);
srv_h = new();
uvm_report_server::set_server(srv_h);
endfunction
endclass
One thing I would like to point out is you have declared handle inside build_phase itself. This might create scoping issues (though it works fine with VCS).
Also, note that the return type of compose_message
function is string
. So, there must be some output coming from your overridden function. I have added a debug message for the same, this prints the default formatted message.
More information on uvm_report_server can be found out at this class reference link.