Get config_db to uvm_object

Hi all

i have a class called config which is of type uvm_component and i am setting it in the uvm_test → as we know which is of type uvm_component
now i wanted to get the config class to my uvm_sequence - how can i do it?
i know we cant get using config_db get method which is only for exchange between uvm_components

And the reason why i wanted to get config is → ill generate a packet say → `uvm_do_with(req,{req.payload.size() = config.abc(req.packet)); where packet is a variable in seq_item of type bit [2:0] packet and payload is a dynamic array in my seq_item and abcis a function in my config gives different sizes by doing some calculations basing on generated packet
Can anyone help?

The uvm_config_db is not only for exchange between uvm_components. It just is easier to take advantage of the full pathnames constructed by the component hierarchy. See this link on how to configure sequences.

And your config class does not need to be derived from uvm_component. Only derive from that when you need access to the phasing methods or hierarchical structures.

Got it @dave_59
Thanks for the help