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.0-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.0-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.0-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.0-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.0-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.0-cp314-cp314-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for xls_python-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 00a1ded387642f804faaf61b2d6c8156d263ae838a8f7868c6b5fdc34c0212df
MD5 df55c3d3f2c800ce4436b200df50452c
BLAKE2b-256 2706fc1eef797c544478cf5f4b6ca62d19580df41d0a5490b5fa14a9a0f50708

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 1b368cd02a58865587dbbd0c326b09034c642dc87ab997bb65658e9914e8ae24
MD5 c3e19f89ffbf637d8d4d005feb594672
BLAKE2b-256 f1c09217878cbb8a03d1972475bcb99bea6c67eacbcfa1e8609eacff110dbf7d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 eff7e714014390e6fa94d3136643303ceb94d0bbf34954f4f4f0b2702ab09e96
MD5 6d56979a1fd65230388fd87c12c7fe98
BLAKE2b-256 4e2136e2829c114eb46e9112924bf0e86d00dcd9f4514f92984673f5fdb332db

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 f502ba73f4b9957db6e12244573750e2e1d26c298109ca6c8648c5291babc03c
MD5 105f65c9cd829d7dac034cea963448b6
BLAKE2b-256 53eb0a4e9eef4b8aba11bab4fdbd8549c06a5ccb554c592464409faaceb1d8af

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 91e60241a61d5e5da6bd7ea24f1cc001de7e497ca1b2612501b7e174f57b6302
MD5 deacca74ddbcac8946ea8d4f938de32c
BLAKE2b-256 1e07661fb8e2a2834a2b83b7e8f687072c4150f6c42c0827390d365cf848640c

See more details on using hashes here.

Provenance

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