Try:
Previous defined:
<your_reg_model> rm;
function void reg_write(bit [31:0] adress, bit[31:0] data);
uvm_reg rg;
uvm_status_e status;
uvm_reg_data_t wdata;
rg = rm.get_reg_by_offset(adress); // Look up the register in the register model by its address
rg.write(status, wdata’(data), .parent(this);
endfunction: reg_write
And something similar for the read.
Note that this all rather defeats the purpose of using the register model, but should get you going for legacy code that is dealing in addresses etc.