// Variable: +uvm_set_severity
//
// ~+uvm_set_severity=<comp>,<id>,<current severity>,<new severity>~ provides the
// equivalent of the various uvm_report_object's set_report_*_severity_override APIs. The
// special keyword, ~_ALL_~, can be provided for both/either the ~id~ and/or
// ~current severity~ arguments. For example:
//
<sim command> +uvm_set_severity=uvm_test_top.env0.*,BAD_CRC,UVM_ERROR,UVM_WARNING
<sim command> +uvm_set_severity=uvm_test_top.env0.*,_ALL_,UVM_ERROR,UVM_WARNING
// ~+uvm_set_verbosity=<comp>,<id>,<verbosity>,<phase>~ and
// ~+uvm_set_verbosity=<comp>,<id>,<verbosity>,time,<time>~ allow the users to manipulate the
// verbosity of specific components at specific phases (and times during the "run" phases)
// of the simulation. The ~id~ argument can be either ~_ALL_~ for all IDs or a
// specific message id. Wildcarding is not supported for ~id~ due to performance concerns.
// Settings for non-"run" phases are executed in order of occurrence on the command line.
// Settings for "run" phases (times) are sorted by time and then executed in order of
// occurrence for settings of the same time. For example:
//
<sim command> +uvm_set_verbosity=uvm_test_top.env0.agent1.*,_ALL_,UVM_FULL,time,800
UVM目前定义了6种啰嗦等级,UVM_NONE -> UVM_LOW -> UVM_MEDIUM -> UVM_HIGH-> UVM_DEBUG -> UVM_FULL是越来越啰嗦。
这里的<comp>是uvm component 的路径,支持*号通配符(跟uvm_config_db set/get时的用法类似,只是这里必须用绝对路径)。
<id>是uvm_info的第一个参数(如果选择component的所有打印语句,就写_ALL_)。
<phase>可以指定从某个uvm phase开始生效。xxx_phase直接写xxx就可以了,_phase省略掉。
<time>可以指定从某个仿真时刻开始生效
1. 这些plusargs是在仿真刚开始但RTL时间还未推进之前就解析并执行的,也就是说在0时刻之前。
2. 对于全局配置,如果指定了多次,会按照最低的容忍等级来执行。也就是说,如果在一长串的仿真参数里,先给了一个+UVM_VERBOSITY=UVM_LOW,又给了一个+UVM_VERBOSITY=UVM_HIGH,最终会按照UVM_LOW来过滤信息。这有点像木桶短板理论。
注意:这时候另外加上参数+uvm_set_verbosity=uvm_test_top.env0.agent0,msg_a,UVM_HIGH,run,可以单独指定系统对uvm_test_top.env0.agent0里info id为“msg_a”的打印信息的容忍等级改为高,并且从run phase开始生效。