[UVM]UVM RAL Methods

                                UVM RAL 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

1、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.

2、peek and poke

  • peek() reads the DUT register value using a backdoor
  • poke() writes a value to DUT register using backdoor

3、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.

4、update

  • 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.

5、mirror

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

6、randomize

  • 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.

7、reset

  • reset()  sets the register desired and mirrored value to the pre-defined reset value.
发布了185 篇原创文章 · 获赞 118 · 访问量 4万+

猜你喜欢

转载自blog.csdn.net/gsjthxy/article/details/105276766
今日推荐