How to read all the register in RAL model using reg_map?

In reply to nayan2208:

Hi
Following code may helpful to you.

 // Declaration
 uvm_reg_map   maps[$];
 uvm_reg       regs[$];
 uvm_status_e  status;
 
 // Getting number of maps associated with block handle
 blk.get_maps(maps);
 foreach(maps[d])
 begin
     regs.delete();
     // Getting associated total registers with map
     maps[d].get_registers(regs);
     foreach(regs[k])
     begin
       regs[k].read(status, rd_val, maps[d]);
       // Do necessary operation based on read value
     end
 end

Regards,
Mitesh Patel