if(source_obj==obj)uvm_report_info("OBJTN_TRC",$sformatf("Object %0s %0s %0d objection(s)%s: count=%0d total=%0d",obj.get_full_name()==""?"uvm_top":obj.get_full_name(),action,count,description!=""?{" (",description,")"}:"",_count,_total),UVM_NONE);elsebeginintcpath=0,last_dot=0;stringsname=source_obj.get_full_name(),nm=obj.get_full_name();intmax=sname.len()>nm.len()?nm.len():sname.len();// For readability, only print the part of the source obj hierarchy underneath// the current object.while((sname[cpath]==nm[cpath])&&(cpath<max))beginif(sname[cpath]==".")last_dot=cpath;cpath++;endif(last_dot)sname=sname.substr(last_dot+1,sname.len());uvm_report_info("OBJTN_TRC",$sformatf("Object %0s %0s %0d objection(s) %0s its total (%s from source object %s%s): count=%0d total=%0d",obj.get_full_name()==""?"uvm_top":obj.get_full_name(),action=="raised"?"added":"subtracted",count,action=="raised"?"to":"from",action,sname,description!=""?{", ",description}:"",_count,_total),UVM_NONE);endendfunction// Function- m_get_parent//// Internal method for getting the parent of the given ~object~.// The ultimate parent is uvm_top, UVM's implicit top-level component. functionuvm_objectm_get_parent(uvm_objectobj);uvm_componentcomp;uvm_sequence_baseseq;
if(source_obj==obj)uvm_report_info("OBJTN_TRC",$sformatf("Object %0s %0s %0d %0s objection(s)%s: count=%0d total=%0d",obj.get_full_name()==""?"uvm_top":obj.get_full_name(),action,count,get_full_name(),description!=""?{" (",description,")"}:"",_count,_total),UVM_NONE);elsebeginintcpath=0,last_dot=0;stringsname=source_obj.get_full_name(),nm=obj.get_full_name();intmax=sname.len()>nm.len()?nm.len():sname.len();// For readability, only print the part of the source obj hierarchy underneath// the current object.while((sname[cpath]==nm[cpath])&&(cpath<max))beginif(sname[cpath]==".")last_dot=cpath;cpath++;endif(last_dot)sname=sname.substr(last_dot+1,sname.len());uvm_report_info("OBJTN_TRC",$sformatf("Object %0s %0s %0d %0s objection(s) %0s its total (%s from source object %s%s): count=%0d total=%0d",obj.get_full_name()==""?"uvm_top":obj.get_full_name(),action=="raised"?"added":"subtracted",count,get_full_name(),action=="raised"?"to":"from",action,sname,description!=""?{", ",description}:"",_count,_total),UVM_NONE);endendfunction// Function- m_get_parent//// Internal method for getting the parent of the given ~object~.// The ultimate parent is uvm_top, UVM's implicit top-level component. functionuvm_objectm_get_parent(uvm_objectobj);uvm_componentcomp;uvm_sequence_baseseq;