Memory Walking-Ones Test Sequences

This section defines sequences for applying a “walking-ones” algorithm on one or more memories.

Contents
Memory Walking-Ones Test SequencesThis section defines sequences for applying a “walking-ones” algorithm on one or more memories.
uvm_mem_single_walk_seqRuns the walking-ones algorithm on the memory given by the mem property, which must be assigned prior to starting this sequence.
uvm_mem_walk_seqVerifies the all memories in a block by executing the uvm_mem_single_walk_seq sequence on every memory within it.

uvm_mem_single_walk_seq

Runs the walking-ones algorithm on the memory given by the mem property, which must be assigned prior to starting this sequence.

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

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

The walking ones algorithm is performed for each map in which the memory is defined.

for (k = 0 thru memsize-1)
  write addr=k data=~k
  if (k > 0) {
    read addr=k-1, expect data=~(k-1)
    write addr=k-1 data=k-1
  if (k == last addr)
    read addr=k, expect data=~k
Summary
uvm_mem_single_walk_seq
Runs the walking-ones algorithm on the memory given by the mem property, which must be assigned prior to starting this sequence.
Class Hierarchy
uvm_reg_sequence#(uvm_sequence#(uvm_reg_item))
uvm_mem_single_walk_seq
Class Declaration
class uvm_mem_single_walk_seq extends uvm_reg_sequence #(
    uvm_sequence  #(uvm_reg_item)
)
Variables
memThe memory to test; must be assigned prior to starting sequence.
Methods
newCreates a new instance of the class with the given name.
bodyPerforms the walking-ones algorithm on each map of the memory specifed in mem.

mem

uvm_mem mem

The memory to test; must be assigned prior to starting sequence.

new

function new( string  name  =  "uvm_mem_walk_seq" )

Creates a new instance of the class with the given name.

body

virtual task body()

Performs the walking-ones algorithm on each map of the memory specifed in mem.

uvm_mem_walk_seq

Verifies the all memories in a block by executing the uvm_mem_single_walk_seq sequence on every memory within it.

If bit-type resource named “NO_REG_TESTS”, “NO_MEM_TESTS”, or “NO_MEM_WALK_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_MEM_TESTS", 1, this);
Summary
uvm_mem_walk_seq
Verifies the all memories in a block by executing the uvm_mem_single_walk_seq sequence on every memory within it.
Class Hierarchy
uvm_reg_sequence#(uvm_sequence#(uvm_reg_item))
uvm_mem_walk_seq
Class Declaration
class uvm_mem_walk_seq extends uvm_reg_sequence #(
    uvm_sequence  #(uvm_reg_item)
)
Variables
modelThe block to be tested.
mem_seqThe sequence used to test one memory
Methods
bodyExecutes the mem walk sequence, one block at a time.
do_blockTest all of the memories in a given block
reset_blkReset the DUT that corresponds to the specified block abstraction class.

model

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

uvm_reg_block model;

mem_seq

protected uvm_mem_single_walk_seq mem_seq

The sequence used to test one memory

body

virtual task body()

Executes the mem walk sequence, one block at a time.  Do not call directly.  Use seq.start() instead.

do_block

protected virtual task do_block( uvm_reg_block  blk )

Test all of the memories in 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.

class uvm_mem_single_walk_seq extends uvm_reg_sequence #(
    uvm_sequence  #(uvm_reg_item)
)
Runs the walking-ones algorithm on the memory given by the mem property, which must be assigned prior to starting this sequence.
uvm_mem mem
The memory to test; must be assigned prior to starting sequence.
class uvm_mem_walk_seq extends uvm_reg_sequence #( uvm_sequence  #(uvm_reg_item) )
Verifies the all memories in a block by executing the uvm_mem_single_walk_seq sequence on every memory within it.
function new( string  name  =  "uvm_mem_walk_seq" )
Creates a new instance of the class with the given name.
virtual task body()
Performs the walking-ones algorithm on each map of the memory specifed in mem.
protected uvm_mem_single_walk_seq mem_seq
The sequence used to test one memory
virtual task body()
Executes the mem walk sequence, one block at a time.
protected virtual task do_block( uvm_reg_block  blk )
Test all of the memories in a given block
virtual task reset_blk( uvm_reg_block  blk )
Reset the DUT that corresponds to the specified block abstraction class.