uvm_sequence_item

class uvm.seq.uvm_sequence_item.UVMSequenceItem(name='UVMSequenceItem')[source]

Bases: UVMTransaction

issued1 = False
issued2 = False
get_type_name() str[source]

This function returns the type name of the object, which is typically the type identifier enclosed in quotes. It is used for various debugging functions in the library, and it is used by the factory for creating objects.

This function must be defined in every derived class.

A typical implementation is as follows:

class mytype (UVMObject):
  ...
  type_name = "mytype"

  def get_type_name(self):
    return my_type.type_name

We define the type_name static variable to enable access to the type name without need of an object of the class, i.e., to enable access via the scope operator, ~mytype::type_name~.

Returns

Type name of the object.

Return type

str

set_sequence_id(id: int) None[source]

Function- set_sequence_id

Parameters

id

get_sequence_id() int[source]

Function: get_sequence_id

private

Get_sequence_id is an internal method that is not intended for user code. The sequence_id is not a simple integer. The get_transaction_id is meant for users to identify specific transactions.

These methods allow access to the sequence_item sequence and transaction IDs. get_transaction_id and set_transaction_id are methods on the uvm_transaction base_class. These IDs are used to identify sequences to the sequencer, to route responses back to the sequence that issued a request, and to uniquely identify transactions.

The sequence_id is assigned automatically by a sequencer when a sequence initiates communication through any sequencer calls (i.e. `uvm_do_*, wait_for_grant). A sequence_id will remain unique for this sequence until it ends or it is killed. However, a single sequence may have multiple valid sequence ids at any point in time. Should a sequence start again after it has ended, it will be given a new unique sequence_id.

The transaction_id is assigned automatically by the sequence each time a transaction is sent to the sequencer with the transaction_id in its default (-1) value. If the user sets the transaction_id to any non-default value, that value will be maintained.

Responses are routed back to this sequences based on sequence_id. The sequence may use the transaction_id to correlate responses with their requests.

Returns:

set_item_context(parent_seq, sequencer=None) None[source]

Function: set_item_context

Set the sequence and sequencer execution context for a sequence item

Parameters
  • parent_seq

  • sequencer

set_use_sequence_info(value) None[source]

Function: set_use_sequence_info

Parameters

value

get_use_sequence_info() bool[source]

Function: get_use_sequence_info

These methods are used to set and get the status of the use_sequence_info bit. Use_sequence_info controls whether the sequence information (sequencer, parent_sequence, sequence_id, etc.) is printed, copied, or recorded. When use_sequence_info is the default value of 0, then the sequence information is not used. When use_sequence_info is set to 1, the sequence information will be used in printing and copying.

set_id_info(item: UVMSequenceItem) None[source]

Function: set_id_info

Copies the sequence_id and transaction_id from the referenced item into the calling item. This routine should always be used by drivers to initialize responses for future compatibility.

Parameters

item

set_sequencer(sequencer: Any) None[source]
get_sequencer() Any[source]
set_parent_sequence(parent: Any) None[source]
get_parent_sequence() Any[source]

Function: get_parent_sequence

Returns a reference to the parent sequence of any sequence on which this method was called. If this is a parent sequence, the method returns None.

Returns

Parent sequence of this item.

Return type

UVMSequenceBase

set_depth(value: int) None[source]

Function: set_depth

The depth of any sequence is calculated automatically. However, the user may use set_depth to specify the depth of a particular sequence. This method will override the automatically calculated depth, even if it is incorrect.

Parameters

value

get_depth() int[source]

Function: get_depth

Returns the depth of a sequence from its parent. A parent sequence will have a depth of 1, its child will have a depth of 2, and its grandchild will have a depth of 3.

Returns:

is_item() bool[source]

Function: is_item

This function may be called on any sequence_item or sequence. It will return 1 for items and 0 for sequences (which derive from this class).

Returns:

get_full_name() str[source]

Function- get_full_name

Internal method; overrides must follow same naming convention

Returns:

get_root_sequence_name() str[source]

Function: get_root_sequence_name

Provides the name of the root sequence (the top-most parent sequence).

Returns:

m_set_p_sequencer() None[source]

Function- m_set_p_sequencer

Internal method

get_root_sequence() Any[source]

Function: get_root_sequence

Provides a reference to the root sequence (the top-most parent sequence).

Returns:

get_sequence_path() str[source]

Function: get_sequence_path

Provides a string of names of each sequence in the full hierarchical path. A “.” is used as the separator between each sequence.

Returns: