Making a sequence with pre_body start from test class

  1. I try to understand why you are starting a sequence in the pre_body task. I do not see any reason for this.
    Suppose you have a pre-existing sequence (which in my case is in my_seq as mentioned in the example) and later on you need to add a certain set of tasks which needs to be done prior to this pre-existing sequence. Can you please suggest me a way other than that described above. Please do understand that i have 1000s of such pre-existing sequences and it will be impossible for me to manually change each and every sequence that i have. With the method mentioned above in the example, all i need to do will be to extend my_seq from a base sequence class. This base sequence class will have the additional tasks in its pre_body(). I would also like to know if there is something that restricts me from starting a sequence in pre_body (Please point me to the reference if we have such a restriction).

  2. A sequencer is executing sequences and not seq_items, but the sequence is generating sequence items. Create s sequence instead of your item. This will work.
    A sequencer can execute a sequence item. There is no doubt on this. That is why in UVM we have set_sequencer method as part of uvm_sequence_item. The sequencer just requires a sequence item. It doesn’t matter whether the sequence generates this sequence item or you manually create it. All that should matter is the sequence_item should be compatible with the sequencer and it can push this sequence item to the driver. I do not agree that i should be restricted in manually creating the sequence items.

Regards
abdulhafiz.oa