UVM中如何在monitor中调用driver的task/function

一般不会有这种情况,如果要实现,则需要在monitor中得到driver的实例,然后调用task/function。

in monitor:

      xxx_driver drv_handle;

     $cast(drv_handle, uvm_top.find("*.drv"));

      drv_handle.task();

uvm_top 为 uvm_root的唯一实例,参考:https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.2/html/files/base/uvm_root-svh.html

https://blog.csdn.net/Holden_Liu/article/details/99183577

uvm_top.print_topology(); 打印出环境的例化结构。

uvm_top中也可以设置timeout时间,通过在base test中使用set_timeout(): uvm_top.set_timeout(500ns,1);方法的第一个参数是时间,第二个参数0表示不可以override,1表示可以被override。可以在继承tc中的build_phase中重新override掉。

扫描二维码关注公众号,回复: 11356441 查看本文章

uvm_top.find():通过实例名搜索返回句柄。

猜你喜欢

转载自blog.csdn.net/Holden_Liu/article/details/99180361
今日推荐