Below code is part of top file. I SET and GET in the top file. I want to print what I get, i.e. the string ‘vlsi’. I don’t know how to refer to the field name so that I can print the field value from the uvm_config_db. Thank you.
initial begin
uvm_config_db#(string)::set(uvm_root::get(),"*","string_name","vlsi");
end
initial begin
if (uvm_config_db#(string)::get(uvm_root::get(),"","string_name","vlsi")) begin
`uvm_info("In top file", "string_name", UVM_LOW);
$display("name = %s",string_name); // error here, unresolved reference to 'string_name'
end
else begin
`uvm_fatal("Top","cannot get string name in config_db");
end
end