What is the parameter type for the sequence class? Is it the name of the data_transaction class or the handle to the class?

Suppose I have a sequence_item class as follows:


class my_seq_item extends uvm_sequence_item;
     //rand variables declared here
    `uvm_object_utils(my_seq_item)
     //remaining code here
endclass

And I have a sequence class as follows:

 class my_seq extends uvm_sequence #('type');
             `uvm_object_utils(my_seq)
       my_seq_item m_item;
       task body;
         //create object
         //remaining code here
      endtask
endclass

  1. Is the ‘type’ here ‘my_seq_item’ or ‘m_item’? (i.e. is it the name of the class or the class handle?)

  2. Also, is there anything wrong with my code or am I missing something? Just wanted to check if my general understanding of sequence and sequence_item classes were correct.

In reply to vk7715:

class my_seq extends uvm_sequence #(my_seq_item);

my_seq_item is a class type name. m_item is a class variable name that can store a class handle.

There’s no need to declare a class variable m_item as uvm_sequence already declares a class variable req that is parameterized by the class type.

In reply to dave_59:

Hi Dave, can you please help clarify what “class type” is?