[source]

Class csr_utils_pkg::csr_base_seq

csr_utils_pkg::csr_base_seq + all_csrs[$] : uvm_reg + external_checker : bit + models[$] : dv_base_reg_block + num_csr_chunks : int + num_test_csrs : int + test_csr_chunk : int + test_csrs[$] : uvm_reg + type_name : string + __m_uvm_field_automation(): void + create(): uvm_object + get_object_type(): uvm_object_wrapper + get_type(): type_id + get_type_name(): string + is_excl(): bit + post_start() + pre_start() + set_csr_test_range(): void csr_utils_pkg::csr_hw_reset_seq csr_utils_pkg::csr_write_seq csr_utils_pkg::csr_rw_seq csr_utils_pkg::csr_bit_bash_seq csr_utils_pkg::csr_aliasing_seq csr_utils_pkg::csr_mem_walk_seq

Inheritance Diagram of csr_base_seq

CSR suite of sequences that do writes and reads to csrs includes hw_reset, rw, bit_bash and aliasing tests for csrs, and mem_walk for uvm_mems The sequences perform csr writes and reads and follow the standard csr test suite. If external checker is enabled, then the external entity is required to update the mirrored value on writes. If not enabled, the sequences themselves call predict function to update the mirrored value. Consequently, the read values are checked against the mirrored value and not the previously written value. This approach is better since it takes care of special register and field access policies. Also, we use csr_rd_check task instead of csr_mirror to take field exclusions into account.

Csrs to be tested is accumulated and shuffled from the supplied reg models. What / how many csrs to test can be further controlled in 3 ways

  1. Externally add specific csrs to test_csrs queue (highest prio)
  2. Set num_test_csrs test a randomly picked set of csrs from the supplied models
  3. Set / pass via plusarg, num_csr_chunks / test_csr_chunk

Exclusions are to be provided using the csr_excl_item item (see class for more details).

Variables

Name

Type

Description

models

dv_base_reg_block

all_csrs

uvm_reg

test_csrs

uvm_reg

external_checker

bit

By default, assume external checker (example, scoreboard) is turned off. If that is the case, then writes are followed by call to predict function to update the mirrored value. Reads are then checked against the mirrored value using csr_rd_check task. If external checker is enabled, then we let the external checker do the predict and compare. In either case, we should be able to do completely non-blocking writes and reads.

num_test_csrs

int

either use num_test_csrs or {test_csr_chunk, num_csr_chunks} to test slice of all csrs

test_csr_chunk

int

num_csr_chunks

int

Constructors

new(string name = "")
Parameters:

name (string)

Functions

set_csr_test_range()

extract csrs and split and prune to a specified test_csr_chunk

is_excl(uvm_object obj, csr_excl_type_e csr_excl_type, csr_test_type_e csr_test_type)

check if this csr/fld is excluded from test based on the excl info in blk.csr_excl

Parameters:

Tasks

pre_start()

pre_start

post_start()

post_start