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

File metadata

File hashes

Hashes for xls_python-0.1.9875-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3fe016c4c99aa55a052d3d17c54edc09fb5729788b8116deee3f5ce09a90c725
MD5 123b3bf28c784d28d9d2adbbe14eb7a8
BLAKE2b-256 ec97129da3d0b019ee0f2c05924a4268ee26730c77bc0dbd39ded2a363e9b48d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 3b754a735748e3f1a14a4444fc86665601356fd38e4f0d231cd79740b1760a0c
MD5 165ecf09ce54cc85e32e098e4ff6938b
BLAKE2b-256 51c35e8366c274350360568ea6656752212981f90ff8af20517eddd01bead072

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7f878537ed871edc2ad79671839f9f8d96bb5486b8de285b7987c0a55a7e36e2
MD5 2c7df43eff393cf0025b35a1d0ae7469
BLAKE2b-256 212f63aefbb9c15c538348bc71fe4070fe7e2dd66bd36a279bc4c266168b256a

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 c7cd24071572a5efff5b568fda511f8058fcbe4368939d814958ef68f719cb5f
MD5 dc74a1e79ac7ad3789fb17f2a653fb6e
BLAKE2b-256 361b30fc6eb29983fa02117f5bfe220f113384fed3a53936abd5a1610cc3d4e2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9875-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 99c379e6c22ba7752dcab489a612ddfa668de8311b91a2997201c5cb411ca648
MD5 560b1958bcb4dc237e71af9db3e449cd
BLAKE2b-256 701ee78439e142a913022c195fda2994bab4c1a3bdf4d3bb895c994c84350835

See more details on using hashes here.

Provenance

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