[source]

Class uvm_vreg_field

uvm_pkg::uvm_vreg_field + type_name : string + __m_uvm_field_automation(): void + clone(): uvm_object + configure(): void + convert2string(): string + create(): uvm_object + do_compare(): bit + do_copy(): void + do_pack(): void + do_print(): void + do_unpack(): void + get_access(): string + get_full_name(): string + get_lsb_pos_in_register(): int unsigned + get_n_bits(): int unsigned + get_object_type(): uvm_object_wrapper + get_parent(): uvm_vreg + get_register(): uvm_vreg + get_type(): type_id + get_type_name(): string + peek() + poke() + post_read() + post_write() + pre_read() + pre_write() + read() + write()

Inheritance Diagram of uvm_vreg_field

Virtual field abstraction class

A virtual field represents a set of adjacent bits that are logically implemented in consecutive memory locations.

Constructors

function new ( string name ) [source]

Create a new virtual field instance

This method should not be used directly. The uvm_vreg_field::type_id::create() method should be used instead.

Functions

function void configure ( uvm_vreg parent, int unsigned size, int unsigned lsb_pos ) [source]

Instance-specific configuration

Specify the parent virtual register of this virtual field, its size in bits, and the position of its least-significant bit within the virtual register relative to the least-significant bit of the virtual register.

virtual function string get_full_name ( ) [source]

Get the hierarchical name

Return the hierarchal name of this virtual field The base of the hierarchical name is the root block.

virtual function uvm_vreg get_parent ( ) [source]

Get the parent virtual register

virtual function uvm_vreg get_register ( ) [source]

virtual function int unsigned get_lsb_pos_in_register ( ) [source]

Return the position of the virtual field / Returns the index of the least significant bit of the virtual field in the virtual register that instantiates it. An offset of 0 indicates a field that is aligned with the least-significant bit of the register.

virtual function int unsigned get_n_bits ( ) [source]

Returns the width, in bits, of the virtual field.

virtual function string get_access ( uvm_reg_map map ) [source]

Returns the access policy of the virtual field register when written and read via an address map.

If the memory implementing the virtual field is mapped in more than one address map, an address map must be specified. If access restrictions are present when accessing a memory through the specified address map, the access mode returned takes the access restrictions into account. For example, a read-write memory accessed through an address map with read-only restrictions would return "RO".

virtual function void do_print ( uvm_printer printer ) [source]

virtual function string convert2string ( ) [source]

virtual function uvm_object clone ( ) [source]

TODO

add fatal messages

virtual function void do_copy ( uvm_object rhs ) [source]

virtual function bit do_compare ( uvm_object rhs, uvm_comparer comparer ) [source]

virtual function void do_pack ( uvm_packer packer ) [source]

virtual function void do_unpack ( uvm_packer packer ) [source]

Tasks

virtual function write ( longint unsigned idx, uvm_status_e status, uvm_reg_data_t value, uvm_path_e path, uvm_reg_map map, uvm_sequence_base parent, uvm_object extension, string fname, int lineno ) [source]

Write the specified value in a virtual field

Write value in the DUT memory location(s) that implements the virtual field that corresponds to this abstraction class instance using the specified access path .

If the memory implementing the virtual register array containing this virtual field is mapped in more than one address map, an address map must be specified if a physical access is used (front-door access).

The operation is eventually mapped into memory read-modify-write operations at the location where the virtual register specified by idx in the virtual register array is implemented. If a backdoor is available for the memory implementing the virtual field, it will be used for the memory-read operation.

virtual function read ( longint unsigned idx, uvm_status_e status, uvm_reg_data_t value, uvm_path_e path, uvm_reg_map map, uvm_sequence_base parent, uvm_object extension, string fname, int lineno ) [source]

Read the current value from a virtual field

Read from the DUT memory location(s) that implements the virtual field that corresponds to this abstraction class instance using the specified access path , and return the readback value .

If the memory implementing the virtual register array containing this virtual field is mapped in more than one address map, an address map must be specified if a physical access is used (front-door access).

The operation is eventually mapped into memory read operations at the location(s) where the virtual register specified by idx in the virtual register array is implemented.

virtual function poke ( longint unsigned idx, uvm_status_e status, uvm_reg_data_t value, uvm_sequence_base parent, uvm_object extension, string fname, int lineno ) [source]

Deposit the specified value in a virtual field

Deposit value in the DUT memory location(s) that implements the virtual field that corresponds to this abstraction class instance using the specified access path .

The operation is eventually mapped into memory peek-modify-poke operations at the location where the virtual register specified by idx in the virtual register array is implemented.

virtual function peek ( longint unsigned idx, uvm_status_e status, uvm_reg_data_t value, uvm_sequence_base parent, uvm_object extension, string fname, int lineno ) [source]

Sample the current value from a virtual field

Sample from the DUT memory location(s) that implements the virtual field that corresponds to this abstraction class instance using the specified access path , and return the readback value .

If the memory implementing the virtual register array containing this virtual field is mapped in more than one address map, an address map must be specified if a physical access is used (front-door access).

The operation is eventually mapped into memory peek operations at the location(s) where the virtual register specified by idx in the virtual register array is implemented.

virtual function pre_write ( longint unsigned idx, uvm_reg_data_t wdat, uvm_path_e path, uvm_reg_map map ) [source]

Called before virtual field write.

If the specified data value, access path or address map are modified, the updated data value, access path or address map will be used to perform the virtual register operation.

The virtual field callback methods are invoked before the callback methods on the containing virtual register. The registered callback methods are invoked after the invocation of this method. The pre-write virtual register and field callbacks are executed before the corresponding pre-write memory callbacks

virtual function post_write ( longint unsigned idx, uvm_reg_data_t wdat, uvm_path_e path, uvm_reg_map map, uvm_status_e status ) [source]

Called after virtual field write

If the specified status is modified, the updated status will be returned by the virtual register operation.

The virtual field callback methods are invoked after the callback methods on the containing virtual register. The registered callback methods are invoked before the invocation of this method. The post-write virtual register and field callbacks are executed after the corresponding post-write memory callbacks

virtual function pre_read ( longint unsigned idx, uvm_path_e path, uvm_reg_map map ) [source]

Called before virtual field read.

If the specified access path or address map are modified, the updated access path or address map will be used to perform the virtual register operation.

The virtual field callback methods are invoked after the callback methods on the containing virtual register. The registered callback methods are invoked after the invocation of this method. The pre-read virtual register and field callbacks are executed before the corresponding pre-read memory callbacks

virtual function post_read ( longint unsigned idx, uvm_reg_data_t rdat, uvm_path_e path, uvm_reg_map map, uvm_status_e status ) [source]

Called after virtual field read.

If the specified readback data rdat or status is modified, the updated readback data or status will be returned by the virtual register operation.

The virtual field callback methods are invoked after the callback methods on the containing virtual register. The registered callback methods are invoked before the invocation of this method. The post-read virtual register and field callbacks are executed after the corresponding post-read memory callbacks