I am trying to run the below code and getting the error as “Error (suppressible): (vlog-13276):Could not find field/method name (print_field_int) in ‘printer’ of ‘printer.print_field_int’”.
`include "uvm_macros.svh"
import uvm_pkg::*;
class simple extends uvm_object;
`uvm_object_utils(simple)
rand bit[3:0] a;
string inst;
function new(input string inst="INST");
super.new(inst);
this.inst=inst;
endfunction
virtual function void do_print(uvm_printer printer);
super.do_print(printer);
printer.print_field_int("a",a,$bits(a),UVM_DEC);
printer.print_string("Inst",inst);
endfunction
endclass
class test extends uvm_test;
`uvm_component_utils(test)
function new(input string name,uvm_component c);
super.new(name,c);
endfunction
function void build_phase(uvm_phase phase);
simple s=simple::type_id::create("INST");
s.randomize();
s.print();
endfunction
endclass
module tb;
test t;
initial begin
t=new("TEST",null);
run_test();
end
endmodule
Please help me to locate my mistake