上一个文章中讲解了uvm_report_enable。当enable了,就会执行真正的message的执行方法,还是以`uvm_error宏讲解
`define uvm_error(ID, MSG) \
begin \
if (uvm_report_enabled(UVM_NONE,UVM_ERROR,ID)) \
uvm_report_error (ID, MSG, UVM_NONE, `uvm_file, `uvm_line, "", 1); \
end
核心是方法uvm_report_error,下面是调用方法的执行顺序
uvm_report_object.uvm_report_error(*)和方法uvm_report_object.uvm_report(*)仅仅是参数的传递
uvm_report_message.set_message(*)在uvm_report方法中例化一个uvm_report_message句柄,然后设置这个对象的一些属性,主要是uvm_report传递的一些参数
uvm_report_handle.process_report_messaged(*)调用组件中uvm_report_handle类型的句柄m_rh的方法,主要是设置message别的属性
uvm_report_server.process_report_message(*)如果action是UVM_LOG|UVM_DOSPLAY,执行下面的compose_repost_message,如果是UVM_NO_ACTION,直接返回
uvm_report_server.compose_report_message(*)(如果message的action是LOG/DISPLAY),构造真正的要打印的message string
uvm_report_server.exc