Hi,
I am trying to apply reset from my driver, but I see that the run and reset phase are getting executed in parallel.
How to make use of reset phase ? and what is the difference between run and main phase ?
class simpleadder_driver extends uvm_driver #(simpleadder_transaction);
`uvm_component_utils(simpleadder_driver)
virtual simpleadder_if vif;
...
...
...
task run_phase(uvm_phase phase);
begin
simpleadder_transaction sa_tx;
forever
begin
seq_item_port.get_next_item(sa_tx);
@(negedge vif.sig_clock);
vif.sig_ina = #0 sa_tx.ina;
vif.sig_inb = #0 sa_tx.inb;
vif.sig_en_i = #0 1'b1;
vif.operation = #0 sa_tx.operation_sel;
`uvm_info("DRIVER", "run phase execution", UVM_MEDIUM)
seq_item_port.item_done();
end
end
endtask
task reset_phase(uvm_phase phase);
phase.raise_objection(this);
vif.sig_rst = 1'b1;
#5;
vif.sig_rst = 1'b0;
vif.sig_ina = 16'b0;
vif.sig_inb = 16'b0;
vif.operation = 2'bxx;
`uvm_info("DRIVER", "Reset phase execution", UVM_MEDIUM)
#20 vif.sig_rst = 1'b1;
phase.drop_objection(this);
endtask: reset_phase
endclass : simpleadder_driver