class dpcfg extends uvm_object;
rand int num_lanes;
function new(string name="");
super.new(name);
endfunction
function void do_print(uvm_printer printer);
printer.print_string("dpcfg", "dpcfg");
printer.print_field("num_lanes", num_lanes, $bits(num_lanes));
endfunction
endclass
//Instantiating the above class
dpcfg cfg;
cfg = new("cfg");
cfg.print();
I am getting the print output as below
----------------------------------------------
Name Type Size Value
----------------------------------------------
cfg dpcfg - @2579
dpcfg string 5 dpcfg
num_lanes integral 32 'hA
----------------------------------------------
where I need print output as below
----------------------------------------------
Name Type Size Value
----------------------------------------------
cfg dpcfg - @2579
dpcfg string 5 dpcfg
num_lanes integral 32 'd10
----------------------------------------------