How to use ...extends uvm_reg_sequence #(uvm_sequence #(uvm_reg_item))?

Hi, I came across the code as the below, when I googling.


class test_seq extends uvm_reg_sequence #(uvm_sequence #(uvm_reg_item));
uvm_reg rg;
...

From here, if I want to use or call above class, then how do I call it?
especially , How do I use #(uvm_sequence #(uvm_reg_item)) ?
and where does uvm_reg come from? I think there is no pointing objection to rg.

In reply to UVM_LOVE:

All your questions are related to the Register Abstraction Layer (RAL). For more details look herer:
https://verificationacademy.com/cookbook/registers

In reply to UVM_LOVE:

It would be helpful if you can provide a link to what you are referring to. It would allow others to understand the context of your question better.

In reply to cgales:

Hi Chuck, I believe he is refering to the definition in the base class library:
class uvm_reg_sequence #(type BASE = uvm_sequence #(uvm_reg_item)) extends BASE

@UVM_LOVE: inmost cases we are parameterizing only the seq_item by specifying to which sequencer the RAL has to be connected.

In reply to chr_sue:

There is a uvm_reg_sequence() defined in the UVM class library, but there is no ‘test_seq’ class defined, so the referenced code was likely found somewhere else.

A user will normally extend uvm_reg_sequence without any parameters since the defaults are usually sufficient. Seeing what this code is trying to accomplish by providing a specialization would help provide further assistance.

In reply to cgales:

This is not completely correct, because you to extend the uvm_reg_sequence with respect to the actual seq_item.