uvm_reg中test sequence 之 uvm_reg_bit_bash_seq

https://verificationacademy.com/verification-methodology-reference/uvm/docs_1.1a/html/files/reg/sequences/uvm_reg_bit_bash_seq-svh.html

This section defines classes that test individual bits of the registers defined in a register model.

Contents

Bit Bashing Test SequencesThis section defines classes that test individual bits of the registers defined in a register model.
uvm_reg_single_bit_bash_seqVerify the implementation of a single register by attempting to write 1’s and 0’s to every bit in it, via every address map in which the register is mapped, making sure that the resulting value matches the mirrored value.
uvm_reg_bit_bash_seqVerify the implementation of all registers in a block by executing the uvm_reg_single_bit_bash_seq sequence on it.

uvm_reg_single_bit_bash_seq

Verify the implementation of a single register by attempting to write 1’s and 0’s to every bit in it, via every address map in which the register is mapped, making sure that the resulting value matches the mirrored value.

If bit-type resource named “NO_REG_TESTS” or “NO_REG_BIT_BASH_TEST” in the “REG::” namespace matches the full name of the register, the register is not tested.

uvm_resource_db#(bit)::set({"REG::",regmodel.blk.r0.get_full_name()},
                           "NO_REG_TESTS", 1, this);

Registers that contain fields with unknown access policies cannot be tested.

The DUT should be idle and not modify any register durign this test.

Summary

uvm_reg_single_bit_bash_seq
Verify the implementation of a single register by attempting to write 1’s and 0’s to every bit in it, via every address map in which the register is mapped, making sure that the resulting value matches the mirrored value.
Class Hierarchy

uvm_reg_sequence#(uvm_sequence#(uvm_reg_item))

uvm_reg_single_bit_bash_seq

Class Declaration
class uvm_reg_single_bit_bash_seq extends uvm_reg_sequence #(
   uvm_sequence #(uvm_reg_item)
)
Variables 
rgThe register to be tested

Variables

rg

uvm_reg rg

The register to be tested

uvm_reg_bit_bash_seq

Verify the implementation of all registers in a block by executing the uvm_reg_single_bit_bash_seq sequence on it.

If bit-type resource named “NO_REG_TESTS” or “NO_REG_BIT_BASH_TEST” in the “REG::” namespace matches the full name of the block, the block is not tested.

uvm_resource_db#(bit)::set({"REG::",regmodel.blk.get_full_name(),".*"},
                           "NO_REG_TESTS", 1, this);

Summary

uvm_reg_bit_bash_seq
Verify the implementation of all registers in a block by executing the uvm_reg_single_bit_bash_seq sequence on it.
Class Hierarchy

uvm_reg_sequence#(uvm_sequence#(uvm_reg_item))

uvm_reg_bit_bash_seq

Class Declaration
class uvm_reg_bit_bash_seq extends uvm_reg_sequence #(
   uvm_sequence #(uvm_reg_item)
)
Variables 
modelThe block to be tested.
reg_seqThe sequence used to test one register
Methods 
bodyExecutes the Register Bit Bash sequence.
do_blockTest all of the registers in a a given block
reset_blkReset the DUT that corresponds to the specified block abstraction class.

Variables

model

The block to be tested.  Declared in the base class.

uvm_reg_block model;

reg_seq

protected uvm_reg_single_bit_bash_seq reg_seq

The sequence used to test one register

Methods

body

virtual task body()

Executes the Register Bit Bash sequence.  Do not call directly.  Use seq.start() instead.

do_block

protected virtual task do_block(uvm_reg_block blk)

Test all of the registers in a a given block

reset_blk

virtual task reset_blk(uvm_reg_block blk)

Reset the DUT that corresponds to the specified block abstraction class.

Currently empty.  Will rollback the environment’s phase to the reset phase once the new phasing is available.

In the meantime, the DUT should be reset before executing this test sequence or this method should be implemented in an extension to reset the DUT.

  • 1
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值