In my TB, I am setting the env_config in the test using uvm_config _db set. In the sequence I am trying to get this env_config handle using uvm_config_db get, but I am getting compilation error saying “formal and actual do not have assignment compatible data types (expecting datatype compatible with ‘class uvm_pkg::uvm_component’ but found ‘class obs_config_env_pkg::obs config sequence’ instead)”.
I am not understanding why this error is coming since sequence is also an object and the env cfg is also extended from uvm_object.
You shouldn’t try to get() anything from the uvm_config_db() in a sequence since a sequence is an object and doesn’t have a location in the hierarchy that get() can use.
Instead, you should assign the env_config handle from the test when the sequence is created, prior to starting the sequence.