|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?注册
x
uvm官网上一个例子,在大的component比较有用。
It provided fine grained control of controlling verbosity for multiple IDs
in same component. Comp can containt wildcards.This code can be put in top level test
case class.
Example
===============
+uvm_set_verbosity= <comp>+<ID0>_<ID1>+high
string args[$];
string values[$];
string msgId[$];
int verbosity;
uvm_cmdline_processor clp ;
uvm_component comps[$];
clp = uvm_cmdline_processor::get_inst();
if(!values.size())
void'(uvm_cmdline_proc.get_arg_values("+uvm_set_verbosity=",values));
foreach(values[i]) begin
args.delete();
uvm_split_string(values[i], "+", args);
if (args[2] == "high")
verbosity = UVM_HIGH;
else if (args[2] == "medium")
verbosity = UVM_MEDIUM;
else if (args[2] == "debug")
verbosity = UVM_DEBUG;
else if (args[2] == "none")
verbosity = UVM_NONE;
msgId.delete();
uvm_split_string(args[1], "_", msgId); // get msgId
foreach(msgId[id]) begin
comps.delete();
uvm_top.find_all(args[0],comps);
foreach (comps[i]) begin
record = {comps[i].get_full_name(),"_",msgId[id]};
uvm_config_db #(int)::set(null,"uvm_top",record, verbosity);
comps[i].set_report_id_verbosity(msgId[id],verbosity);
end
end //msgId loop
end |
|