My requirement is that how the driver knows whether the next sequence item is available/not while executing the current sequence item.
Demonstrating with the example for easy understanding.
My sequence code looks like this :
class my_seq extends ovm_sequence();
task body();
start_item();
---
---
finish_item()
or
`ovm_do_on_with().
endtask
endclass
The driver code looks like this:
class driver extends ovm_driver();
task run_phase()
forever
begin
sequence_item_port.get_next_item(req)
drive_to_dut();
sequence_item_port.item_done()
end
endtask
task drive_to_dut;
// here i need to know whether next item is available in sequencer/not.
//if next item is not available
if.a = {req.a,0};
//if next item is available. i have to get next item and then
if.a = {req.a , req.b};req.a = current sequence item and req.b is next sequence item
endtask
endclass
Thanks,
-Murali