Metadata-Version: 2.1
Name: vivado-report-parser
Version: 0.5.0
Summary: A Python library for parsing Vivado report files.
Home-page: https://github.com/jesselooney/vivado-report-parser
License: GPL-3.0-or-later
Author: Jesse Looney
Author-email: jmlooney64@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Dist: argparse (>=1.4.0,<2.0.0)
Project-URL: Repository, https://github.com/jesselooney/vivado-report-parser
Description-Content-Type: text/markdown

# vivado-report-parser
This Python library provides functions for parsing Vivado report files into Python objects. Currently, it only supports "tables-style" reports like those generated by the `report_power` and `report_utilization` Vivado Tcl commands.

The package comes with a script called `parse-vivado-report` that reads from a given report file (or stdin) and outputs a JSON representation of the data.

Documentation is provided in the docstrings of each module and function.

## Installation

```
$ pip install vivado-report-parser
```

## Example Usage

### CLI
```
$ parse-vivado-report power.rpt -d power.rpt.json
```
or
```
$ ... | parse-vivado-report -d power.rpt.json
```
### Library
```python
from vivado_report_parser import parse_metadata, parse_vivado_report

with open('power.rpt', 'r') as f:
  file_content = f.read()

metadata = parse_metadata(file_content)
data = parse_vivado_report(file_content)

print(data['Summary']['Total On-Chip Power (W)'])
...
```

## Copyright Notice
Copyright 2024 Jesse Looney

All the files in this repository are part of vivado-report-parser.

vivado-report-parser is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>. 

