How to implement UVM_PUSH_DRIVER and UVM_PUSH_SEQUENCER?

Hi,

Can anybody please guide me how to implement a push sequencer and push driver ?

I am trying to create an active agent which works on push mechanism.
In this process, i am not understanding on how to write a sequence compatible to it. I have few question regarding this.

How wait_for_grant() gets blocked ?
Instead of get_next_item() in driver, we need to put the seq_item from sequencer. Do we need to implement put task in driver ?(req_port, req_export)
What is the replacement for item_done ?

Please help me get clarity.
Thanks in advance.

-Surya

In reply to SuryaAnilKumar:

You should really check if you need this mechanism. I believe it is not useful to have a mixture of the push implementation with the standard implementation.

The oush mechanism works like this:

  • Sequence initiates transactions and sends them to driver
  • Driver must provide blocking put task
typedef uvm_push_sequencer #(my_transaction) my_sequencer;

class my_agent extends uvm_agent;
  my_sequencer  m_sequencer;
  my_driver     m_driver;
  ...
  function void connect_phase(uvm_phase phase);
    ...
    m_sequencer.req_port.connect(m_driver.req_export);

class my_driver extends uvm_push_driver #(my_transaction);
  ...
  virtual my_if vif;
  local bit busy;
 
  virtual task put(REQ item);
    sdata = item.data;
    busy = 1;
    wait(!busy);
  endtask

task do_idle;
  vif.sig1 <= 0;
  vif.sig2 = 1'b1;
  @(posedge vif.clk);
endtask

task do_send is implementing the interface protocol.