Limitation of set/get_config*?

Hi All,

I have tried to set the value of an integer to be used in my ovm_sequence from the ovm_test.:confused:

Am getting following error from Questa 6.3f:

(vlog-7027) Hierarchical reference (‘get_config_int’) not allowed from within a package.

Whether I can’t use get/set_config* in sequence/test?? Only in ovm_components???

Please give me your suggestions.:)

Thanks in advance

TVAR

Hi,

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(…);

-Kurt

Hi Kurtz,

thanks for the workaround.

It has worked very well in place.

Regards
TVAR