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 early development. The API is not stable and may change without deprecation.

[!WARNING] The libxls.so library bundled with pyxls is built from official XLS releases. However, since the c APIs are not considered stable in XLS, replacing the bundled library with a custom build may lead to undefined behavior. Currently, pyxls release is done manually, which will likely not keep up with the pace of XLS development. CI builds are planned but no estimated timeline yet. The current version is built against XLS commit 202e8d5ce.

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.1-cp314-cp314-manylinux_2_34_x86_64.whl (83.1 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl (83.1 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl (83.1 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl (83.1 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl (83.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for xls_python-0.1.1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ecdc1334f78aa5bcfa76353da111e26be4af2a11873aac451300760bc92abd82
MD5 a6d21ffdb0e662cf36a6e640c116d3bf
BLAKE2b-256 9b682be47a9555a8d8f376805196f41285222816a66f9aa0d7bf79b76fdfe41c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.1-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.1-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6e50a135f3719c57bf5d70fbec6ec3f97c1bd6da4c8b2e4ce3d12e81cd827cc7
MD5 68233edce7bad8793767979b715e8d05
BLAKE2b-256 392d3e2509e8a29408d8341f9062c15d735abc73d497f61c28951a4d3dcc3a25

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.1-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.1-cp312-cp312-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7231a8dfa59a9799fadfa5b1c4ad4e48b84d5bc26d8aaf6f195186bfa84d13ff
MD5 6a8e472cdfb6243374c5a89e5c04531b
BLAKE2b-256 fd3aeb350e6930d0efcfb6705e8613fddf96c578e3ac436d54ebb60cd42d462c

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.1-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.1-cp311-cp311-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 66e0c2c6de28ccacf9c627d44c3486c4cd5ea027259acb4d7c8889ad2eec95ce
MD5 2effe73524a8d60edaa374c0becc169d
BLAKE2b-256 33098e066240dea3b6f7951a925784d3d0d8c607a107bd1f09e46eebe9eebb59

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.1-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.1-cp310-cp310-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 5d2aef30833f2c25b3bbdcf867bccd3f2b1854e4b1e874f4e163af0880650f1f
MD5 f7fb35cb7560dbdaca17c170a5fbd5f6
BLAKE2b-256 4e92920b3a431a63bf04ce121acbc967c3a4f7d22767fb8de4342a08f6dd2f00

See more details on using hashes here.

Provenance

The following attestation bundles were made for xls_python-0.1.1-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