mp_p.cb_master.data <= it.data;
mp_p.cb_master.dvalid <= it.dvalid;
mp_p.cb_master.eot <= it.eot;
forever begin @mp_p.cb_master;
if (mp_p.cb_master.dready || !mp_p.cb_master.dvalid)
break;
end
`uvm_info(“DTI_S_MASTER_DRIVER”, “Driving transaction”, UVM_HIGH);
seq_item_port.item_done();
endtask : drive_write
Problem is that i need this part where the first transaction of the test must have field first set to 1 otherwise i will loose it.
if(it.first) @mp_p.cb_master;
every time i have some delay defined in test (something like #100ns; or at the begining of the test) i have to set field first to 1 to add 1 additional clock delay before set of transactions is sent. And if i dont have it i am missing first transaction of the sequnce. It seems that at same simulation time 1st and 2nd transaction is executed and 1st one is not sent because it is written with 2nd.
Your explanation Sound a Little bit confusing. You shoule never set a delay in your test. This is not needed and might generate Trouble when executing your transactions in your driver.
BTW you are inserting only a delay by 1 clock edge only if it.first is true. Is this correct?
for(int i = 0; i < 3; i++) begin
dti_sWrite(
._sqcr(env.dti_s_master_agnt.sqcr),
._data(100),
._dvalid('0),
._eot('0),
._first('0)
);
end
dti_sWrite function starts sequence on sequencer. In this case sequence contains only one transaction.
In case when i have delay like i posted above #100ns;
Driver only sends 3 transactions instead of 4. So to avoid that i set first to 1:
if(it.first) @mp_p.cb_master;
only for first transaction.
And it happens every time at the beggining of the test or when i have delay like above.
for(int i = 0; i < 3; i++) begin
dti_sWrite(
._sqcr(env.dti_s_master_agnt.sqcr),
._data(100),
._dvalid('0),
._eot('0),
._first('0)
);
end
dti_sWrite function starts sequence on sequencer. In this case sequence contains only one transaction.
In case when i have delay like i posted above #100ns;
Driver only sends 3 transactions instead of 4. So to avoid that i set first to 1:
if(it.first) @mp_p.cb_master;
only for first transaction.
And it happens every time at the beggining of the test or when i have delay like above.