Quantcast
Channel: UVM Forums RSS Feed
Viewing all articles
Browse latest Browse all 756

How to call uvm_error from a static method?

$
0
0

What is the recommended way to call UVM report functions and macros from a static method in a uvm_component?

 

Having the following code:

  static function static_check();
    `uvm_error("ID", "Something failed");
  endfunction

causes a compile error:

** Error: testbench.sv(15): (vlog-2888) Illegal to access non-static method 'uvm_report_enabled' from a static method.

Full example can be edited and run here: http://www.edaplayground.com/s/4/762

 


Viewing all articles
Browse latest Browse all 756

Trending Articles