Utilities to collect synthesis results
Project description
pysynthutils — Python utilities to manipulate synthesis results
pysynthutils provides a simple, class-based, Pythonic interface for working with the artifacts of physical design tools.
Installation
Since the repository is private, make sure you have SSH access to the iis-git servers.
Then you can simply install this package through pip:
pip install git+ssh://git@iis-git.ee.ethz.ch/colluca/pysynthutils.git@main
Usage
Physical implementation
The API to process artifacts of physical implementation runs is very simple:
from pysynthutils import SynthResults
# Instantiate a SynthResults object providing access to all results
results = SynthResults(run_dir)
# Access any result by:
# - stage name as defined in your backend flow, see Setup section below
# - report, e.g. timing
# - metric, e.g. WNS
wns = results['route_detail']['timing']['WNS']
Report and metric names follow the nomenclature used by Fusion Compiler.
For example, the metric above can be found as WNS in the tables/timing.json report.
Hierarchical data
Most reports have a tabular format, and are easily manipulated as shown above. However, several reports have a hierarchical structure, and are better represented using a tree structure.
For example, we can easily visualize the area of all modules in the design hierarchy (as reported in tables/hierarchy_details.json):
results['route_detail']['hierarchy_details'].tree.show(all_attrs=True)
Hierarchical reports are parsed using the bigtree library. Please refer to its documentation for further information on how to manipulate these structures.
Linting
[!WARNING] At the moment we only support Spyglass linting flows.
The following example illustrates the API to process linting reports:
from pysynthutils import LintViolations
# Instantiate a LintViolations object providing access to the violations in the linting report
violations = LintViolations('path/to/moresimple.rpt')
# violations.df is a pandas DataFrame with columns: rule, severity, file, line, message
errors = violations.df[violations.df['severity'] == 'SynthesisError']
count = len(violations.df[~violations.df['file'].str.contains('.bender', na=False)])
Timestamps
Every report exposes the last-modified time of the underlying file as a datetime object. For standard reports it is a dictionary entry; for hierarchical reports it is an attribute:
# Standard report
ts = results['route_detail']['timing']['timestamp']
# Hierarchical report
ts = results['route_detail']['hierarchy_details'].timestamp
Setup
[!WARNING] At the moment we only support Fusion Compiler flows.
pysynthutils requires your physical design flow to follow a conventional directory structure:
<Run directory>
└───qor_data
├───<Stage 1>
│ ├───reports
│ └───tables
├───<Stage 2>
...
└───<Stage N>
The run directory can have an arbitrary name, and is simply the directory from which the Fusion Compiler flow is launched.
Similarly, the stage directories can also have arbitrary names, but their contents are assumed to follow the structure produced by Fusion Compiler's write_qor_data command.
To produce this structure, simply add the following command to your physical design flow to generate artifacts for each stage in your flow:
write_qor_data -label <Stage N> ...
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pysynthutils-0.0.0.tar.gz.
File metadata
- Download URL: pysynthutils-0.0.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3d666daf13b1ffaaf49b15a71b75f24a67080d8c88a61ebf4cad85cfbb7195aa
|
|
| MD5 |
913564a3342d51ddae4fcd292c37c232
|
|
| BLAKE2b-256 |
f690533748e2eb3cf93ccc76b7c8816a047b4f43d907a07bddd66349848009e2
|
Provenance
The following attestation bundles were made for pysynthutils-0.0.0.tar.gz:
Publisher:
publish-pypi.yaml on colluca/pysynthutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysynthutils-0.0.0.tar.gz -
Subject digest:
3d666daf13b1ffaaf49b15a71b75f24a67080d8c88a61ebf4cad85cfbb7195aa - Sigstore transparency entry: 1704636625
- Sigstore integration time:
-
Permalink:
colluca/pysynthutils@0709b051ce56f001ff0ece935cc76a969183fc3e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/colluca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yaml@0709b051ce56f001ff0ece935cc76a969183fc3e -
Trigger Event:
push
-
Statement type:
File details
Details for the file pysynthutils-0.0.0-py3-none-any.whl.
File metadata
- Download URL: pysynthutils-0.0.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97c201f63a8506d23b953ffab042647f7836dbbbe6c55494d5c423553ed43b0b
|
|
| MD5 |
2e2ba8b84f6fa2c7fd3cedb577a488f0
|
|
| BLAKE2b-256 |
2f683d918d12c4d332338171e06d5d801a8caa8ba66e642255f0fcb5447f3dfe
|
Provenance
The following attestation bundles were made for pysynthutils-0.0.0-py3-none-any.whl:
Publisher:
publish-pypi.yaml on colluca/pysynthutils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pysynthutils-0.0.0-py3-none-any.whl -
Subject digest:
97c201f63a8506d23b953ffab042647f7836dbbbe6c55494d5c423553ed43b0b - Sigstore transparency entry: 1704636693
- Sigstore integration time:
-
Permalink:
colluca/pysynthutils@0709b051ce56f001ff0ece935cc76a969183fc3e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/colluca
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-pypi.yaml@0709b051ce56f001ff0ece935cc76a969183fc3e -
Trigger Event:
push
-
Statement type: