Mirror(Difference In Values)

Hi All,

In one of my register sequences the very first method I am using is get_mirrored_value. There after I am calling get_reset method which I know will return the reset values configured in the uvm_reg_field configure method. I am comparing the results of two method but they are different, So I want to know which value is get_mirrored_value method returning? What is there initially in register model registers?

Thanks in advance.
Shreemant

In reply to shreemant.vats:

Are you sure you’ve called reset() on your register model? If you haven’t, you’ll see 0 for the mirrored valued and the configure reset value returned for get_reset().

In reply to Tudor Timi:

Hi tudor.timi,

Thanks for the reply, that does make the value equal.But I wasn’t getting all registers values as 0’s some were carrying values.Basically they are PCIe registers. My only query is that what does the reg block registers have initially without any operation on them?

Thanks in advance.
Shreemant

In reply to shreemant.vats:

I would expect it to be all 0s, because the m_mirrored field is of type uvm_reg_data_t, which is 2 state and its default value should be 0.

It’s difficult to say why some registers had non-zero values, but maybe you had some calls to predict() going off before reset. You could try setting a breakpoint in do_predict() in uvm_reg_field and see if that was the case.

In reply to Tudor Timi:

Hi tudor.timi,

Thanks for the reply and your time, I will get back to you when I figure it out.

Regards
Shreemant