Registry / testing / pyuvm
library4.0.1pypypi✓ verified 87d ago

A Python implementation of the Universal Verification Methodology (UVM) using cocotb. Version 4.0.1 supports Python >=3.6. Release cadence is irregular.

pip install pyuvm
INSTALL
IMPORT
SIG · PYUVM
P
pyuvm
testingpythonv4.0.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

uvm
✓ import pyuvm
✗ import uvm
pyuvm must be imported as pyuvm; uvm is not a top-level module.
Test
✓ from pyuvm import Test
✗ from uvm import Test
Common mistake: using uvm instead of pyuvm.
uvm_component
✓ from pyuvm import uvm_component
✗ from uvm_component import uvm_component
uvm_component is a decorator within pyuvm, not a separate module.

Basic UVM test structure using pyuvm components and run_test().

import pyuvm from pyuvm import uvm_component, Test, uvm_sequence_item @uvm_component class MyDriver(pyuvm.uvm_driver): def build_phase(self): pass @uvm_component class MyEnv(pyuvm.uvm_env): def build_phase(self): pass class MyTest(Test): def build_phase(self): self.env = MyEnv("env", self) if __name__ == "__main__": from pyuvm import run_test run_test(MyTest)
Debug
Known issues
breakingpyuvm 4.x dropped support for Python 2 and older cocotb versions.
fix
Ensure Python >=3.6 and cocotb >=1.6.
affects: >=4.0.0
gotchaYou must import components from pyuvm, not from uvm. Many examples mistakenly use 'import uvm'.
fix
Always use 'import pyuvm' and 'from pyuvm import ...'.
affects: all
deprecateduvm_sequence and uvm_sequencer usage changed in pyuvm 3.x+; direct instantiation may fail.
fix
Use the provided base classes and override build_phase properly.
affects: >=3.0.0
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'uvm'
Importing 'uvm' instead of 'pyuvm'.
fix
Use 'import pyuvm' or 'from pyuvm import ...'.
TypeError: Can't instantiate abstract class ... with abstract methods ...
Missing required method implementations (e.g., build_phase).
fix
Ensure all UVM phases (build_phase, connect_phase, etc.) are properly overridden.
AttributeError: 'NoneType' object has no attribute 'get_name'
Trying to access parent or child component before it is built.
fix
Call super().build_phase() in build_phase before accessing hierarchy.
Upgrade
Version history
4.0.1latest on PyPI · released Oct 18, 2025
Audit
Dependencies
cocotbrequiredRequired for simulation and testbench execution
Agent activity
4 hits · last 30 days
node
4
Resources
pyuvm — pip install pyuvm · libregistry