Why the do_write() in uvm_reg.sv mask all the bits which is larger than the m_n_bits?

Hi guys, I am confused about one feature in the uvm_reg.sv

In the do_write(rw) function ,it will mask all the bits which is larger than the m_n_bits.
For the m_n_bits , it is the largest valid bits in the register.




task uvm_reg::do_write(uvm_reg_item rw);
...
rw.value[0] &= ((1 << m_n_bits) -1 );
value = rw.value[0];
...
endtask

But, we should test the bits is not written in the register. And the code in the uvm_reg.svh made it impossible.

Is there anyone know the reason for that?