Dont drive a value to virtual interface in uvm driver


task run_phase(uvm_phase phase);
   my_seq_item req;

   forever begin
      seq_item_port.get_next_item(req);
      begin
        my_vif.write_data <= req.data;
      end
      seq_item_port.item_done();
   end
endtask

my code is above, when run test, it drives sequences to driver via sequencer, but in run_phase of driver i get a error message, it is below.
**Fatal: (SIGSEV) Bad handle or reference.
Fatal error in Task my_agent_pkg/my_driver::run_phase at my_driver.sv Line 72

thank you for answers

In reply to nrllhclb:

It appears that you haven’t properly passed the virtual interface handle my_vif to the driver.

In reply to tfitz:

In reply to nrllhclb:
It appears that you haven’t properly passed the virtual interface handle my_vif to the driver.

Looking to line 72 might show you are assigning there a value to a signal of your virtual interface.

In reply to tfitz:

I did everything right way, but it does not work, if you have an env which works, could you share it to me?

In reply to nrllhclb:

Could you please show what you did. It seems it is not working, i.e. something is missing …
Where do you pas the virtual interface to the config_db and where and how do you retrieve the virtual interface from the config_db.

it works, it is my fault.

env and agent in my vip was not connected in testbase
and
i did not call set/get method of uvm_config_db in testbase.
thanks all of you for answers.