# Change mirror value of a register field before running uvm\_reg\_hw\_reset\_seq

**URL:** <https://verificationacademy.com/forums/t/change-mirror-value-of-a-register-field-before-running-uvm-reg-hw-reset-seq/33567>\
**Category:** UVM\
**Tags:** UVM, predict, uvm\_reg\_hw\_reset\_seq, get\_mirrored\_value\
**Created:** [October 5, 2017, 2:11pm UTC](https://verificationacademy.com/forums/t/change-mirror-value-of-a-register-field-before-running-uvm-reg-hw-reset-seq/33567 "2017-10-05T14:11:04Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![birenkumar](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/b/a4c791/32.png) [@birenkumar](https://verificationacademy.com/forums/u/birenkumar)\
**Post date:** [October 6, 2017, 2:17pm UTC](https://verificationacademy.com/forums/t/change-mirror-value-of-a-register-field-before-running-uvm-reg-hw-reset-seq/33567/3 "2017-10-06T14:17:00Z")

</div>

_In reply to [chr\_sue](https://verificationacademy.com/forums/t/change-mirror-value-of-a-register-field-before-running-uvm-reg-hw-reset-seq/33567/2):_

My intention is to change the mirrored value (which is 'h0 after reset) to the value which I write (as 'h3 in my Top Env) before running the hw\_reset\_seq.

So that I can avoid this Error :

> reporter [RegModel] Register “regmodel.REGBLOCK.RSTCFG” value read from DUT (0x0000000000000003) does not match mirrored value (0x0000000000000000)

So, basically my Idea is to override the mirrored value just after the read and just before the comparison takes place inside the hw\_reset\_seq for this register.  
Hence, I am calling the predict() method inside the post\_read() method.

Hope you got what I am trying to achieve here… :)

There might be one question in your mind that why am I writing to that register from the Top Env. The answer is that my Env needs to have that register written with that value ('h3) due to some setup requirement.

---

_[View the full topic](https://verificationacademy.com/forums/t/change-mirror-value-of-a-register-field-before-running-uvm-reg-hw-reset-seq/33567)._
