ovm_recorder

The ovm_recorder class provides a policy object for recording ovm_objects.  The policies determine how recording should be done.

A default recorder instance, ovm_default_recorder, is used when the ovm_object::record is called without specifying a recorder.

Summary
ovm_recorder
The ovm_recorder class provides a policy object for recording ovm_objects.
Class Declaration
class ovm_recorder
Variables
tr_handleThis is an integral handle to a transaction object.
default_radixThis is the default radix setting if record_field is called without a radix.
physicalThis bit provides a filtering mechanism for fields.
abstractThis bit provides a filtering mechanism for fields.
identifierThis bit is used to specify whether or not an object’s reference should be recorded when the object is recorded.
recursion_policySets the recursion policy for recording objects.
Methods
record_fieldRecords an integral field (less than or equal to 4096 bits).
record_field_realRecords an real field.
record_objectRecords an object field.
record_stringRecords a string field.
record_timeRecords a time value.
record_genericRecords the name-value pair, where value has been converted to a string, e.g.

tr_handle

integer tr_handle = 0

This is an integral handle to a transaction object.  Its use is vendor specific.

A handle of 0 indicates there is no active transaction object.

default_radix

ovm_radix_enum default_radix = OVM_HEX

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

physical

bit physical = 1

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 ovm_object::do_record method, to test the setting of this field if you want to use the physical trait as a filter.

abstract

bit abstract = 1

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 ovm_object::do_record method, to test the setting of this field if you want to use the abstract trait as a filter.

identifier

bit identifier = 1

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

recursion_policy

ovm_recursion_policy_enum policy = OVM_DEFAULT_POLICY

Sets the recursion policy for recording objects.

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

record_field

virtual function void record_field (string name,  
ovm_bitstream_t value,  
int size,  
ovm_radix_enum radix = OVM_NORADIX)

Records an integral field (less than or equal to 4096 bits).  name is the name of the field.

value is the value of the field to record.  size is the number of bits of the field which apply.  radix is the ovm_radix_enum to use.

record_field_real

virtual function void record_field_real (string name,
real value)

Records an real field.  value is the value of the field to record.

record_object

virtual function void record_object (string name,
ovm_object value)

Records an object field.  name is the name of the recorded field.

This method uses the recursion <policy> to determine whether or not to recurse into the object.

record_string

virtual function void record_string (string name,
string value)

Records a string field.  name is the name of the recorded field.

record_time

virtual function void record_time (string name,
time value)

Records a time value.  name is the name to record to the database.

record_generic

virtual function void record_generic (string name,
string value)

Records the name-value pair, where value has been converted to a string, e.g. via $psprintf(“%<format>”,<some variable>);

class ovm_recorder
The ovm_recorder class provides a policy object for recording ovm_objects.
virtual class ovm_object extends ovm_void
The ovm_object class is the base class for all OVM data and hierarchical classes.
integer tr_handle = 0
This is an integral handle to a transaction object.
ovm_radix_enum default_radix = OVM_HEX
This is the default radix setting if record_field is called without a radix.
virtual function void record_field (string name,  
ovm_bitstream_t value,  
int size,  
ovm_radix_enum radix = OVM_NORADIX)
Records an integral field (less than or equal to 4096 bits).
bit physical = 1
This bit provides a filtering mechanism for fields.
bit abstract = 1
This bit provides a filtering mechanism for fields.
bit identifier = 1
This bit is used to specify whether or not an object’s reference should be recorded when the object is recorded.
ovm_recursion_policy_enum policy = OVM_DEFAULT_POLICY
Sets the recursion policy for recording objects.
virtual function void record_field_real (string name,
real value)
Records an real field.
virtual function void record_object (string name,
ovm_object value)
Records an object field.
virtual function void record_string (string name,
string value)
Records a string field.
virtual function void record_time (string name,
time value)
Records a time value.
virtual function void record_generic (string name,
string value)
Records the name-value pair, where value has been converted to a string, e.g.
ovm_recorder ovm_default_recorder = new()
The default recording policy.
function void record (ovm_recorder recorder = null)
The record method deep-records this object’s properties according to an optional recorder policy.
virtual function void do_record (ovm_recorder recorder)
The do_record method is the user-definable hook called by the record method.