pyuvm._s08_factory_classes
Module Contents
Classes
The uvm_factory is a singleton that delivers all UVM factory functions. |
API
- class pyuvm._s08_factory_classes.uvm_factory
The uvm_factory is a singleton that delivers all UVM factory functions.
Initialization
- clear_all()
Clear all the classes and overrides from the factory
- clear_overrides()
Clear all the overrides from the factory
- __set_override(original, override, path=None)
- set_inst_override_by_type(original_type, override_type, full_inst_path)
:param original_type: The original type being overridden :param override_type: The overriding type :param full_inst_path: The inst where this happens :return: None
Override an instance with a new type if original type is at that path
- set_inst_override_by_name(original_type_name, override_type_name, full_inst_path)
:param original_type_name: the name of type being replaced :param override_type_name: the name of the substitute type :param full_inst_path: The path to the instance :return: None
Override a specific instance using strings that contain the names of the types.
- set_type_override_by_type(original_type, override_type, replace=True)
:param original_type: The original type to be overridden :param override_type: The new type that will override it :param replace: If the override exists, only replace it if this is True :return: None
Override one type with another type globally
- set_type_override_by_name(original_type_name, override_type_name, replace=True)
:param original_type_name: The name of the type to be overridden or an arbitrary string. :param override_type_name: The name of the overriding type. It must have been declared. :param replace: If the override already exists only replace if this is True
Override one type with another type globally using strings containing the type names.
- __find_override(requested_type, parent_inst_path='', name='')
- create_object_by_type(requested_type, parent_inst_path='', name='')
:param requested_type: The type that we request but that can be overridden :param parent_inst_path: The get_full_name path of the parent :param name: The name of the instance requested_type(“name”) :raises: UVMFactoryError if the type is not in the factory :return: Type that is child of uvm_object.
8.3.1.5 Creation If the type is is not in the factory we raise UVMFactoryError
- create_object_by_name(requested_type_name, parent_inst_path='', name='')
:param requested_type_name: the type that could be overridden :param parent_inst_path: A path if we are checking for inst overrides :param name: The name of the new object. :raises: UVMFactoryError if the type is not in the factory :return: A uvm_object with the name given
Create an object using a string to define its uvm_object type.
- create_component_by_type(requested_type, parent_inst_path='', name='', parent=None)
:param requested_type: Type type to be overridden :param parent_inst_path: The inst path if we are looking for inst overrides :param name: Concatenated with parent_inst_path if it exists for inst overrides :param parent: The parent component :raises: UVMFactoryError if the type is not in the factory :return: a uvm_component with the name an parent given.
Create a component of the requested uvm_component type. If the type is is not in the factory we raise UVMFactoryError
- create_component_by_name(requested_type_name, parent_inst_path='', name='', parent=None)
Create a components using the name of the requested uvm_component type
:param requested_type_name: the type that could be overridden :param parent_inst_path: A path if we are checking for inst overrides :param name: The name of the new object. :param parent: The component’s parent component :raises: UVMFactoryError if the type is not in the factory :return: A uvm_object with the name given
- set_type_alias(alias_type_name, original_type)
:param alias_type_name:A string that will reference the original type :param original_type:The original type toe be referenced :raises: UVMNotImplemented Not implemented as it does not seem to exist in the SystemVerilog UVM :return:None
- set_inst_alias(alias_type_name, original_type, full_inst_path)
:param alias_type_name:A string that will reference the original type :param original_type:The original type toe be referenced :param full_inst_path: The instance path where this alias is active :raises: UVMNotImplemented Not implemented as it does not seem to exist in SystemVerilog UVM :return:None
- find_override_by_type(requested_type, full_inst_path)
:param requested_type: The type whose override you want :param full_inst_path: The inst path where one looks :raises: UVMFactoryError if the type is not in the factory :return: class object
Given a type and instance path, return the override class object.
- find_override_by_name(requested_type_name, full_inst_path)
:param requested_type_name: :param full_inst_path: :raises: UVMFactoryError if the type is not in the factory :return: class object
Given a path and the name of a class return its overriding class object
- find_wrapper_by_name()
:raises: UVMNotImplemented There are no wrappers in pyuvm so this is not implemented.
- is_type_name_registered(type_name)
:param type_name: string that is name of a type :return: boolean True if type is registered
Checks that a type of this name is registered with the factory.
- is_type_registered(uvm_type)
:param uvm_type: The type to be checked :return: boolean True if type is registered
Checks that a type is registered. The argument is named “obj” in the spec, but that name is ridiculous and confusing.
- property debug_level
uvm_factory().debug_level = 0 : overrides
uvm_factory().debug_level = 1 : user defined types + above
uvm_factory().debug_level = 2 : uvm_* types + above
- __str__()
Returns the Pythonic string Set uvm_factory().debug_level to a value to control the string. The default is 1
uvm_factory().debug_level = 0 : overrides uvm_factory().debug_level = 1 : user defined types + above uvm_factory().debug_level = 2 : uvm_* types + above
:return: String containing factory data
- print(debug_level=1)
:param debug_level: *
debug_level= 0 : overrides *debug_level= 1 : user defined types + above ( default) *debug_level= 2 : uvm_* types + above :return: NonePrints the factory data using debug_level to control the amount of output. The uvm_factory().debug_level variable can control this for str()