Uvm virtual sequence

Hi,
I came to know virtual sequence is required only when co-ordination of two sequences is required which drives two virtual interfaces. my doubt is when co-ordination is not required , how to drive two drive two different sequences? as sequence needs to be associated with sequence item type, when two different sequences needs to be driven it has to be virtual sequence right even though coordination is not required. ? as it needs to have two different sequence item types. Please clarify if I am wrong.

In reply to srbeeram:

A virtual sequence is simply a sequence that starts other sequences and does not send sequence_items directly to a driver. Thus a virtual sequence does not need to be parameterized to match the sequence_item type of a sequencer or driver. This terminology is left-over from a methodology where this was a separate class type.

You can have a single sequence sending different sequence_item types to the same sequencer as long as they share a common base class type. And any sequence can start other sequences of any class type in addition to sending sequence_items.

You can also have a virtual sequence starting multiple sequences all of the same type to the same sequencer. There is no requirement that have go to different interfaces.

In reply to dave_59:

Hi Dave ,

thanks for the clarification .if a sequence needs to handle apb sequences and usb sequences how to declare it ?as it is not having sequence items to send to the sequencer and I think it is also not parameterized sequence. And we don’t need to declare it as virtual sequence.is it must to declare the class as virtual sequence in this case?

In reply to srbeeram:

https://verificationacademy.com/cookbook/sequences/virtual

In reply to dave_59:

Hi Dave,

Thanks for the reference. But it is not answering my doubts. could you please provide the clarification for the above thread.
and also please provide clarifications for the below.
you mentioned below,

“And any sequence can start other sequences of any class type in addition to sending sequence_items”

without different sequencer and handles to point it ,how normal sequence starts any other sequence of any class type? and different sequencers are there means we need to declare that as virtual.

In reply to srbeeram:

This link I provided shows it starting sequences on a BUS interface and GPIO interface which is no different than any other interface such as apb and usb as you requested. So I’m having trouble understanding what is different about your question versus the page I showed you.

In reply to dave_59:

Hi Dave,

sorry for confusion. My doubt is as mentioned in below pdf, on page 4th if no stimulus co-ordination is required we don’t need virtual interface it is mentioned. does it mean if usb and sata sequences can be started by normal sequence or virtual sequence? because there is no stimulus co-ordination is required between them. if these sequences are started by normal sequence not virtual sequence ,how to start these sequences?

http://www.sunburst-design.com/papers/CummingsDVCon2016_Vsequencers.pdf

In reply to srbeeram:

I think you may be mixing up the terms virtual interface with virtual sequencer. I don’t agree there is ever a “requirement” to use a virtual sequencer—it is a methodology guildiune the Verification Academy does not subscribe to. The only difference between the different methodologies is where the handles to the target sequencers sit.

In reply to dave_59:

below code I declared it as normal sequence not virtual sequence as it is parameterized with type axi_packet and I don’t need co-ordination between usb and sata sequences. could you please clarify whether it is correct ? or it needs to be declared as virtual sequence as sequencer handles are there in it?


class normal_sequence extends uvm_sequence(axi_packet)
usb_packet usb;
sata_packet sata;

usb_sequencer  usb_s;
sata_sequencer  sata_s;

task body ();
usb =usb_packet::type_id::create ("usb",this);
sata =sata_packet::type_id::create("sata",this);

usb.start(usb_s);
sata.start(sata_s);
endtask

endclass