Skip to main content

Co-modeling tools for hardware generation with Python

Project description

ComoPy: Co-modeling Tools for Hardware Generation with Python

ComoPy (Co-modeling tools in Python) is a Python-based Hardware Generation, Simulation, and Debugging Framework (HGSDF) that enables hardware development with the same ease and flexibility as software development.

Development Setup

Prerequisites

  • Python 3.10+
  • pip (Python package installer)

Install Dependencies

To set up the development environment, install the required dependencies:

# Install core dependencies.
pip install -e .

# Install dependencies for cocotb extension.
pip install -e ".[cocotb]"

# Install development dependencies (for testing).
pip install -e ".[dev]"

Verilator is required for VSimulator and checkpoint. This has been tested with Verilator 5.040.

# Verify the installation.
verilator --version

Icarus Verilog is used for testing the cocotb extension but is not a runtime dependency. This has been tested with iverilog v13_0.

# Verify the installation.
iverilog -v

Install Pre-commit Hooks

If you plan to contribute to the project, install pre-commit hooks to automatically check code quality before commits:

# Install pre-commit
pip install pre-commit

# Install the git hooks
pre-commit install

Run Tests

After installing the development dependencies, you can run the test suite using pytest:

# Run all tests
pytest

# Run tests with coverage report
pytest --cov=comopy

# Run tests with HTML coverage report
pytest --cov=comopy --cov-report=html

# Run tests in verbose mode
pytest -v

# Run specific test file
pytest comopy/tests/test_specific.py

The conftest.py provides a comopy_path fixture for test paths. For complex directory structures, configure additional paths in pytest.ini.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

comopy-0.7.0.tar.gz (179.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

comopy-0.7.0-py3-none-any.whl (237.3 kB view details)

Uploaded Python 3

File details

Details for the file comopy-0.7.0.tar.gz.

File metadata

  • Download URL: comopy-0.7.0.tar.gz
  • Upload date:
  • Size: 179.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for comopy-0.7.0.tar.gz
Algorithm Hash digest
SHA256 d4144c8bb9928b4b2901dfc44fe365ecde8961eea30fa9961de6389cb9576d37
MD5 74230c68037325b4d116b06b5f84d642
BLAKE2b-256 f0eeb6bd168d1c813bc40da45038f59caff4a61242907ebab22705cebe5d4e3c

See more details on using hashes here.

File details

Details for the file comopy-0.7.0-py3-none-any.whl.

File metadata

  • Download URL: comopy-0.7.0-py3-none-any.whl
  • Upload date:
  • Size: 237.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for comopy-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d8eb1cb11345d398c978784d6bd5076a5937430a8f09316195819a147331f99
MD5 bbd0090c038696108c4257d66a10d26d
BLAKE2b-256 f25201fa7f4bfe242a315f72ff1879dce3ca541eaa441c65e6da326db64172f2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page