uvm_component

class uvm.base.uvm_component.VerbositySetting[source]

Bases: object

The verbosity settings may have a specific phase to start at. We will do this work in the UVMComponent.phase_started callback.

Variables
  • comp (UVMComponent) – Component related to the settings

  • phase (UVMPhase) – Phase in which settings apply.

  • id (int) – ID for verbosity setting

  • offset (int) – Time offset for verbosity setting

  • verbosity (int) – Verbosity level of the setting.

convert2string()[source]
class uvm.base.uvm_component.uvm_cmdline_parsed_arg_t[source]

Bases: object

Class used to return arguments and associated data parsed from cmd line arguments. These are usually plusargs given with +ARG_NAME=ARG_VALUE

Variables
  • arg (str) – Argument name

  • args (list) – Values of given argument.

  • used (int) – Logs how many times arg is used.

class uvm.base.uvm_component.UVMComponent(name, parent)[source]

Bases: UVMReportObject

Base class for defining UVM components The uvm_component class is the root base class for UVM components. In addition to the features inherited from UVMObject and UVMReportObject, uvm_component provides the following interfaces:

Hierarchy: provides methods for searching and traversing the component hierarchy.

Phasing defines a phased test flow that all components follow, with a group of standard phase methods and an API for custom phases and multiple independent phasing domains to mirror DUT behavior e.g. power

Reporting provides a convenience interface to the UVMReportHandler. All messages, warnings, and errors are processed through this interface.

Transaction recording provides methods for recording the transactions produced or consumed by the component to a transaction database (vendor specific).

Factory provides a convenience interface to the UVMFactory. The factory is used to create new components and other objects based on type-wide and instance-specific configuration.

The UVMComponent is automatically seeded during construction using UVM seeding, if enabled. All other objects must be manually reseeded, if appropriate. See UVMObject.reseed for more information.

Most local methods within the class are prefixed with m_, indicating they are not user-level methods.

Variables
  • print_config_matches (bool) – Setting this static variable causes UVMConfigDb.get to print info about matching configuration settings as they are being applied.

  • tr_database (UVMTrDatabase) – Specifies the UVMTrDatabase object to use for begin_tr and other methods in the <Recording Interface>. Default is UVMCoreService.get_default_tr_database.

  • print_enabled (bool) – This bit determines if this component should automatically be printed as a child of its parent object. By default, all children are printed. However, this bit allows a parent component to disable the printing of specific children.

print_config_matches = False
m_time_settings: List[VerbositySetting] = []
get_parent()[source]

Function: get_parent

Returns a handle to this component’s parent, or None if it has no parent. :returns: Parent of this component. :rtype: UVMComponent

get_full_name() str[source]

Returns the full hierarchical name of this object. The default implementation concatenates the hierarchical name of the parent, if any, with the leaf name of this object, as given by UVMObject.get_name.

Returns

Full hierarchical name of this component.

Return type

str

get_children(children)[source]

This function populates the end of the children array with the list of this component’s children.

array = []
my_comp.get_children(array)
for comp in array:
    do_something(comp)
Parameters

children (list) – List into which child components are appended

get_child(name)[source]
Parameters

name (str) – Name of desired child

Returns

Child component matching name.

Return type

UVMComponent

get_next_child()[source]
Returns

Next child component.

Return type

UVMComponent

get_first_child()[source]

These methods are used to iterate through this component’s children, if any. For example, given a component with an object handle, comp, the following code calls UVMObject.print for each child:

name = ""
child = comp.get_first_child()
while child is not None:
    child.print()
    child = comp.get_next_child()
Returns

First child component.

Return type

UVMComponent

get_num_children()[source]
Returns

The number of this component’s children.

Return type

int

has_child(name)[source]
Parameters

name (str) – Desired child component name.

Returns

True if this component has a child with the given name, False otherwise.

Return type

bool

set_name(name)[source]

Renames this component to name and recalculates all descendants’ full names. This is an internal function for now.

Parameters

name (str) – New name

lookup(name)[source]

Looks for a component with the given hierarchical name relative to this component. If the given name is preceded with a ‘.’ (dot), then the search begins relative to the top level (absolute lookup). The handle of the matching component is returned, else None. The name must not contain wildcards.

Parameters

name

Returns

Matching component, or None is no match is found.

Return type

UVMComponent

get_depth() int[source]

Returns the component’s depth from the root level. uvm_top has a depth of 0. The test and any other top level components have a depth of 1, and so on.

Returns

The component’s depth from the root level

Return type

int

build_phase(phase)[source]

The UVMBuildPhase phase implementation method.

Any override should call super().build_phase(phase) to execute the automatic configuration of fields registered in the component by calling apply_config_settings. To turn off automatic configuration for a component, do not call super().build_phase(phase).

This method should never be called directly.

Parameters

phase (UVMPhase) –

build()[source]

For backward compatibility the base build_phase method calls build.

connect_phase(phase)[source]

The UVMConnectPhase phase implementation method.

This method should never be called directly.

Parameters

phase (UVMPhase) –

end_of_elaboration_phase(phase)[source]

The UVMEndOfElaborationPhase phase implementation method.

This method should never be called directly.

Parameters

phase (UVMPhase) –

start_of_simulation_phase(phase)[source]

The UVMStartOfSimulationPhase phase implementation method.

This method should never be called directly.

Parameters

phase (UVMPhase) –

start_of_simulation()[source]

For backward compatibility the base start_of_simulation_phase method calls start_of_simulation. extern virtual function void start_of_simulation()

async run_phase(phase)[source]

Task: run_phase

The UVMRunPhase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. Thus the phase will automatically end once all objections are dropped using ~phase.drop_objection()~.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

The run_phase task should never be called directly.

async run()[source]
async pre_reset_phase(phase)[source]

Task: pre_reset_phase

The uvm_pre_reset_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async reset_phase(phase)[source]

Task: reset_phase

The uvm_reset_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async post_reset_phase(phase)[source]

Task: post_reset_phase

The uvm_post_reset_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async pre_configure_phase(phase)[source]

Task: pre_configure_phase

The uvm_pre_configure_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async configure_phase(phase)[source]

Task: configure_phase

The uvm_configure_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async post_configure_phase(phase)[source]

Task: post_configure_phase

The uvm_post_configure_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async pre_main_phase(phase)[source]

Task: pre_main_phase

The uvm_pre_main_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async main_phase(phase)[source]

Task: main_phase

The uvm_main_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async post_main_phase(phase)[source]

Task: post_main_phase

The uvm_post_main_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async pre_shutdown_phase(phase)[source]

Task: pre_shutdown_phase

The uvm_pre_shutdown_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async shutdown_phase(phase)[source]

Task: shutdown_phase

The uvm_shutdown_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

async post_shutdown_phase(phase)[source]

Task: post_shutdown_phase

The uvm_post_shutdown_phase phase implementation method.

This task returning or not does not indicate the end or persistence of this phase. It is necessary to raise an objection using ~phase.raise_objection()~ to cause the phase to persist. Once all components have dropped their respective objection using ~phase.drop_objection()~, or if no components raises an objection, the phase is ended.

Any processes forked by this task continue to run after the task returns, but they will be killed once the phase ends.

This method should not be called directly. :param phase:

extract_phase(phase)[source]

The UVMExtractPhase phase implementation method.

This method should never be called directly. :param phase:

check_phase(phase)[source]

The UVMCheckPhase phase implementation method.

This method should never be called directly. :param phase:

report_phase(phase)[source]

The UVMReportPhase phase implementation method.

This method should never be called directly. :param phase:

final_phase(phase)[source]

The UVMFinalPhase phase implementation method.

This method should never be called directly. :param phase:

phase_started(phase)[source]

Invoked at the start of each phase. The phase argument specifies the phase being started. Any threads spawned in this callback are not affected when the phase ends.

Parameters

phase

phase_ended(phase)[source]

Invoked at the end of each phase. The phase argument specifies the phase that is ending. Any threads spawned in this callback are not affected when the phase ends.

Parameters

phase

phase_ready_to_end(phase)[source]

Function: phase_ready_to_end

Invoked when all objections to ending the given phase and all sibling phases have been dropped, thus indicating that phase is ready to begin a clean exit. Sibling phases are any phases that have a common successor phase in the schedule plus any phases that sync’d to the current phase. Components needing to consume delta cycles or advance time to perform a clean exit from the phase may raise the phase’s objection.

phase.raise_objection(self, "Reason")

It is the responsibility of this component to drop the objection once it is ready for this phase to end (and processes killed). If no objection to the given phase or sibling phases are raised, then phase_ended() is called after a delta cycle. If any objection is raised, then when all objections to ending the given phase and siblings are dropped, another iteration of phase_ready_to_end is called. To prevent endless iterations due to coding error, after 20 iterations, phase_ended() is called regardless of whether previous iteration had any objections raised.

set_domain(domain, hier=True)[source]

Apply a phase domain to this component and, if hier is set, recursively to all its children.

Calls the virtual define_domain method, which derived components can override to augment or replace the domain definition of its base class.

Assigns this component [tree] to a domain. adds required schedules into graph If called from build, hier won’t recurse into all chilren (which don’t exist yet) If we have components inherit their parent’s domain by default, then hier isn’t needed and we need a way to prevent children from inheriting this component’s domain

Parameters
  • domain

  • hier

get_domain()[source]

Return handle to the phase domain set on this component

Returns:

define_domain(domain)[source]

Builds custom phase schedules into the provided domain handle.

This method is called by set_domain, which integrators use to specify this component belongs in a domain apart from the default ‘uvm’ domain.

Custom component base classes requiring a custom phasing schedule can augment or replace the domain definition they inherit by overriding their defined_domain. To augment, overrides would call super.define_domain(). To replace, overrides would not call super.define_domain().

The default implementation adds a copy of the uvm phasing schedule to the given domain, if one doesn’t already exist, and only if the domain is currently empty.

Calling set_domain with the default uvm domain (i.e. <uvm_domain::get_uvm_domain> ) on a component with no define_domain override effectively reverts the that component to using the default uvm domain. This may be useful if a branch of the testbench hierarchy defines a custom domain, but some child sub-branch should remain in the default uvm domain, call set_domain with a new domain instance handle with hier set. Then, in the sub-branch, call set_domain with the default uvm domain handle, obtained via <uvm_domain::get_uvm_domain>.

Alternatively, the integrator may define the graph in a new domain externally, then call set_domain to apply it to a component.

Parameters

domain

set_phase_imp(phase, imp, hier=1)[source]

Override the default implementation for a phase on this component (tree) with a custom one, which must be created as a singleton object extending the default one and implementing required behavior in exec and traverse methods

The hier specifies whether to apply the custom functor to the whole tree or just this component.

Parameters
  • phase

  • imp

  • hier

async suspend()[source]

Suspend this component.

This method must be implemented by the user to suspend the component according to the protocol and functionality it implements. A suspended component can be subsequently resumed using <resume()>.

async resume()[source]

Resume this component.

This method must be implemented by the user to resume a component that was previously suspended using <suspend()>. Some component may start in the suspended state and may need to be explicitly resumed.

resolve_bindings() None[source]

Processes all port, export, and imp connections. Checks whether each port’s min and max connection requirements are met.

It is called just before the end_of_elaboration phase.

Users should not call directly.

massage_scope(scope: str) str[source]
check_config_usage(recurse=1) None[source]

Check all configuration settings in a components configuration table to determine if the setting has been used, overridden or not used. When recurse is 1 (default), configuration for this and all child components are recursively checked. This function is automatically called in the check phase, but can be manually called at any time.

To get all configuration information prior to the run phase, do something like this in your top object:

def start_of_simulation_phase(self, phase):
  self.check_config_usage()
Parameters

recurse

apply_config_settings(verbose=0)[source]

Searches for all config settings matching this component’s instance path. For each match, the appropriate set_*_local method is called using the matching config setting’s field_name and value. Provided the set_*_local method is implemented, the component property associated with the field_name is assigned the given value.

This function is called by <uvm_component::build_phase>.

The apply_config_settings method determines all the configuration settings targeting this component and calls the appropriate set_*_local method to set each one. To work, you must override one or more set_*_local methods to accommodate setting of your component’s specific properties. Any properties registered with the optional `uvm_*_field macros do not require special handling by the set_*_local methods; the macros provide the set_*_local functionality for you.

If you do not want apply_config_settings to be called for a component, then the build_phase() method should be overloaded and you should not call super.build_phase(phase). Likewise, apply_config_settings can be overloaded to customize automated configuration.

When the verbose bit is set, all overrides are printed as they are applied. If the component’s print_config_matches property is set, then apply_config_settings is automatically called with verbose = 1.

Parameters

verbose (bool) – If true, prints more verbose information

print_config_settings(field='', comp=None, recurse=False) None[source]

Function: print_config_settings

Called without arguments, print_config_settings prints all configuration information for this component, as set by previous calls to <uvm_config_db::set()>. The settings are printing in the order of their precedence.

If field is specified and non-empty, then only configuration settings matching that field, if any, are printed. The field may not contain wildcards.

If comp is specified and non-None, then the configuration for that component is printed.

If recurse is set, then configuration information for all comp’s children and below are printed as well.

This function has been deprecated. Use print_config instead. :param field: Print all config related to given field, :type field: str :param comp: If given, print config only for that component. :type comp: UVMComponent :param recurse: If true, recurse to all children :type recurse: bool

print_config(recurse=False, audit=False) None[source]

Function: print_config

Print_config prints all configuration information for this component, as set by previous calls to UVMConfigDb.set and exports to the resources pool. The settings are printing in the order of their precedence.

If recurse is set, then configuration information for all children and below are printed as well.

if audit is set then the audit trail for each resource is printed along with the resource name and value

Parameters
  • recurse (bool) – If true, recurse to child components

  • audit (bool) – If true, print audit trail for each resource.

print_config_with_audit(recurse=0) None[source]

Function: print_config_with_audit

Operates the same as print_config except that the audit bit is forced to 1. This interface makes user code a bit more readable as it avoids multiple arbitrary bit settings in the argument list.

If recurse is set, then configuration information for all children and below are printed as well.

raised(objection, source_obj, description, count)[source]

Function: raised

The raised callback is called when this or a descendant of this component instance raises the specified objection. The source_obj is the object that originally raised the objection. The description is optionally provided by the source_obj to give a reason for raising the objection. The count indicates the number of objections raised by the source_obj.

dropped(objection, source_obj, description, count)[source]

The dropped callback is called when this or a descendant of this component instance drops the specified objection. The source_obj is the object that originally dropped the objection. The description is optionally provided by the source_obj to give a reason for dropping the objection. The count indicates the number of objections dropped by the source_obj.

Parameters
async all_dropped(objection, source_obj, description, count)[source]

The all_droppped callback is called when all objections have been dropped by this component and all its descendants. The source_obj is the object that dropped the last objection. The description is optionally provided by the source_obj to give a reason for raising the objection. The count indicates the number of objections dropped by the source_obj.

Parameters
  • objection

  • source_obj

  • description

  • count

create_component(requested_type_name, name)[source]

Function: create_component

A convenience function for <uvm_factory::create_component_by_name>, this method calls upon the factory to create a new child component whose type corresponds to the preregistered type name, requested_type_name, and instance name, name. This method is equivalent to:

factory.create_component_by_name(requested_type_name,

get_full_name(), name, this)

If the factory determines that a type or instance override exists, the type of the component created may be different than the requested type. See <set_type_override> and <set_inst_override>. See also <uvm_factory> for details on factory operation.

create_object(requested_type_name, name='')[source]

A convenience function for UVMFactory.create_object_by_name, this method calls upon the factory to create a new object whose type corresponds to the preregistered type name, requested_type_name, and instance name, name. This method is equivalent to:

factory.create_object_by_name(requested_type_name,
                              get_full_name(), name)

If the factory determines that a type or instance override exists, the type of the object created may be different than the requested type. See UVMFactory for details on factory operation.

classmethod set_type_override_by_type(original_type, override_type, replace=1)[source]

A convenience function for UVMFactory.set_type_override_by_type, this method registers a factory override for components and objects created at this level of hierarchy or below. This method is equivalent to:

factory.set_type_override_by_type(original_type, override_type,replace)

The relative_inst_path is relative to this component and may include wildcards. The original_type represents the type that is being overridden. In subsequent calls to UVMFactory.create_object_by_type or UVMFactory.create_component_by_type, if the requested_type matches the original_type and the instance paths match, the factory will produce the override_type.

The original and override type arguments are lightweight proxies to the types they represent. See <set_inst_override_by_type> for information on usage.

classmethod set_type_override(original_type_name, override_type_name, replace=1)[source]

Function: set_type_override

A convenience function for UVMFactory.set_type_override_by_name, this method configures the factory to create an object of type override_type_name whenever the factory is asked to produce a type represented by original_type_name. This method is equivalent to:

factory.set_type_override_by_name(original_type_name,
                                  override_type_name, replace)

The original_type_name typically refers to a preregistered type in the factory. It may, however, be any arbitrary string. Subsequent calls to create_component or create_object with the same string and matching instance path will produce the type represented by override_type_name. The override_type_name must refer to a preregistered type in the factory.

print_override_info(requested_type_name, name='')[source]

This factory debug method performs the same lookup process as create_object and create_component, but instead of creating an object, it prints information about what type of object would be created given the provided arguments.

set_report_id_verbosity_hier(id, verbosity)[source]
set_report_severity_id_verbosity_hier(severity, id, verbosity)[source]
set_report_severity_action_hier(severity, action)[source]
Parameters
  • severity

  • action

set_report_severity_id_action_hier(severity, id, action)[source]
set_report_id_action_hier(id, action)[source]

These methods recursively associate the specified action with reports of the given severity, id, or ~severity-id~ pair. An action associated with a particular severity-id pair takes precedence over an action associated with id, which takes precedence over an action associated with a severity.

For a list of severities and their default actions, refer to UVMReportHandler.

Parameters
  • id (str) – Message ID to use (’’ = all)

  • action

set_report_default_file_hier(file)[source]

Sets default report file hierarchically. All UVM_LOG actions are written into this file, unless more specific file is set.

Parameters

file

set_report_severity_file_hier(severity, file)[source]
set_report_id_file_hier(id, file)[source]
set_report_severity_id_file_hier(severity, id, file)[source]
set_report_verbosity_level_hier(verbosity)[source]

This method recursively sets the maximum verbosity level for reports for this component and all those below it. Any report from this component subtree whose verbosity exceeds this maximum will be ignored.

See UVMReportHandler for a list of predefined message verbosity levels and their meaning.

Parameters

verbosity

pre_abort()[source]

This callback is executed when the message system is executing a UVM_EXIT action. The exit action causes an immediate termination of the simulation, but the pre_abort callback hook gives components an opportunity to provide additional information to the user before the termination happens. For example, a test may want to executed the report function of a particular component even when an error condition has happened to force a premature termination you would write a function like:

def pre_abort(self):
  self.report()

The pre_abort() callback hooks are called in a bottom-up fashion.

m_do_pre_abort()[source]
accept_tr(tr, accept_time=0)[source]

This function marks the acceptance of a transaction, tr, by this component. Specifically, it performs the following actions:

  • Calls the tr’s <uvm_transaction::accept_tr> method, passing to it the

accept_time argument.

  • Calls this component’s <do_accept_tr> method to allow for any post-begin

action in derived classes.

  • Triggers the component’s internal accept_tr event. Any processes waiting

on this event will resume in the next delta cycle. :param tr: :param accept_time:

do_accept_tr(tr)[source]

The accept_tr method calls this function to accommodate any user-defined post-accept action. Implementations should call super.do_accept_tr to ensure correct operation.

Parameters

tr

begin_tr(tr, stream_name='main', label='', desc='', begin_time=0, parent_handle=0)[source]

This function marks the start of a transaction, tr, by this component. Specifically, it performs the following actions:

  • Calls tr’s <uvm_transaction::begin_tr> method, passing to it the begin_time argument. The begin_time should be greater than or equal to the accept time. By default, when begin_time = 0, the current simulation time is used.

    If recording is enabled (recording_detail != UVM_OFF), then a new database-transaction is started on the component’s transaction stream given by the stream argument. No transaction properties are recorded at this time.

  • Calls the component’s <do_begin_tr> method to allow for any post-begin action in derived classes.

  • Triggers the component’s internal begin_tr event. Any processes waiting on this event will resume in the next delta cycle.

A handle to the transaction is returned. The meaning of this handle, as well as the interpretation of the arguments stream_name, label, and desc are vendor specific. :param tr: :param stream_name: :param label: :param desc: :param begin_time: :param parent_handle:

Returns:

begin_child_tr(tr, parent_handle=0, stream_name='main', label='', desc='', begin_time=0)[source]

This function marks the start of a child transaction, tr, by this component. Its operation is identical to that of <begin_tr>, except that an association is made between this transaction and the provided parent transaction. This association is vendor-specific.

Parameters
  • tr

  • parent_handle

  • stream_name

  • label

  • desc

  • begin_time

Returns:

do_begin_tr(tr, stream_name, tr_handle)[source]

The <begin_tr> and <begin_child_tr> methods call this function to accommodate any user-defined post-begin action. Implementations should call super.do_begin_tr to ensure correct operation.

Parameters
  • tr

  • stream_name

  • tr_handle

end_tr(tr, end_time=0, free_handle=1)[source]

Function: end_tr

This function marks the end of a transaction, tr, by this component. Specifically, it performs the following actions:

  • Calls tr’s <uvm_transaction::end_tr> method, passing to it the end_time argument. The end_time must at least be greater than the begin time. By default, when end_time = 0, the current simulation time is used.

    The transaction’s properties are recorded to the database-transaction on which it was started, and then the transaction is ended. Only those properties handled by the transaction’s do_record method (and optional `uvm_*_field macros) are recorded.

  • Calls the component’s <do_end_tr> method to accommodate any post-end action in derived classes.

  • Triggers the component’s internal end_tr event. Any processes waiting on this event will resume in the next delta cycle.

The free_handle bit indicates that this transaction is no longer needed. The implementation of free_handle is vendor-specific. :param tr: :param end_time: :param free_handle:

do_end_tr(tr, tr_handle)[source]

The <end_tr> method calls this function to accommodate any user-defined post-end action. Implementations should call super.do_end_tr to ensure correct operation.

Parameters
  • tr

  • tr_handle

record_error_tr(stream_name='main', info=None, label='error_tr', desc='', error_time=0, keep_active=0)[source]
record_event_tr(stream_name='main', info=None, label='event_tr', desc='', event_time=0, keep_active=0)[source]
get_tr_stream(name, stream_type_name='')[source]

Streams which are retrieved via this method will be stored internally, such that later calls to get_tr_stream will return the same stream reference.

The stream can be removed from the internal storage via a call to free_tr_stream.

Parameters
  • name (str) – Name for the stream

  • stream_type_name – Type name for the stream (Default = “”)

Returns

Stream with this component’s full name as scope.

Return type

UVMTrStream

free_tr_stream(stream)[source]
m_get_tr_database()[source]

Returns:

set_int_local(field_name, value, recurse=1)[source]
Parameters
  • field_name

  • value

  • recurse

m_set_full_name()[source]
do_resolve_bindings()[source]
do_flush()[source]
flush()[source]
m_extract_name(name, leaf, remainder)[source]
Parameters
  • name

  • leaf

  • remainder

Returns:

create(name='')[source]

Overridden to disable component creation using this method.

Parameters

name (str) – Name of the component.

Returns

None - Create cannot be called on UVMComponent

clone()[source]

Components cannot be cloned. Added this to show uvm_error whenever a cloning is attempted.

Returns

None - Components cannot be cloned.

m_begin_tr(tr, parent_handle=0, stream_name='main', label='', desc='', begin_time=0)[source]
Parameters

Returns:

m_set_cl_msg_args()[source]

Internal methods for setting up command line messaging stuff #extern function void m_set_cl_msg_args

first_m_set_cl_verb = 1
m_set_cl_verb()[source]

#extern function void m_set_cl_verb

async m_fork_time_settings(top)[source]
async m_set_comp_settings(i, comps, dur)[source]
initialized_m_set_cl_action = 0
m_set_cl_action()[source]
initialized_m_set_cl_sev = 0
m_set_cl_sev()[source]
m_uvm_applied_cl_action: List[uvm_cmdline_parsed_arg_t] = []
m_uvm_applied_cl_sev: List[uvm_cmdline_parsed_arg_t] = []
m_add_child(child)[source]
has_first_child()[source]
has_next_child()[source]
m_apply_verbosity_settings(phase)[source]

#extern function void m_apply_verbosity_settings(uvm_phase phase) :param phase:

kill()[source]

Kill internal run process of this component.