The configuration API is hierarchical by nature. Each value set in the database has a hierarchical “range” over which it applies.
When you attempt to get a value, OVM checks to see if the requester’s place in the hierarchy matches the range specified when the value was set. That means that the requester must HAVE a place in the hierarchy. The only things that have a place in the hierarchy are those objects that inherit from ovm_component, so those objects are the only ones that can get a config value.
I agree that it would be very useful to get config values from inside scenarios and sequences. While you cannot current do that directly, there is a fairly simple work-around, by getting the value through the sequencer:
From within your sequence, do this:
p_sequencer.get_config_int(“PARAMNAME”,val);
When you set the configuration value, specify a path that includes the sequencer.
For scenarios, you can do a similar thing:
m_scenario_controller.get_config_int(…);