Yes, uvm_config_db should be used to set from module and get in class. Config_db class is recommended.