Metadata-Version: 2.4
Name: comopy
Version: 0.7.0
Summary: Co-modeling tools for hardware generation with Python
Author: Microprocessor R&D Center (MPRC), Peking University
Maintainer: Chun Yang
License: MIT
Project-URL: Homepage, https://github.com/mprcpku/comopy
Project-URL: Repository, https://github.com/mprcpku/comopy
Project-URL: Issues, https://github.com/mprcpku/comopy/issues
Keywords: hardware,hdl,simulation,rtl,verilog
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Scientific/Engineering :: Electronic Design Automation (EDA)
Classifier: Topic :: Software Development :: Code Generators
Classifier: Topic :: Software Development :: Testing
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: circt~=1.133.0
Requires-Dist: jinja2>=3.1
Requires-Dist: pybind11>=2.13.0
Requires-Dist: setuptools>=59.0
Requires-Dist: typing_extensions>=4.0; python_version < "3.11"
Provides-Extra: cocotb
Requires-Dist: cocotb>=2.0.0; extra == "cocotb"
Requires-Dist: pytest>=8.4; extra == "cocotb"
Requires-Dist: pytest-cov>=6.2; extra == "cocotb"
Provides-Extra: dev
Requires-Dist: pytest>=8.4; extra == "dev"
Requires-Dist: pytest-cov>=6.2; extra == "dev"
Requires-Dist: types-setuptools>=80.9; extra == "dev"
Requires-Dist: mypy>=1.0; extra == "dev"
Requires-Dist: isort>=5.0; extra == "dev"
Requires-Dist: sphinx_rtd_theme>=3.0; extra == "dev"
Dynamic: license-file

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:

```bash
# 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.

```bash
# 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.

```bash
# 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:

```bash
# 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:

```bash
# 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`.
