pyuvm._utility_classes
Module Contents
Classes
This class stores an override and an optional path. It is intended to be stored in a dict with the original class as the key. |
|
This is the metaclass that causes all uvm_void classes to register themselves |
|
5.2 SystemVerilog Python uses this class to allow all uvm objects to be stored in a uvm_void variable through polymorphism. |
|
Details about a raised objection, to assist in diagnosing hangs/timeouts |
|
This singleton accepts objections and then allows them to be removed. It returns True to run_phase_complete() when there are no objections left. |
|
The UVMQueue provides a peek function as well as the ability to break out of a blocking operation if the time_to_die predicate is true. The time to die is set to the dropping of all run_phase objections by default. |
Functions
Count the number of bits in a number |
|
Data
API
- pyuvm._utility_classes.FIFO_DEBUG
5
- pyuvm._utility_classes.PYUVM_DEBUG
4
- pyuvm._utility_classes.count_bits(nn)
Count the number of bits in a number
:param nn: The number to count the bits in :return: The number of bits
- class pyuvm._utility_classes.Singleton
Bases:
type- _instances
None
- __call__(*args, **kwargs)
- classmethod clear_singletons(keep)
- class pyuvm._utility_classes.Override
This class stores an override and an optional path. It is intended to be stored in a dict with the original class as the key.
Initialization
- add(override, path=None)
- find_inst_override(path)
- __str__()
For printing out the overrides :return: str
- class pyuvm._utility_classes.FactoryData
Initialization
- clear_overrides()
- clear_classes()
- find_override(requested_type, inst_path=None, overridden_list=None)
:param requested_type: The type we’re overriding :param inst_path: The inst_path we’re using to override if any :param overridden_list: A list of previously found overrides :return: overriding_type
Override searches are recursively applied, with instance overrides taking precedence over type overrides. If foo overrides bar, and xyz overrides foo, then a request for bar returns xyx.
- class pyuvm._utility_classes.FactoryMeta(name, bases, cls_dict)
Bases:
typeThis is the metaclass that causes all uvm_void classes to register themselves
Initialization
- class pyuvm._utility_classes.uvm_void
5.2 SystemVerilog Python uses this class to allow all uvm objects to be stored in a uvm_void variable through polymorphism.
In pyuvm, we’re using uvm_void() as a metaclass so that all UVM classes can be stored in a factory.
- class pyuvm._utility_classes.UVM_ROOT_Singleton(name, bases, cls_dict)
Bases:
pyuvm._utility_classes.FactoryMeta- singleton
None
- __call__(*args, **kwargs)
- classmethod clear_singletons()
- class pyuvm._utility_classes.Objection
Details about a raised objection, to assist in diagnosing hangs/timeouts
- raiser_name: str
None
- description: str
None
- sourceline: str
None
- __str__()
- class pyuvm._utility_classes.ObjectionHandler
This singleton accepts objections and then allows them to be removed. It returns True to run_phase_complete() when there are no objections left.
Initialization
- __str__()
:return: String representation of all active objections Example:: from pyuvm.utility_classes import ObjectionHandler print(str(ObjectionHandler()))
- clear()
- raise_objection(raiser, description, stacklevel=1)
- drop_objection(dropper, description)
- async run_phase_complete()
- class pyuvm._utility_classes.UVMQueue(maxsize: int = 0)
Bases:
cocotb.queue.QueueThe UVMQueue provides a peek function as well as the ability to break out of a blocking operation if the time_to_die predicate is true. The time to die is set to the dropping of all run_phase objections by default.
Initialization
- __str__()
- _peek()
- async peek()
Remove and return an item from the queue. If the queue is empty, wait until an item is available.
- peek_nowait()
Remove and return an item from the queue. Return an item if one is immediately available, else raise :exc:
asyncio.QueueEmpty.
- pyuvm._utility_classes._get_compiled_pattern(expr: str)
- pyuvm._utility_classes.uvm_is_match(expr: str, string: str) bool