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

Uploaded CPython 3.14manylinux: glibc 2.34+ x86-64

xls_python-0.1.9898-cp313-cp313-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

xls_python-0.1.9898-cp312-cp312-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.34+ x86-64

xls_python-0.1.9898-cp311-cp311-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.34+ x86-64

xls_python-0.1.9898-cp310-cp310-manylinux_2_34_x86_64.whl (84.4 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.34+ x86-64

File details

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

File metadata

File hashes

Hashes for xls_python-0.1.9898-cp314-cp314-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 fb6d05a4424f2f62a8388c6a36af191728559f90874c716081c696bac119d401
MD5 d85464faee4304edb4886e6b565c4e5e
BLAKE2b-256 9bc2d93e9b155aa918fa3f480c6f9f0872819ef75d08d2993ac0c3dcf4ea922c

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9898-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 b8563995cebceed6817cc6bf72d62ee245e66a0f900718b2111c1a91b06eda29
MD5 e5537f0e0323df4f63357d32b7281ce8
BLAKE2b-256 e4e0c22529c8e9616653e419d529f0a35a5b544049ba971cb666e19afb6ba10d

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9898-cp312-cp312-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 7694a2c4b0e8690921fcff35f650ee70a6556facffe69406001c7452f5d05809
MD5 836c38e1a5f358033ecd664539a57035
BLAKE2b-256 e4904e497c8e1e54ea88f11b1a7fcf2af33ab04ec6f08aecf1450e99ee4123f1

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9898-cp311-cp311-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 ae987b3577dcbb02f4bb97043526e4ddce17c53f23190621bf4ca3dc9a276edc
MD5 d439110dbc1582f804d7388e98b1ccea
BLAKE2b-256 9f300a0a23025d0f89c6f84f4a1640154c115928380a4c2f6173f5c32c2db727

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for xls_python-0.1.9898-cp310-cp310-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 bf30c63ae7e2cda6c4bb25581dbdaa2c8d4fd61b883c242abed687136d04358c
MD5 15d2adc9de17fd8f11cfeffa78dbe7d2
BLAKE2b-256 f6daa5f2eb0046eb67cf33a00e5dc38a965512a53719ec752218eaf4f1be6cd4

See more details on using hashes here.

Provenance

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