UVM RAL Methods

Register Access Methods

UVM RAL library classes have builtin methods implemented in it, these methods can be used for accessing the registers. These methods are referred to as Register Access Methods.

The register model has methods to read, write, update and mirror DUT registers and register field values, these methods are called API (application programming interface).

APIs can either use front door access or back door access to DUT registers and register fields.

  • Front door access involves using the bus interface and it is associated with the timing
  • Back door access uses simulator database access routines and this happens in zero simulation time

API methods

read and write

  • read() returns and updates the value of the DUT register.
  • write() writes and updates the value of the DUT register.
  • both read and write can be used for front door access or back door access.
  • In read or write value will be updated by the bus predictor on completion of the front door read or write cycle and automatically in back door read or write cycle.
UVM RAL FrontDoor Access
UVM RAL FrontDoor Access
UVM RAL BackDoor Access
UVM RAL BackDoor Access

peek and poke

  • peek() reads the DUT register value using a backdoor
  • poke() writes a value to DUT register using backdoor
UVM RAL Peek Poke
UVM RAL Peek Poke

set and get

  • set() and get() writes and reads directly to the desired value.
  • set and get methods operates on the register model desired value, not accesses to DUT register value. The desired value can be updated to the DUT using the update method.


  • if there is a difference between desired value and mirrored value,update() will initiate a write to register.update method can be used after the set method.
UVM RAL Update
UVM RAL Update


  • mirror() reads the updated DUT register values. The mirroring can be performed in the front door or back door( peek() ).
UVM RAL Mirror
UVM RAL Mirror


  • randomize() randomizes register or field values with or without constraints.as per the requirement register values can be modified in post_randomize().after randomization update() can be used to update the DUT register values.
UVM RAL Randomize
UVM RAL Randomize


reset()  sets the register desired and mirrored value to the pre-defined reset value.

Method Front door access Back door access
read() RF RF
write() RF RF
peek() RF RF
poke() RF RF
set() RF RF
get() RF RF
update() BR BR
mirror() BR BR
randomize() BRF BRF
reset() BRF BRF

register access methods at a different level
– Block  – Register  – Field

❮ Previous Next ❯