RAL methods in model
It is important to understand how methods like read, write, set, get, update, mirror, etc behave for mirrored/ desired value.
The desired value is the value that has to be programmed to the DUT by the testbench.
The mirrored value is the value that captures the DUT register value i.e. current DUT register state. It can get modified in run time based on bus transactions.
- write() method writes the value of the DUT register. It also updates desired and mirrored value
- read() method reads the value of the DUT register and updates desired and mirrored value.
- mirror() method behaves the same as the read() method, additionally it compares the value with mirrored value if check argument = UVM_CHECK. An error is reported if the mirrored value differs from the read value of the DUT.
- get_mirrored_value() gets the mirrored value of the register fields and does not read the actual register in the DUT.
- set() method updates desired value and does not write the register of the DUT. To update the desired value to the DUT register, the update() method can be used.
- get() method reads the desired value and does not read the actual register in the DUT.
- update() method updates desired value to the register in the DUT if there is a difference between desired and mirrored value.
- predict() method updates mirrored and desired value.
- reset() method resets mirrored and desired value.