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

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9869-cp313-cp313-manylinux_2_34_x86_64.whl (84.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9869-cp312-cp312-manylinux_2_34_x86_64.whl (84.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9869-cp311-cp311-manylinux_2_34_x86_64.whl (84.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9869-cp310-cp310-manylinux_2_34_x86_64.whl (84.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for xls_python-0.1.9869-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 a56a7ee693be8283124bfde903ccb83be1d6423a1f1302cddfb7188a34f3b5bf
MD5 1fa7feeaa29906fda18d9c6865b71c18
BLAKE2b-256 b849980fffa02a672e528f95e1b55d82976005cadc2bc286ba54399d11220b29

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9869-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 648fc8ad2106125e41e757f535c11aa3a59af9f1986ccd001388d322c6891ff9
MD5 56383adda9429dfd01eb128c27ae23bf
BLAKE2b-256 b3637bd984d27a3557142d437c1cf69d508088e2bdfd49dc2a0f1c9bddadc143

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9869-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 dfdd8aa65d5ca74f81ae8ca526dbaace7a2916a7c7d353a8c2bf2bbe301a660c
MD5 148a3a6b5c06bcd89c9f8115f58c5813
BLAKE2b-256 4eb18b5c706b5a96cc6135e23ad089dd0161cd80ee17a9364842ebff3e4f8338

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9869-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f28f799d7e1f3c26b9d6d5337340e57282902e8571e3158be59eee86ad0a9159
MD5 cf2f36c9b44149a2ac470238b98d907a
BLAKE2b-256 5cbc3993e16e8abc52da80ef93613e91c9c021fde9877baff2f01dc8250f94d2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9869-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ae028071bacf2394df97702b4e376d95a0d8bba9e67d1866d8da6ee37fd7ef4e
MD5 33d0075cdb8e8c742b80f617d78b29e2
BLAKE2b-256 932e8cb2e6382830996a47c89e8371e1bc00d038a68583798c8d086ab27e5db4

See more details on using hashes here.

Provenance

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