Why is get_config_int not accessible in a ovm_sequence?

Hi,

While trying to access a int in sequence using get_config_int(),

I got a error saying that

“Failed to find ‘get_config_int’ in hierarchical name ‘/get_config_int/$$’.”

After accessing it using the p_sequencer, it worked!!

Please elaborate.

Thanks,
Pratyaksha

get_config_int() is a method of ovm_component, and only available in classes derived from it. ovm_sequence is not derived from ovm_component, but ovm_sequencer is.

The OVM’s configuration mechanism is based on the scopes created by parent/child ovm_component relationships. set_config_int() is also a method of uvm_component that uses the scope of the current component to apply its settings. If you are outside of an ovm_component, then there is a global set_config_int() that is a wrapper for ovm_test_top.set_config_int().

To use get_config_int outside of a component, you must use ovm_test_top.get_config_int(), or in an ovm_sequence, you can use m_sequencer.get_config_int().

By the way, we reccomend that you use get_config_object to get a collection of data, rather than each piece of data individually. See https://verificationacademy.com/uvm-ovm/Ovm/Config/Overview#Configuring_sequences

Hi Dave,
In one of my sequences I am trying to get value for one of the vectors by calling:

for (int i=0; i<4;i++) begin
  ovm_test_top.get_config_int($psprintf("ANA_OVFL_STATUS[%0d]",i),read_data[i] );
end

I am setting this field from one of my components.

set_config_int("*",$psprintf("ANA_OVFL_STATUS[%0d]",int'(m_cfg.m_chan_id/32)),ana_ovfl_mmio);

But i get X from get_config_int call
reporter [m_status_ana_ovfl_read_seq] GOT CONFIG INT FOR ANA_OVFL_STATUS[0] is x
reporter [m_status_ana_ovfl_read_seq] GOT CONFIG INT FOR ANA_OVFL_STATUS[1] is x
reporter [m_status_ana_ovfl_read_seq] GOT CONFIG INT FOR ANA_OVFL_STATUS[2] is x
reporter [m_status_ana_ovfl_read_seq] GOT CONFIG INT FOR ANA_OVFL_STATUS[3] is x

I have even used

for (int i=0; i<4;i++) begin
m_sequencer.get_config_int($psprintf("ANA_OVFL_STATUS[%0d]",i),read_data[i] );
end

But same result.
Please let me know if I am missing something.

Regards

In reply to mahajana:

Is get_config_int returning true or false?