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

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9892-cp313-cp313-manylinux_2_34_x86_64.whl (84.5 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9892-cp312-cp312-manylinux_2_34_x86_64.whl (84.5 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9892-cp311-cp311-manylinux_2_34_x86_64.whl (84.5 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9892-cp310-cp310-manylinux_2_34_x86_64.whl (84.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for xls_python-0.1.9892-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 eb7f40a5b98c7be94f97ac70931c0f784eb07e8129e7775b0544b3644219c732
MD5 ddc65cc61d98e5688ad3d74c7d0cc0e9
BLAKE2b-256 6bbe2181547e5b368407c71f700aff7b9c673bb8718d1c006090d0fc295ad74a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9892-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6ba1eff77b612ec093b9088846f733260da57dd4fdebffb9748893fd5fa803ba
MD5 01d2d3d603d0870d88b2b9e5c882d980
BLAKE2b-256 1c45195ced5e9a947f3a62c9208e7bf4b15ca5b07f69b443d74395c0ad010a23

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9892-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7dba48238887df38e06b4b7287428f49898b5baa2f6c05bdfe9d434d923e0d92
MD5 05f1c5af04e71aa57159ded674898e31
BLAKE2b-256 2302bd467a62dae914d7c96c784297b5b5456d341ea8e41c55ae89a935424634

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9892-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 cbcf8552b88563deb7e994ee76fa930efa8ec17ba8816cb3c9b65bd3c0ccc503
MD5 5b0b0a9d090d1767a0743f94e80d973c
BLAKE2b-256 8fe9f09acd14ba9ad6ddf57d2e57b9aaa3ef92caecd4178e4f60df3378a1c360

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9892-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 aba055be24439fa5a72940d0753fc1d38c5de2d3c06072a71dca878539f01c4e
MD5 481494bb7b315d6b50f2215f9f9b880a
BLAKE2b-256 cbba17e8a4e7f2d259e81c082e2b5d88d218a6b3edbdd7375f8e0046d419e11f

See more details on using hashes here.

Provenance

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