[source]

Class uvm_recorder

uvm_pkg::uvm_recorder + abstract : bit + default_radix : uvm_radix_enum + identifier : bit + physical : bit + policy : uvm_recursion_policy_enum + recording_depth : int + begin_tr(): integer + check_handle_kind(): integer + close(): void + create_stream(): integer + end_tr(): void + free(): void + free_tr(): void + get_close_time(): time + get_handle(): integer + get_open_time(): time + get_record_attribute_handle(): integer + get_recorder_from_handle(): uvm_recorder + get_stream(): uvm_tr_stream + is_closed(): bit + is_open(): bit + link_tr(): void + m_do_open(): void + m_free_id(): void + m_set_attribute(): void + open_file(): bit + record_field(): void + record_field_int(): void + record_field_real(): void + record_generic(): void + record_object(): void + record_string(): void + record_time(): void + set_attribute(): void + use_record_attribute(): bit uvm_pkg::uvm_text_recorder

Inheritance Diagram of uvm_recorder

Abstract class which defines the recorder API.

Variables

Name

Type

Description

recording_depth

int

Variable- recording_depth

default_radix

uvm_radix_enum

This is the default radix setting if record_field is called without a radix.

physical

bit

This bit provides a filtering mechanism for fields.

The abstract and physical settings allow an object to distinguish between two different classes of fields.

It is up to you, in the uvm_object::do_record method, to test the setting of this field if you want to use the physical trait as a filter.

abstract

bit

This bit provides a filtering mechanism for fields.

The abstract and physical settings allow an object to distinguish between two different classes of fields.

It is up to you, in the uvm_object::do_record method, to test the setting of this field if you want to use the abstract trait as a filter.

identifier

bit

This bit is used to specify whether or not an object's reference should be recorded when the object is recorded.

policy

uvm_recursion_policy_enum

Variable

recursion_policy

Sets the recursion policy for recording objects.

The default policy is deep (which means to recurse an object).

Constructors

function new ( string name ) [source]

Functions

function uvm_tr_stream get_stream ( ) [source]

Returns a reference to the stream which created this record.

A warning will be asserted if get_stream is called prior to the record being initialized via do_open.

function void close ( time close_time ) [source]

Closes this recorder.

Closing a recorder marks the end of the transaction in the stream.

Parameters

close_time

Optional time to record as the closing time of this transaction.

This method will trigger a do_close call.

function void free ( time close_time ) [source]

Frees this recorder

Freeing a recorder indicates that the stream and database can release any references to the recorder.

Parameters

close_time

Optional time to record as the closing time of this transaction.

If a recorder has not yet been closed (via a call to close), then close will automatically be called, and passed the close_time . If the recorder has already been closed, then the close_time will be ignored.

This method will trigger a do_free call.

function bit is_open ( ) [source]

Returns true if this uvm_recorder was opened on its stream, but has not yet been closed.

function time get_open_time ( ) [source]

Returns the open_time

function bit is_closed ( ) [source]

Returns true if this uvm_recorder was closed on its stream, but has not yet been freed.

function time get_close_time ( ) [source]

Returns the close_time

function integer get_handle ( ) [source]

Returns a unique ID for this recorder.

A value of 0 indicates that the recorder has been freed , and no longer has a valid ID.

static function uvm_recorder get_recorder_from_handle ( integer id ) [source]

Static accessor, returns a recorder reference for a given unique id.

If no recorder exists with the given id , or if the recorder with that id has been freed, then null is returned.

This method can be used to access the recorder associated with a call to uvm_transaction::begin_tr or uvm_component::begin_tr.

integer handle = tr.begin_tr();
uvm_recorder recorder = uvm_recorder::get_recorder_from_handle(handle);
if (recorder != null) begin
  recorder.record_string("begin_msg", "Started recording transaction!");
end
function void record_field ( string name, uvm_bitstream_t value, int size, uvm_radix_enum radix ) [source]

Records an integral field (less than or equal to 4096 bits).

Parameters

name

Name of the field

value

Value of the field to record.

size

Number of bits of the field which apply (Usually obtained via $bits).

radix

The uvm_radix_enum to use.

This method will trigger a do_record_field call.

function void record_field_int ( string name, uvm_integral_t value, int size, uvm_radix_enum radix ) [source]

Records an integral field (less than or equal to 64 bits).

This optimized version of record_field is useful for sizes up to 64 bits.

Parameters

name

Name of the field

value

Value of the field to record

size

Number of bits of the wfield which apply (Usually obtained via $bits).

radix

The uvm_radix_enum to use.

This method will trigger a do_record_field_int call.

function void record_field_real ( string name, real value ) [source]

Records a real field.

Parameters

name

Name of the field

value

Value of the field to record

This method will trigger a do_record_field_real call.

function void record_object ( string name, uvm_object value ) [source]

Records an object field.

Parameters

name

Name of the field

value

Object to record

The implementation must use the <recursion_policy> and identifier to determine exactly what should be recorded.

function void record_string ( string name, string value ) [source]

Records a string field.

Parameters

name

Name of the field

value

Value of the field

function void record_time ( string name, time value ) [source]

Records a time field.

Parameters

name

Name of the field

value

Value of the field

function void record_generic ( string name, string value, string type_name ) [source]

Records a name/value pair, where value has been converted to a string.

For example:

recorder.record_generic(&quot;myvar&quot;,&quot;var_type&quot;, $sformatf(&quot;%0d&quot;,myvar), 32);

Parameters:

name

Name of the field

value

Value of the field

type_name

optional Type name of the field

virtual function bit use_record_attribute ( ) [source]

Indicates that this recorder does (or does not) support usage of the uvm_record_attribute macro.

The default return value is 0 (not supported), developers can optionally extend uvm_recorder and set the value to 1 if they support the uvm_record_attribute macro.

virtual function integer get_record_attribute_handle ( ) [source]

Provides a tool-specific handle which is compatible with uvm_record_attribute.

By default, this method will return the same value as get_handle, however tool vendors can override this method to provide tool-specific handles which will be passed to the uvm_record_attribute macro.

virtual function bit open_file ( ) [source]

Function- open_file

Opens the file in the <filename> property and assigns to the file descriptor <file>.

virtual function integer create_stream ( string name, string t, string scope ) [source]

Function- create_stream

virtual function void set_attribute ( integer txh, string nm, logic[1023:0] value, uvm_radix_enum radix, integer numbits ) [source]

Function- set_attribute

virtual function integer check_handle_kind ( string htype, integer handle ) [source]

Function- check_handle_kind

virtual function integer begin_tr ( string txtype, integer stream, string nm, string label, string desc, time begin_time ) [source]

Function- begin_tr

virtual function void end_tr ( integer handle, time end_time ) [source]

Function- end_tr

Function- link_tr

virtual function void free_tr ( integer handle ) [source]

Function- free_tr