Providing the RAL with protocol layer implemented with virtual sequence/sequencer

Question regarding the usage of virtual sequencer for protocol layer adapter for uvm_ral .
We have some custom implementation of AXI functionality by incorporating sub-agents for each AXI channel , so the full functionality is not actually agent but virtual sequence/sequencer manipulating the channel sequenes based on request (write/read for simplicity) . We don’t have AXI transaction as sequence item and virtual sequencer is not associated with any driver .

  1. So for uvm_adapter should I create a new bus_item to support reg2bus task ?
  2. Setting my regmodel with
    regmodel.default_map.set_sequencer(my_virt_sequencer, my_ral_adapter);
    when not having the actual driver providing the high level driving how the my_virt_sequencer should take care of the write/read register request ?
    Should I extend get_next_item() task in my virtual sequencer to get the seq_item (from the first qestion) and service it with the channel sub-sequences ?
axi_item b;
my_virt_sequencer.get_next_item(b);
wr_addr_seq.AWADDR = b.addr ;
wr_addr_seq.start(my_virt_sequencer.wr_addr_seqR);
wr_data_seq.WDATA = b.wdata;
wr_data_seq.start(my_virt_sequencer.wr_data_seqR);
my_virt_sequencer.item_done();

In case of read request how the return data should be propagated back to req sequence ?

I believe you have a wrong understanding of the virtual sequencer. A virtual sequencer is NOT creating any seq_items itself. It is orchestrating the local sequencers. You cannot use a virtual sequencer when calling the set_sequencer method. You need a local sequencer to do that.

1 Like