How to pass sequence items to sequencer

Hi,I have the following sequence item and sequencer. I want to pass sequence item value to the sequencer. How can we do it in a test case? These sequence item and sequencer are in BFM package. In this case, I want to give values to the src variable in sequence item from my test case, which eventually goes to sequencer, how can we do it?
sequence item:

`define WIDTH 4
class TFB_Bfm_input_msg extends ovm_sequence_item ;
 
  rand bit [`WIDTH-1:0] src;
  
  function new(string name="");
	super.new(name);
    endfunction : new
 
  `ovm_object_utils_begin(TFB_Bfm_input_msg)
     `ovm_field_int (src, OVM_DEFAULT)
  `ovm_object_utils_end

endclass : TFB_Bfm_input_msg

Sequencer:

class TFB_Bfm_sequencer extends ovm_sequencer #(TFB_Bfm_input_msg);

    `ovm_sequencer_utils(TFB_Bfm_sequencer)

    string name;

    function new(string name, ovm_component parent);
	super.new(name, parent);
	this.name = name;
	`ovm_update_sequence_lib_and_item(TFB_Bfm_input_msg)
    endfunction : new
endclass : TFB_Bfm_sequencer

In reply to bathina.ravi:
You cannot set individual field variables - the sequence item variables are set through randomization. About the only thing you could do is extend TFB_Bfm_input_msg into another class that constrains src with the value you want, and do a factory override in your test to selected the extended item.

But it would be much easier to write your own sequence that sets the sequence_item variable by reading the config_db before finish_item() sends the sequence_item to the driver.

Also, both theovm_sequencer_util and ovm_update_sequence_lib_and_item macros have been removed from the UVM.

In reply to dave_59:

Hi Dave, Thanks for the quick reply.
These sequence item and sequencer are in the package, I can’t modify these classes.

In my test case, I have imported the package and instantiated the sequence item class only and I did the following assignment to the variable.

TFB_Bfm_pkg::TFB_Bfm_input_msg i_TFB_Bfm_input_msg;
i_TFB_Bfm_input_msg = TFB_Bfm_input_msg::type_id::create (“i_TFB_Bfm_input_msg”);
i_TFB_Bfm_input_msg.src = 4’hf;

Is this passes the src value “f” to the sequencer?
Should I need to instantiate the sequencer class also?

In reply to bathina.ravi:

You need to investigate how your testbench starts sequences. A sequence must be started on a sequencer which sends a sequence_item to a driver.

If it uses a default sequence from the sequence library, then the only way to set the value of a particular field in an item is with an override.

But I’d recommend disabling the default sequence (by setting the sequencer’s “count” field to 0, and creating starting your sequence explicitly in your test.