代码之家  ›  专栏  ›  技术社区  ›  justrajdeep

是否可以删除uvm\u config\u db条目?

uvm
  •  0
  • justrajdeep  · 技术社区  · 9 年前

    uvm_config_db#(uvm_bitstream_t)::set 
    

    入口,以便

    uvm_config_db#(uvm_bitstream_t)::exists 
    

    我试着把它设置为 null 但仍然存在返回1。

    提前感谢

    拉杰迪普

    1 回复  |  直到 9 年前
        1
  •  1
  •   Phil    9 年前

    不,这是不可能的。uvm\u config\u db的唯一方法是set、get、exists和wait\u modified。在config_db中使用复杂类型并不常见。

    如果使用的类型具有构造函数(即可以为null),则可以这样测试:

    if (uvm_config_db(mytype)::get(..., myobj) && myobj !=null)
      //Entry exists and not null
    else
      // Entry does not exist or is null