首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >只为uvm中的少数/序列/对象/接口设置详细内容?

问只为uvm中的少数/序列/对象/接口设置详细内容?
EN

Stack Overflow用户
提问于 2016-03-22 11:11:27
回答 2查看 8.3K关注 0票数 2

如何控制某些组件的详细性,以便只将详细内容设置为少数组件?

例如,在特定特性的验证中,测试很少涉及组件/序列/对象/接口等。我想把这些细节设置为UVM_HIGH。我不想将全局严重性设置为UVM_HIGH,因为可能会出现大量不相关的调试消息,这可能会增加日志大小。

有什么更干净的方法可以做到这一点?使用额外的命令行-plusarg触发这一点是可以的。基本上,需求是,用于特定特性验证的测试/组件/序列/对象/接口应该具有全局严重性或特定于特性的严重性,这取决于哪个级别更高。

请注意,不能使用uvm_component的内置报表方法,因为uvm_info语句可以在uvm_object扩展类中,也可以在接口中。

EN

回答 2

Stack Overflow用户

发布于 2016-03-23 05:44:34

为此您可以使用uvm_report_catcher。它与uvm_object和接口一起工作。您还可以使用get_id()、get_message()等API来匹配特定的组件/对象,并且只能设置该组件/对象的详细性。

查看我在就在这里上的简单示例

票数 2
EN

Stack Overflow用户

发布于 2016-05-11 16:32:29

我尝试了不同的方法,也想出了这样的方法。

不知道它对人们有多大的帮助。

使用运行时命令+user_verb=UVM_LOW +UVM_VERBOSITY=UVM_MEDIUM进行模拟

代码语言:javascript
复制
class user_class extends uvm_object;

  string report_id = "user_class";
  string user_verb;

  typedef uvm_enum_wrapper#(uvm_verbosity)  uvm_verbosity_wrapper_e;

  uvm_verbosity current_verb;
  uvm_verbosity USER_VERBOSITY=UVM_HIGH;

  function new (string name="my_class");
    super.new(name);
    report_id = name;
    //void'($value$plusargs("user_verb=%s",user_verb));
    //void'(uvm_verbosity_wrapper_e::from_name (user_verb,USER_VERBOSITY));
    if ($test$plusargs("user_verb")) begin
      current_verb=uvm_top.get_report_verbosity_level(UVM_INFO,"current_verb");           USER_VERBOSITY=uvm_top.get_report_verbosity_level(UVM_INFO,"user_verb");
    end

    $display("user_verb = %s",user_verb); 
    $display("current_verb = %s",current_verb); 
  endfunction : new


  task display;
    `uvm_info(report_id,"This is my message",USER_VERBOSITY)    
  endtask

endclass: user_class


module top;
  string id;
  string report_id = "top";
  user_class m_user_class;

  initial begin
    m_user_class = new("m_user_class");
    m_user_class.display;
    `uvm_info(report_id,"This is my message",UVM_LOW)
  end
endmodule: top

可以在eda游乐场这里上找到一个工作示例。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/36152849

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档