Your sequence does not belong to the hierarchy of your class-based testbench. It is simply a transient object that will be generated at any time and disappear at another time.
The uvm_config db has no limitations regarding the directions.
What you are doing in your sequence Looks a Little bit strange, especially
Thanks for pointing out. I didnt know what to put there, so a question mark. My intention is to have a config variable called error_source of type enum in the environment class and use it in my sequence, to decide what sequence to send to sequencer. The value of the error_source is used as a Case switch.Is there any way to implement that?
The line
p_sequencer.fifo.get_peek_export.get(my_req);
OK, I understand. It Looks like you do not understand the mechanism of the uvm_config_db. You do not store variables there. You store simple values of certain types. The value is assiciated with a name. The Name consists of the path and a simple Name (string). In your case the simple name is ‘error_source’. And the path is the concatenation of ‘this’ and an empty string. Where you have the question marks you have to use a local variable where the value will be stored in.
Hi Chr_sue,
We cannot directly use uvm_config_db#(int)::get(this, “”, error_source, ??) in the sequence. Am I correct?
I think it needs to be accessed by replacing m_sequencer instead of “this” in the above statement.
Please correct me if I am wrong.