EETOP 创芯网论坛 (原名:电子顶级开发网)

标题: UVM寄存器模型能否对寄存器中的某个域单独操作 [打印本页]

作者: litengmu64    时间: 2020-11-10 21:58
标题: UVM寄存器模型能否对寄存器中的某个域单独操作
使用UVM寄存器模型中的write函数只能对整个寄存器整体操作,有没有办法只对其中某个域进行操作

作者: chip_z    时间: 2020-11-11 10:25
set和update配合操作。
set修改域的期望值,update比较寄存器期望值和实际值,若不同则修改硬件实际值。
作者: litengmu64    时间: 2020-11-11 14:08


   
chip_z 发表于 2020-11-11 10:25
set和update配合操作。
set修改域的期望值,update比较寄存器期望值和实际值,若不同则修改硬件实际值。 ...


if I want to read the register filed, what method could I used?  I see the regmode task it has get(), but actually the get method is just read the model value not the DUT value

作者: gaurson    时间: 2020-11-11 18:17
读取DUT的值,不是有read()吗?
作者: 年轻的韭菜    时间: 2020-11-12 10:11
二楼说错了吧,set设置期望值,和镜像值作比较,而不是实际值。所以你set,然后update不一定会实际产生写寄存器的行为,可以先read下更新镜像值(如果镜像值改变了,且使用auto_predict方式),然后再set,update.
https://blog.csdn.net/Holden_Liu/article/details/108993707
作者: 张崇钰    时间: 2020-11-12 14:17
本帖最后由 张崇钰 于 2020-11-12 14:18 编辑


   
litengmu64 发表于 2020-11-11 14:08
if I want to read the register filed, what method could I used?  I see the regmode task it has get ...


read the DUT value by task mirror(), now the value of the register model is consistent with the design value, then you can get the field value of register model by task get()





欢迎光临 EETOP 创芯网论坛 (原名:电子顶级开发网) (https://bbs.eetop.cn/) Powered by Discuz! X3.5