Metadata-Version: 2.4
Name: pyuvcgen
Version: 1.0.2
Summary: Python based UVM-UVC generator
Author: Ciro Bermudez
License: MIT License
        
        Copyright (c) 2025 Ciro Bermudez
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/cirofabianbermudez/pyuvcgen
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: Jinja2>=3.1.6
Requires-Dist: PyYAML>=6.0.2
Dynamic: license-file

# pyuvcgen

`pyuvcgen` is a lightweight Python-based code generator that leverages the
[`jinja2`](https://jinja.palletsprojects.com/en/3.1.x/) templating engine
and the [`pyyaml`](https://pyyaml.org/) YAML parser packages to produce
UVM (Universal Verification Methodology) UVCs (UVM Verification
Components) templates.

## Features

- Generates ready-to-use UVM UVC code from customizable templates.
- Configurable via a simple YAML file (`uvc.yaml`)
- Following industry best practices:
  - [The Easier UVM Coding Guidelines (Doulos)](https://www.doulos.com/media/1277/easier-uvm-coding-guidelines-2016-06-24.pdf)
  - [UVM Guidelines (SIEMENS Verification Academy)](https://verificationacademy.com/cookbook/uvm-universal-verification-methodology/uvm-guidelines/)
- Isolated environment for testing UVCs, with the option to integrate the generated UVC as a Git submodule in larger projects.
- Can also be used to scaffold test environments for small RTL designs.

## Prerequisites

- Python 3.9.21 or later.

## Installing

Install from [PyPi](https://pypi.org/project/pyuvcgen/) using pip:

```bash
python3 -m pip install pyuvcgen
```

## Example

The easiest way to use `pyuvcgen` is via the command line tool:

```bash
# Verify installation
pyuvcgen -h

# Generate UVC from YAML file
pyuvcgen -c uvc.yaml
```

## Development

1. Clone de repository and navigate to its root directory:

    ```bash
    git clone https://github.com/cirofabianbermudez/pyuvcgen.git
    cd pyuvcgen
    ```

2. Create a Python virtual environment and install dependencies:

    ```bash
    ./script/setup/setup_python_env.sh
    source .venv/bin/activate
    ```

3. Verify installation:

    ```bash
    pyuvcgen -h
    ```

## Usage

1. Activate your Python virtual environment (if not already active):

   ```bash
   source .venv/bin/activate
   ```

2. Navigate to the `tests/` directory:

   ```bash
   cd tests/
   ```

3. Edit the configuration file `yaml/uvc.yaml` to suit your UVC requirements.

4. Generate the UVC code:

   ```bash
   pyuvcgen -c yaml/uvc.yaml
   ```

5. After running the command, a `generated_uvc/` directory will appear in `tests/`, containing your UVC code.

## License

Distributed under the MIT License. See `LICENSE` for details.

## Contributing

Contributions, issues, and feature requests are welcome! Feel free to check issues or submit a pull request.
