[UVM]寄存器模型中提供的API

UVM寄存器模型中提供的API

       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.

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

元直数字电路验证

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值