UVM RAL Register Name Access

Hi,

Suppose I know the partial name of the register or any field of particular register.

Is there any way to get the register name from ral model with any ral methods.
If yes, could you please give the syntax fot the same.

You can use

your_regs.get_registers(all_regs);

get_registers stores all registers in your register_map in the queue all regs;

uvm_reg all_regs[$];
is the declaration of all_regs.

1 Like

Thanks a lot. I have one more question.

so from this line “your_regs.get_registers(all_regs);”
does the <yours_regs> refers to my uvm_reg_block name or the individual reg file name?

also is it mandatory to use uvm_reg all_regs[$] or suppose my registers width is 32 bit so can I use bit [31:0] all_regs[$] ?

your_regs is your register block and not the map.
all_regs are not a simple bit type. Finally you want to do some things with your registers. This is the reason it has to be from type uvm_reg.

Thank you for clarifying it.