UVM RAL – Access Policies (Part 2)

Understanding how common access types affect desired and mirror values.

Overview

UVM supports 25 different access policies in the configure() function. In this section, we focus on the most commonly used ones and understand how they affect the desired and mirror values.

Remember: Access policy controls only the behavior of the register model, not the RTL hardware.

1. RO – Read Only

Write Operation:
  • Writing to DUT has no effect on desired or mirror.
  • Both variables retain their previous values.
Read Operation:
  • Actual DUT value is read.
  • Both desired and mirror are updated with that value.

Key Point: Writes do not update model values.

2. WO – Write Only

Write Operation:
  • Written value is stored in both desired and mirror.
Read Operation:
  • Read operation generates an error.

Key Point: Writes are allowed, reads are illegal.

3. RW – Read/Write

Write Operation:
  • Written value updates desired and mirror.
Read Operation:
  • DUT value is read.
  • Desired and mirror are updated with read value.

Key Point: Standard register behavior.

4. RC – Read Clear

Write Operation:
  • No effect on desired or mirror.
Read Operation:
  • All bits are cleared in desired and mirror.
  • Does NOT store actual read value.

Key Point: Reading clears the register model.

5. RS – Read Set

Write Operation:
  • No effect on desired or mirror.
Read Operation:
  • All bits are set to 1 in desired and mirror.

Key Point: Reading forces all bits to 1 in model.

6. WC – Write Clear

Write Operation:
  • All bits in desired and mirror are cleared.
  • Actual written value is ignored in model.
Read Operation:
  • Read value from DUT updates desired and mirror.

Key Point: Writing clears model bits.

7. WS – Write Set

Write Operation:
  • All bits are set to 1 in desired and mirror.
Read Operation:
  • DUT value updates desired and mirror normally.

Key Point: Writing forces model bits to 1.

Important Clarification

“No effect on write” means: The write does NOT update desired or mirror values.

“No effect on read” means: The read behaves normally and updates desired and mirror with the value read from DUT.

These two statements have completely different meanings.

Summary
  • RO → Write ignored, read updates model.
  • WO → Write updates model, read illegal.
  • RW → Normal read/write behavior.
  • RC → Read clears model bits.
  • RS → Read sets model bits.
  • WC → Write clears model bits.
  • WS → Write sets model bits.