Accessing ovm configuration detail in test bench top

Hello,

Please let me know, is it possible to get ovm configuration details in the test bench top (either using get_config_* or in other way) which is set inside ovm sequence using set_config_*.

Thanks
Suresh

  1. Assuming test bench top in your case is top level environment:

As in the top level environment, the sequence object is created, so you can access particular variable in top env like abject.variable.

example:

class test;
int b;
sequence sequence_h;
function build_phase;
sequence_h = sequence::type_id::create(sequence_h);
endfunction;
function run_phase;
b = sequence_h.a;//variable in sequence
endfunction
endclass

  1. Assuming test bench top in your case is top level module:

In sequence if you have config variable “a”.If you want to pass that to the top level module, then by using the uvc component you can do it.

sequence:

env.agent.mon.a = this.a;

in Monitor the variavble "a " is connected to interface . so interface signals can be accessed at the top module.

OR

tb_top.a = this.a // not advisible.

I think this helps,and if anyone knows better way or other ways please let me know.

Thanks,
-Murali