[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设置工具集
  • 所有的set_report_* 都有一套相应的set_report_*_hier函数来改变现在的组件和它的子组件的设置.
  • 为所有COUNT动作设置退出计数:
  • set_report_max_quit_count(int m);
  • 输出各ID,severity的统计信息:
  • report_summarize();

TAG:

 

评分:0

我来说两句

显示全部

:loveliness: :handshake :victory: :funk: :time: :kiss: :call: :hug: :lol :'( :Q :L ;P :$ :P :o :@ :D :( :)

日历

« 2008-11-10  
      1
2345678
9101112131415
16171819202122
23242526272829
30      

我的存档

数据统计

  • 访问量: 136
  • 日志数: 9
  • 建立时间: 2008-06-12
  • 更新时间: 2008-06-12

RSS订阅

Open Toolbar