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.9875.post1-cp314-cp314-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9875.post1-cp313-cp313-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9875.post1-cp312-cp312-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9875.post1-cp311-cp311-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9875.post1-cp310-cp310-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

Details for the file xls_python-0.1.9875.post1-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.9875.post1-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f2f62ae63217b36de86fa214cd1be1e5853be9f1b8d2640295ad7f2f44dc8127
MD5 a047749ea7c5a09fb50a01ba5190d846
BLAKE2b-256 eb0e141cc00f3cff11c11170f3af9d28d56dc1c5908a3318e486cfc05ffa21b9

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875.post1-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ef5e9912365681c637b8eb051f89b0a27826e3eb66a1b9cfe27719dcc4c92ad9
MD5 8f31d4f9b488a6e6b64bd9c32248beb9
BLAKE2b-256 7fde209c6bec648123ffc4cf182b60c9bf04d812b0fb286ba0d0e8c910edb229

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875.post1-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 d6786130ef11c57510ffe77420dee14534e6e23cb53f967b39ef610f3a6bf138
MD5 6ccb7f8f8690d2c08c2e608bbba10e93
BLAKE2b-256 5ee688540509c19b6489149ae4357623e6ee5c7a45db45a8a2ef57e87db98641

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875.post1-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 44bf3d00c67b3063eca3ce6a94651c089cb943992a049b0525b63970ca1484a9
MD5 0c23df66e0785dbc73f051e9f425ffe7
BLAKE2b-256 faf6ab496a067c9c55e03d4fbe3ab82c720ec9f4d29764db4ea61b6a8cc48291

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875.post1-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 4ff64114617e1965495608f88fd5a3c29c9e4cc2fc9ae482596a378290841ed2
MD5 28c4a246629386798d50f28c9aaf5e44
BLAKE2b-256 9f48650d93b0f9cd074bc96d1d4dcf5f505a8c8ba3b8052db692a0f43b6c02c7

See more details on using hashes here.

Provenance

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