avl._core.factory module
- class avl._core.factory.Factory[source]
- static set_override_by_type(original: Any, override: Any) None[source]
Set an override for a type.
- Parameters:
original (type) – The original type to override.
override (type) – The override type.
- static set_override_by_instance(path: str, override: Any) None[source]
Set an override by instance path.
- Parameters:
path (str) – The instance path to override.
override (type) – The override type.
- static get_by_type(original: type) type[source]
Get the override for a type if it exists, otherwise return the original type.
- Parameters:
original (type) – The original type.
- Returns:
The override type or the original type.
- Return type:
type
- static get_by_instance(original: type, path: str) type[source]
Get the override by instance path if it exists, otherwise return the original type.
- Parameters:
original (type) – The original type.
path (str) – The instance path to look up.
- Returns:
The override type or the original type.
- Return type:
type
- static get_factory_override(original: type, path: str) type[source]
Get the override for a type, name, and instance path.
- Parameters:
original (type) – The original type.
name (str) – The name to look up.
path (str) – The instance path to look up.
- Returns:
The override type or the original type.
- Return type:
type
- static set_variable(path: str, value: Any) None[source]
Set a variable. This is equivalent to setting a value in the UVM config_db.
- Parameters:
path (str) – The path to the variable.
value (Any) – The value to set for the variable.
- static get_variable(path: str, original: Any) Any[source]
Get the value of a variable by its path if it exists, otherwise return the original value.
- Parameters:
original (Any) – The original value to return if no match is found.
path (str) – The path to the variable.
- Returns:
The value of the variable or the original value.
- Return type:
Any