sathyakiran.p Posted April 23, 2014 Report Share Posted April 23, 2014 Following is the example class my_sequence extends uvm_sequence... string file_name; `uvm_object_utils_begin(mysequence) `uvm_field_string(file_name,UVM_DEFAULT) `uvm_object_utils_end endclass class basic_test extends from uvm_test function build_phase(..) set_config_string("*", "file_name", abc.txt); endfunction endclass.. I am passing file_name(abc.txt) from test with set_config_string, but, it is not taking effect. I did the same thing in driver. it worked well. does UVM supports, overriding local variables in sequence. Please let me know... Thanks, Satya Quote Link to comment Share on other sites More sharing options...
David Black Posted April 23, 2014 Report Share Posted April 23, 2014 Sequences are uvm_object's; whereas, the driver is a uvm_component. The field automation macros automatic configuration fetching works due to super.build_phase automation. You will need to do two things: Add the following in your sequence: `declare_p_sequencer(SEQR_TYPE) In function pre_start add: uvm_config_db#(string)::get(p_sequencer,"","file_name",file_name); Notice that the information is tied to the sequencer that the sequence is running on. tudor.timi 1 Quote Link to comment Share on other sites More sharing options...
sathyakiran.p Posted April 24, 2014 Author Report Share Posted April 24, 2014 Thanks alot david. It is working fine.. one small correction `declare_p_sequencer(SEQR_TYPE) => `uvm_declare_p_sequencer(SEQR_TYPE), SEQR_TYPE is sequencer name. Regards, Satya Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.