# UVM register model: strange uvm\_error message

**URL:** <https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512>\
**Category:** UVM\
**Tags:** uvm-register-sequences, UVM, error, UVM-Register-Built-in-sequence, UVM-system-verilog\
**Created:** [April 1, 2015, 9:30am UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512 "2015-04-01T09:30:19Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mustafa](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@Mustafa](https://verificationacademy.com/forums/u/Mustafa)\
**Post date:** [April 1, 2015, 9:30am UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/1 "2015-04-01T09:30:19Z")

</div>

Hello,  
I get the following error when running the sequence uvm\_reg\_bit\_bash\_seq  
UVM\_ERROR verilog\_src/uvm-1.1d/src/reg/sequences/uvm\_reg\_bit\_bash\_seq.svh(175): rgm\_seq.reg\_single\_bit\_bash\_seq [uvm\_reg\_bit\_bash\_seq] Writing a 0 in bit #0 of register “spi\_rm.reg\_0x0” with initial value 'h0000000000000001 yielded 'h0000000000000000 instead of 'h0000000000000001

The message states a correct action, writing 0 in bit #0 with initial value 'h01 yielded 'h00. So why does the sequence expect the value to be 'h01 instead of the correct one, which is 'h00 ?

Thanks

---

<div class="post-metadata">

**Author:** ![Tudor\_Timi](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/tudor_timi/32/1897_2.png) [@Tudor\_Timi](https://verificationacademy.com/forums/u/Tudor_Timi)\
**Post date:** [April 1, 2015, 12:05pm UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/2 "2015-04-01T12:05:55Z")

</div>

_In reply to [Mustafa](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512):_

Are you sure the field isn’t declared as read-only?

---

<div class="post-metadata">

**Author:** ![Mustafa](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@Mustafa](https://verificationacademy.com/forums/u/Mustafa)\
**Post date:** [April 1, 2015, 12:32pm UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/3 "2015-04-01T12:32:06Z")

</div>

_In reply to [Tudor Timi](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/2):_

Yes, I’m sure  
By the way for “RO” fields a message similar to this may be displayed normally, but as an uvm\_info not uvm\_error as in my case.  
i.e a an observed write transaction followed by an observed read transaction with no value change  
In my case, the uvm\_error message itself has contradiction

---

<div class="post-metadata">

**Author:** ![Mustafa](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@Mustafa](https://verificationacademy.com/forums/u/Mustafa)\
**Post date:** [April 1, 2015, 12:57pm UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/4 "2015-04-01T12:57:50Z")

</div>

_In reply to [Mustafa](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/3):_

The problem is for all “RW” fields  
Another example:  
UVM\_ERROR verilog\_src/uvm-1.1d/src/reg/sequences/uvm\_reg\_bit\_bash\_seq.svh(175) @ 143600000000: rgm\_seq.reg\_single\_bit\_bash\_seq [uvm\_reg\_bit\_bash\_seq] Writing a 1 in bit #1 of register “spi\_rm.reg\_0x27” with initial value 'h0000000000000020 yielded 'h0000000000000022 instead of 'h0000000000000020

What is stated is correct, so why does it consider it as an error?

---

<div class="post-metadata">

**Author:** ![Vinay\_Jain](https://verificationacademy.com/forums/user_avatar/verificationacademy.com/vinay_jain/32/3037_2.png) [@Vinay\_Jain](https://verificationacademy.com/forums/u/Vinay_Jain)\
**Post date:** [April 2, 2015, 5:48am UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/5 "2015-04-02T05:48:14Z")

</div>

_In reply to [Mustafa](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/4):_

@Mustafa,

```verilog
UVM_ERROR verilog_src/uvm-1.1d/src/reg/sequences/uvm_reg_bit_bash_seq.svh(175): rgm_seq.reg_single_bit_bash_seq [uvm_reg_bit_bash_seq] Writing a 0 in bit #0 of register "spi_rm.reg_0x0" with initial value 'h0000000000000001 yielded 'h0000000000000000 instead of 'h0000000000000001

```

Only reason sequence throwing message if reg\_0x0 bit#0 is RO. Check it in your simulation and regfile if bit#0 is RO.

Sometime back my team also used to get such error, finally we found that access\_type in regfile is different than what it was in DUT.

BTW, please use code tags for better reading :)

---

<div class="post-metadata">

**Author:** ![Mustafa](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/m/f19dbf/32.png) [@Mustafa](https://verificationacademy.com/forums/u/Mustafa)\
**Post date:** [April 2, 2015, 9:57am UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/6 "2015-04-02T09:57:34Z")

</div>

_In reply to [Vinay Jain](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/5):_

Hi Vinay Jain,  
I appreciate it if we investigate the message again.  
It says:

```auto
writing 0 in bit #0 of a register with initial value 'h01 yielded 'h00

```

which means in the RTL, the register is RW.  
I’ve checked the register classes and made sure the field is defined as “RW”. Actually the whole register’s fields are defined as “RW”. So why the sequence expects the result to be 'h01 instead of the correct one 'h00 !

Thanks

---

<div class="post-metadata">

**Author:** ![DhavalPandya](https://verificationacademy.com/forums/letter_avatar_proxy/v4/letter/d/5f9b8f/32.png) [@DhavalPandya](https://verificationacademy.com/forums/u/DhavalPandya)\
**Post date:** [November 28, 2017, 8:19am UTC](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/7 "2017-11-28T08:19:53Z")

</div>

_In reply to [Mustafa](https://verificationacademy.com/forums/t/uvm-register-model-strange-uvm-error-message/30512/6):_

Hi Mustafa,

Did you find solution for this issue ?

Because I am also facing same issue. The field is RW, even though it is giving such error.

Regards,  
Dhaval
