In my tb_top I declare the following instance and set to the resource_db:
axi_interface vif(ACLK, ARESETn);
uvm_resource_db#(virtual axi_interface)::set(.scope("ifs"), .name("axi_interface"), .val(vif));
In the driver class I declare the following virtual interface, and in the build phase I read it from the resource_db by get:
virtual axi_interface vif;
void'(uvm_resource_db#(virtual axi_interface)::read_by_name(.scope("ifs"), .name("axi_interface"), .val(vif)));
Since I have understood that its better to use config_db than resource_db I want to change the code.
So in the tb_top I did
uvm_config_db#(virtual axi_interface)::set(null, "uvm_test_top", "axi_interface",vif);
I’m not sure how to change the relevant code (read_by_name) of the driver.