Suggestions for class definition for user_item

Hi ,

I have defined class user_item that would be used in RAL TB setup .

Currently I am confused whether to extend it from uvm_sequence_item OR uvm_reg_item ( which itself extends uvm_sequence_item )

The class user_item would be used in following cases ::

(1) As specialization of uvm_reg_sequence .

    By  default  ::

        class  uvm_reg_sequence  extends  uvm_sequence #( uvm_reg_item ) ; 
User  could  also  specialize  to  user_item  ( which  extends  uvm_sequence_item )  which  is  then  used  as  specialization  of  uvm_sequence .

      Eg : class  my_reg_seq #( type BASE = uvm_sequence#( user_item )  )  extends  uvm_reg_sequence #( BASE );
     

(2) As actual return type of function ’ reg2bus ’ .


       virtual function uvm_sequence_item reg2bus(const ref uvm_reg_bus_op rw);
             user_item   bus_item ;

             bus_item  =  user_item :: type_id :: create( "bus_item" ) ;
             
             //  Assign  properties  of  bus_item  based  on  input  argument  rw 

             return  bus_item ;  //  Actual  return  type 
       endfunction
      
Within  adapter  function  ' reg2bus '  the  actual  return  type  Must  be  extended  type  of  uvm_sequence_item 

which  then  the  UVM  library  passes  to  start_item  N  finish_item .

(3) Within predictor ::

  (a)  Type  parameter  BUSTYPE  receives  bus  transactions  from  monitor .

  (b)  Analysis  Port  specialized  to  uvm_reg_item  is  used  to  broadcast  transactions  received . 

[Q] Should I define class user_item to extend uvm_sequence_item OR uvm_reg_item

     Only  for  the  analysis_port  within  uvm_reg_predictor  there  is  requirement  of  Specialization  of  uvm_reg_item .

     In  other  cases ( (1) , (2) , (3)(a) )  I  could  simply  extend  from  uvm_sequence_item  .

     **Are  there  any  additional  advantages  if  I  were  to  extend  from  uvm_reg_item  ?**