cocotb-coverage
Functional Coverage and Constrained Randomization Extensions for Cocotb
Decision gist · record as of 2026-08-14
Yes, if you are using cocotb and need SystemVerilog-style constrained randomization and coverage tracking. The package is stable (version 2.0 released recently), has no known vulnerabilities, and low install friction. The aging maintenance status (315 days since last release) is a minor concern but not a blocker if the feature set meets your needs. Verify that version 2.0 is compatible with your cocotb version and test requirements before committing to production use.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.11 or later and cocotb as a runtime dependency.
- Low friction install as a pure Python wheel.
- Maintenance status is aging—last release was 315 days ago—but the repository remains active and the package targets current Python versions (3.11+).
License · maintenance · safety
BSD (permissive) — BSD license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
last release 2025-10-03 (315 days) · last repo commit 2025-10-03 · 127 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 382,362 downloads/mo, #7,088 on PyPI
Alternatives
Verify before relying
pip install cocotb-coverage
from cocotb_coverage import crv, CoverPoint, CoverCross
class Point(crv.Randomized):
def __init__(self, x, y):
crv.Randomized.__init__(self)
self.x = x
self.y = y
self.add_rand("x", list(range(-10, 10)))
self.add_rand("y", list(range(-10, 10)))
self.add_constraint(lambda x, y: x < y)
p = Point(0, 0)
p.randomize()- Whether version 2.0 is stable or still subject to breaking changes relative to 1.2.0.
- Current test coverage and test suite maturity for the 2.0 release.
- Performance characteristics when handling large constraint spaces or coverage databases.
What it is and what it does
cocotb-coverage extends the cocotb hardware verification framework with constrained random verification (CRV) and metric-driven verification (MDV) techniques traditionally found in SystemVerilog or _e_. It allows you to define randomized objects with constraints, sample functional coverage points and crosses, and export coverage results to XML or YAML formats for analysis and merging.
The package is designed for developers building advanced verification environments for complex hardware projects. It depends on cocotb for testbench execution, python-constraint for constraint solving, and pyyaml for coverage export. The implementation aims to be intuitive for users familiar with SystemVerilog verification methodologies while providing Python-native abstractions.
Use it for
- Build constrained random testbenches for complex hardware designs using Python instead of SystemVerilog.
- Define and track functional coverage metrics (cover points and crosses) across multiple test runs.
- Export and merge coverage databases in XML or YAML format for cross-tool analysis and reporting.
- Implement metric-driven verification workflows to guide test generation toward uncovered design scenarios.
- Extend cocotb testbenches with advanced randomization strategies beyond simple random generation.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you are using cocotb and need SystemVerilog-style constrained randomization and coverage tracking.
The package is stable (version 2.0 released recently), has no known vulnerabilities, and low install friction. The aging maintenance status (315 days since last release) is a minor concern but not a blocker if the feature set meets your needs. Verify that version 2.0 is compatible with your cocotb version and test requirements before committing to production use.
Install
cocotb-coverage on PyPI
Before you install
Low friction install as a pure Python wheel. Maintenance status is aging—last release was 315 days ago—but the repository remains active and the package targets current Python versions (3.11+).
Requires Python 3.11 or later and cocotb as a runtime dependency.
License in practice
BSD license is permissive; you can use, modify, and distribute this package with minimal restrictions, provided you include the license notice.
Quickstart
pip install cocotb-coverage
from cocotb_coverage import crv, CoverPoint, CoverCross
class Point(crv.Randomized):
def __init__(self, x, y):
crv.Randomized.__init__(self)
self.x = x
self.y = y
self.add_rand("x", list(range(-10, 10)))
self.add_rand("y", list(range(-10, 10)))
self.add_constraint(lambda x, y: x < y)
p = Point(0, 0)
p.randomize()
Verify before relying
- Whether version 2.0 is stable or still subject to breaking changes relative to 1.2.0.
- Current test coverage and test suite maturity for the 2.0 release.
- Performance characteristics when handling large constraint spaces or coverage databases.
Package facts
| License | BSD permissive |
| Python support | Supports the current Python release >=3.11 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagescocotbpython-constraintpyyaml |
| Maintenance | Aging 315 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 382,362 / month, #7,088 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | License :: OSI Approved :: BSD LicenseProgramming Language :: Python :: 3Topic :: Scientific/Engineering :: Electronic Design Automation (EDA) |
Evidence: cocotb_coverage-2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “constrained random verification python”
- cocotb-coverageAdds constrained randomization and functional coverage capabilities…
- pyvscPyVSC generates randomized test stimulus and defines and collects…
- bayesian-optimizationBayesian optimization using Gaussian processes to find the maximum of…
Give your agent the search over MCP, or paste the wish link into any chat.
More Electronic Design Automation (EDA) packages
Parses and elaborates SystemRDL 2.0 register description language into a traversable register model, enabling custom code generation for hardware register spaces.
Install it if you need to parse SystemRDL files or build custom register generators.
Tests whether a graph is planar, computes planar embeddings, draws planar graphs as ASCII art, and isolates forbidden subgraphs using algorithms from the Edge Addition Planarity Suite.
cocotb is a Python framework for writing testbenches that simulate and verify VHDL and Verilog hardware designs through coroutine-based cosimulation.
pyslang provides Python bindings to parse, analyze, and elaborate SystemVerilog code, exposing the underlying slang compiler's syntax tree and evaluation capabilities for programmatic inspection and manipulation.
Converts between SystemRDL register descriptions and IP-XACT XML format, enabling import and export workflows for hardware register modeling.
KLayout is a Python package for layout viewing, editing, and scripting in electronic design automation (EDA) workflows, providing programmatic access to design manipulation and analysis.
See also pyucis · pyvsc · cocotb-bus · pyuvm · cocotb-test · peakrdl-regblock · tree-sitter-verilog · dvsim · samplomatic