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

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9929-cp313-cp313-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9929-cp312-cp312-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9929-cp311-cp311-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9929-cp310-cp310-manylinux_2_34_x86_64.whl (85.0 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for xls_python-0.1.9929-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 2ec00ad23b1e425d51ad1f1951188f76aca44a2487ca7ec3f6ea0aac2ba864e4
MD5 f367c3b83fb029246c8e0c779912e51a
BLAKE2b-256 519c53bfafffaaa59df5e57a52326b05f8be6422d5e888695be00074edeafec2

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9929-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 6e9d361f4c33de2c8b0641814f0d22ff5564c9daa35d0b22ae16143ff06824b7
MD5 7451f470da7d7211bde31bfc87c5a97a
BLAKE2b-256 141e9f18e1bdc0bf74079b29533da6e4955e7d24c8b864a11a73f392faf5f97e

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9929-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 62d445c071cd5f4d7b0f0107e6a6e3dc132f1df104a6357babe3258e9a5164a0
MD5 6b6eac910c40adf1120195d3b7b95c04
BLAKE2b-256 c8067f2d6eb5e4d4780a1c602a3161c2f43a095c2f9e46e2f4e8124572ae7ad7

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9929-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 db000f96a27ffb9f348deca5f8937f0555208b9eff6603168a9df9dd1f8a7be5
MD5 d146c4cf7344ca62d2fddddb6b2d5349
BLAKE2b-256 ef3581e5a164eed95c04474358675f823be1398f8c36a3f9ffa543f5b4e4546b

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9929-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 05d431710934ffd97ddc8289b74a6abb7fc06bb5ae98f3191430301a71857f09
MD5 1b652f5c3a2b5dd6cd5f4c0d18f0b55c
BLAKE2b-256 2849c91312443f5a17596b088d329fa4a1cd3d22d07fe951e0d77da9a7e38cef

See more details on using hashes here.

Provenance

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