Could not find do_copy member function in uvm_sequence_item

In the following code segment (from UVM cook book of verification academy), super.do_copy seems to referring to ‘do_copy’ of uvm_sequence_item’. But I could not find ‘do_copy’ in the uvm_sequence_item’s member functions.

class apb_seq_item extends uvm_sequence_item;

extern function void do_copy(uvm_object rhs);

endclass:apb_seq_item

function void apb_seq_item::do_copy(uvm_object rhs);

super.do_copy(rhs);

endfunction:do_copy

It’s in uvm_object

In reply to dave_59:

But won’t it execute the ‘do_copy’ of uvm_transaction with the following code (i.e. till line number 618)?

function void uvm_transaction::do_copy (uvm_object rhs);
607 uvm_transaction txn;
608 super.do_copy(rhs);
609 if(rhs == null) return;
610 if(!$cast(txn, rhs) ) return;
611
612 accept_time = txn.accept_time;
613 begin_time = txn.begin_time;
614 end_time = txn.end_time;
615 initiator = txn.initiator;
616 stream_handle = txn.stream_handle;
617 tr_handle = txn.tr_handle;
618 record_enable = txn.record_enable;
619 endfunction

In reply to payyattil:

I think you do not understand how super. works with inheritance. It just means to resolve the identifier as there was no local declaration of that identifier. So it searches the class inheritance hierarchy starting from the class the current class was extended from.

In reply to dave_59:

Class hierarchy seems to be uvm_void<-uvm_object<-uvm_transaction-<uvm_sequence_item. As ‘do_copy’ is not resolved at uvm_sequence_item level, ‘do_copy’ of uvm_transaction will be taken up. Isn’t it?

In reply to payyattil:

So does that answer your question?

In reply to dave_59:

Yes