pyuvm._s05_base_classes

This file defines the UVM base classes

Module Contents

Classes

uvm_object

The most basic UVM object

uvm_field_op

We do not implement the UVM field op as this is a UVM way of providing field-based functionality that can better be implemented using Python functionality.

uvm_policy

The uvm_policy is used to add functionality to SystemVerilog that already exists in Python. It is not needed in pyuvm.

uvm_transaction

Transactions without interface to logging or waveforms.

API

class pyuvm._s05_base_classes.uvm_object(name='')

Bases: pyuvm._utility_classes.uvm_void

The most basic UVM object

Initialization

:param name: Name of the object. Default is empty string.

get_uvm_seeding()

Not implemented

set_uvm_seeding(enable)

Not implemented

reseed()

Not implemented

get_name()

:return: String with name of uvm_object.

Return the name of this object as passed by the constructor

set_name(name)

:param name: Name of the object

Set the name

get_full_name()

:return: The full path and name of the object

The full name for a uvm_object is simply the name

get_inst_id()

:return: The python ID which fits the bill for what the ID is supposed to be.

get_type()

Not implemented because Python can implement the factory without these shenanigans.

get_object_type()

Not implemented because Python can implement the factory without these shenanigans.

get_type_name()

:return: Returns the type’s __name__ magic variable

classmethod create(name)

:return: new object from factory

clone()

:return: A new object with the same name and data as this object.

print()

Not implemented. Use str() and print()

sprint()

Not implemented. use str() and print()

do_print()

not implemented. Use str() and print()

convert2string()

:return: The result of __str__()

Override if you want something different than __str__()

record()

Not implemented.

do_record()

Not implemented as we are not in a simulator

copy(rhs)

:param rhs: The object to copy from :return: None

Copy fields from rhs to this object using self.do_copy()

do_copy(rhs)

:param rhs: The object to copy from :return: None

By default we copy the name. Override this function to copy the rest of the object members.

compare(rhs)

:param rhs: The object being compared. :returns: True if do_compare() believes the objects are the same.

Compares one uvm_object to another uvm_object using the user-overridden do_compare() function.

do_compare(rhs)

:param rhs: The object being compared. :returns: True if the objects are the same.

Uses __eq__() to compare the objects. Override this to change the compare behavior.

pack()

Not implemented. There are Pythonic solutions to this.

pack_bytes()

Not implemented. There are Pythonic solutions to this.

pack_ints()

Not implemented. There are Pythonic solutions to this.

pack_longints()

Not implemented. There are Pythonic solutions to this.

do_pack()

Not implemented. There are Pythonic solutions to this.

unpack()

Not implemented. There are Pythonic solutions to this.

push_active_policy()

Not implemented.

pop_active_policy()

Not implemented.

get_active_policy()

Not implemented.

unpack_bytes()

Not implemented. There are Pythonic solutions to this.

unpack_ints()

Not implemented. There are Pythonic solutions to this.

unpack_longints()

Not implemented. There are Pythonic solutions to this.

do_unpack()

Not implemented. There are Pythonic solutions to this.

set_local()

Not implemented use Python getattr and setattr.

do_execute_op(op)

Not implemented.

class pyuvm._s05_base_classes.uvm_field_op

We do not implement the UVM field op as this is a UVM way of providing field-based functionality that can better be implemented using Python functionality.

__new__(*args, **kwargs)
class pyuvm._s05_base_classes.uvm_policy

The uvm_policy is used to add functionality to SystemVerilog that already exists in Python. It is not needed in pyuvm.

__new__(*args, **kwargs)
class pyuvm._s05_base_classes.uvm_transaction(name='', initiator=None)

Bases: pyuvm._s05_base_classes.uvm_object

Transactions without interface to logging or waveforms.

Initialization

:param name: Object name :param initiator: component that is the initiator

set_id_info(other)

:param other: uvm_transaction with transaction_id :return: None

Set transaction_id from other

set_initiator(initiator)

:param initiator: initiator to set :return: None

5.4.2.14

get_initiator()

:return: initiator

5.4.2.15

__not_implemented()
accept_tr(accept_time=0)

:param accept_time: Simulation time when the transaction is accepted

IEEE 1800.2 5.4.2.2

do_accept_tr()

User definable method to add to accept_tr()

begin_tr(begin_time=0, parent_handle=None) int

:param begin_time: Simulation time at which the transaction is acted upon by the driver :param parent_handle:

do_begin_tr()

User definable method

end_tr(end_time=0, free_handle=True) None

:param end_time: Simulation time at which the transaction is marked as acted upon :param free_handle: :return: None

do_end_tr()

Not implemented

get_tr_handle()

Not implemented

enable_recording()

Not implemented

disable_recording()

Not implemented

is_recording_enabled()

Not implemented

is_active()

Not implemented

get_event_pool()

Not implemented

get_accept_time() int

:return: Accept time of transaction

get_begin_time() int

:return: Begin time of transaction

get_end_time() int

:return: End time of transaction

set_transaction_id(txn_id)

:param txn_id: Transaction ID

Sets transaction’s transaction_id

get_transaction_id()

:return: Transaction ID

Returns transaction_id