Skip to main content

Python binding for XLS

Project description

pyxls

Documentation PyPI LGPLv3

Python bindings for the XLS (eXtensible Logic Synthesis) compiler infrastructure.

[!NOTE] pyxls is a third-party project interfacing with the XLS C API. It is not affiliated, endorsed, or maintained by the XLS team at Google.

[!WARNING] pyxls is in development. The API is not stable and may change without deprecation.

Installation

pip install xls-python

Or from source (requires a C++20 compiler, Meson, and Ninja):

pip install .

Quick Start

from xls import Package, Value

IR = """
package my_pkg

top fn add(x: bits[32], y: bits[32]) -> bits[32] {
  ret add.3: bits[32] = add(x, y, id=3)
}
"""

pkg = Package.parse_ir(IR)
fn = pkg.get_function('add')
result = fn.interpret([Value.make_ubits(32, 3), Value.make_ubits(32, 4)])
print(result.to_string())  # bits[32]:7

Documentation

See https://calad0i.github.io/pyxls/ for full documentation.

License

Apache 2.0

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

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

xls_python-0.1.9934-cp314-cp314-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9934-cp313-cp313-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9934-cp312-cp312-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9934-cp311-cp311-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9934-cp310-cp310-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file xls_python-0.1.9934-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9934-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 17a60c344c30c8b4d1daab9cf9a1e99c800b844f9ba85ba1b57c6ab0248d72b6
MD5 017627f717ead4b6b9e6e492ad284881
BLAKE2b-256 5dc62b11b4298b98191bad624a75912819e1886b79e1adfe2471b3fadb0dc821

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.9934-cp314-cp314-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on calad0i/pyxls

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

File details

Details for the file xls_python-0.1.9934-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9934-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 8babc207b9815fc0dae46d34d537c21162e174c675b00e0e808757a87a98c205
MD5 8198255926c6ca6ecba508ee0dc5cba3
BLAKE2b-256 e9a6eb828a2c1278398e78e8f6d3ebd740a9bde14b58f9006d456e9227e55445

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.9934-cp313-cp313-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on calad0i/pyxls

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

File details

Details for the file xls_python-0.1.9934-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9934-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5314c23ce09d36e93b5bbb868a6407a52488f3847ae8f1d25931ccc7dc8e8c8a
MD5 181cf8e7ed9fef46bb953c73f372dbfb
BLAKE2b-256 ad651580458bb6c887c2ab75d37fe21719666186bb186f4d551be1a4fb695d0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.9934-cp312-cp312-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on calad0i/pyxls

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

File details

Details for the file xls_python-0.1.9934-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9934-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 00d791eb26cd71d8af4d3965767852a2c21e0b404e808c879949cefd712cfde7
MD5 cb9575c34651640ee0c4e2ac61e8edd5
BLAKE2b-256 5ee999d3c2bd3cbfe399a57a8d8a86850c2e9bbe6f4ae7d2734c26a708db0b62

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.9934-cp311-cp311-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on calad0i/pyxls

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

File details

Details for the file xls_python-0.1.9934-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9934-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ceec53017fb0995a63c50150bf07fb3691bc04958b8ad02dbe837d7daedd35d3
MD5 b1b8fe38e80c41742201d17fb87de77d
BLAKE2b-256 7c16e13e903f35bff045ef65d000d71681dba5a5af4aa6ced69410aeeb5620f9

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.9934-cp310-cp310-manylinux_2_34_x86_64.whl:

Publisher: python-publish.yml on calad0i/pyxls

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