Hi All,
When A’s print function is called, It shows like this.
How can I just print testing only without uvm_test_top…? Or Can I put string “testing” into new line after uvm_test_top ? Thanks a lot!
testing
Name Type Size Value
uvm_test_top A - @170
class A extends uvm_compoent
uvm_component_utils(A)
function do_print.....
$display("testing");....
The UVM printer mechanism has a complex system of knobs. You can can globally turn of the headers with this statement that you must execute before calling print().
You could use one of the methods of the uvm_printer class to print “testing”. Checkout UVM_PRINTER API
For example:
class A extends uvm_component;
`uvm_component_utils(A)
function new(string name = "A", uvm_component parent = null);
super.new(name, parent);
endfunction
function void do_print(uvm_printer printer);
printer.print_generic("", "", 0, "testing");
endfunction
endclass
Output:
---------------------------------
Name Type Size Value
---------------------------------
uvm_test_top A - @336
0 testing
---------------------------------