[AVM] Report
上一篇 /
下一篇 2008-06-12 17:05:16
各种Report原型如下 :
function void avm_report_message( input string id , input string mess , int verbosity_level= 300 );
function void avm_report_warning( input string id , input string mess , int verbosity_level= 200 );
function void avm_report_error( input string id , input string mess , int verbosity_level= 100 );
function void avm_report_fatal( input string id , input string mess , int verbosity_level= 0 );
可以通过verbosity来过滤各种消息:
set_report_verbosity_level(int verbosity)
//verbosity小于等于阀值的消息会被打印出来
Actions:
NO_ACTION DISPLAY LOG COUNT EXIT CALL_HOOK
typedef enum action {
NO_ACTION = 5'b00000 , // Does nothing
DISPLAY = 5'b00001 , // Displays to standard output
LOG = 5'b00010 , // Sends to specific file(s)
COUNT = 5'b00100 , // Exits when maximum count reached
EXIT = 5'b01000 , // Exits immediately
CALL_HOOK = 5'b10000 // Call virtual function
} action_type;
Severity:
MESSAGE WARNING ERROR FATAL
默认各种消息的动作如下:
severity_actions[MESSAGE] = DISPLAY | LOG;
severity_actions[WARNING] = DISPLAY | LOG;
severity_actions[ERROR] = DISPLAY | LOG | COUNT;
severity_actions[FATAL] = DISPLAY | LOG | EXIT;
注: ERROR 的默认count限制是1, 这里ERROR和FATAL的行为是一样的.
设置对各种消息采取的动作:
function void set_report_severity_action(input severity s, input action a);
function void set_report_id_action(input string id, input action a);
function void set_report_severity_id_action(input severity s, input string id, input action a);
配置LOG
function void set_report_default_file(input FILE f);
function void set_report_severity_file(input severity s, input FILE f);
function void set_report_id_file(input string id, input FILE f);
function void set_report_severity_id_file(input severity s, input string id, input FILE f);
Report设置工具集
导入论坛
引用链接
收藏
分享给好友
推荐到圈子
管理
举报
TAG: