Skip to main content

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


Download files

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

Source Distribution

pysynthutils-0.0.0.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

pysynthutils-0.0.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

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

Hashes for pysynthutils-0.0.0.tar.gz
Algorithm Hash digest
SHA256 3d666daf13b1ffaaf49b15a71b75f24a67080d8c88a61ebf4cad85cfbb7195aa
MD5 913564a3342d51ddae4fcd292c37c232
BLAKE2b-256 f690533748e2eb3cf93ccc76b7c8816a047b4f43d907a07bddd66349848009e2

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysynthutils-0.0.0.tar.gz:

Publisher: publish-pypi.yaml on colluca/pysynthutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pysynthutils-0.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 97c201f63a8506d23b953ffab042647f7836dbbbe6c55494d5c423553ed43b0b
MD5 2e2ba8b84f6fa2c7fd3cedb577a488f0
BLAKE2b-256 2f683d918d12c4d332338171e06d5d801a8caa8ba66e642255f0fcb5447f3dfe

See more details on using hashes here.

Provenance

The following attestation bundles were made for pysynthutils-0.0.0-py3-none-any.whl:

Publisher: publish-pypi.yaml on colluca/pysynthutils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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