Python binding for XLS
Project description
pyxls
Python bindings for the XLS (eXtensible Logic Synthesis) compiler infrastructure.
[!NOTE]
pyxlsis 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.solibrary 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 commit202e8d5ce.
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xls_python-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: xls_python-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 83.1 MB
- Tags: CPython 3.14, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
00a1ded387642f804faaf61b2d6c8156d263ae838a8f7868c6b5fdc34c0212df
|
|
| MD5 |
df55c3d3f2c800ce4436b200df50452c
|
|
| BLAKE2b-256 |
2706fc1eef797c544478cf5f4b6ca62d19580df41d0a5490b5fa14a9a0f50708
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xls_python-0.1.0-cp314-cp314-manylinux_2_34_x86_64.whl -
Subject digest:
00a1ded387642f804faaf61b2d6c8156d263ae838a8f7868c6b5fdc34c0212df - Sigstore transparency entry: 1113858738
- Sigstore integration time:
-
Permalink:
calad0i/pyxls@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file xls_python-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: xls_python-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 83.1 MB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b368cd02a58865587dbbd0c326b09034c642dc87ab997bb65658e9914e8ae24
|
|
| MD5 |
c3e19f89ffbf637d8d4d005feb594672
|
|
| BLAKE2b-256 |
f1c09217878cbb8a03d1972475bcb99bea6c67eacbcfa1e8609eacff110dbf7d
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xls_python-0.1.0-cp313-cp313-manylinux_2_34_x86_64.whl -
Subject digest:
1b368cd02a58865587dbbd0c326b09034c642dc87ab997bb65658e9914e8ae24 - Sigstore transparency entry: 1113858742
- Sigstore integration time:
-
Permalink:
calad0i/pyxls@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file xls_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: xls_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 83.1 MB
- Tags: CPython 3.12, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eff7e714014390e6fa94d3136643303ceb94d0bbf34954f4f4f0b2702ab09e96
|
|
| MD5 |
6d56979a1fd65230388fd87c12c7fe98
|
|
| BLAKE2b-256 |
4e2136e2829c114eb46e9112924bf0e86d00dcd9f4514f92984673f5fdb332db
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xls_python-0.1.0-cp312-cp312-manylinux_2_34_x86_64.whl -
Subject digest:
eff7e714014390e6fa94d3136643303ceb94d0bbf34954f4f4f0b2702ab09e96 - Sigstore transparency entry: 1113858749
- Sigstore integration time:
-
Permalink:
calad0i/pyxls@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file xls_python-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: xls_python-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 83.1 MB
- Tags: CPython 3.11, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f502ba73f4b9957db6e12244573750e2e1d26c298109ca6c8648c5291babc03c
|
|
| MD5 |
105f65c9cd829d7dac034cea963448b6
|
|
| BLAKE2b-256 |
53eb0a4e9eef4b8aba11bab4fdbd8549c06a5ccb554c592464409faaceb1d8af
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xls_python-0.1.0-cp311-cp311-manylinux_2_34_x86_64.whl -
Subject digest:
f502ba73f4b9957db6e12244573750e2e1d26c298109ca6c8648c5291babc03c - Sigstore transparency entry: 1113858755
- Sigstore integration time:
-
Permalink:
calad0i/pyxls@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Trigger Event:
release
-
Statement type:
File details
Details for the file xls_python-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: xls_python-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 83.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91e60241a61d5e5da6bd7ea24f1cc001de7e497ca1b2612501b7e174f57b6302
|
|
| MD5 |
deacca74ddbcac8946ea8d4f938de32c
|
|
| BLAKE2b-256 |
1e07661fb8e2a2834a2b83b7e8f687072c4150f6c42c0827390d365cf848640c
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
xls_python-0.1.0-cp310-cp310-manylinux_2_34_x86_64.whl -
Subject digest:
91e60241a61d5e5da6bd7ea24f1cc001de7e497ca1b2612501b7e174f57b6302 - Sigstore transparency entry: 1113858744
- Sigstore integration time:
-
Permalink:
calad0i/pyxls@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/calad0i
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@8ae9884c5371cc4253f354f7772b5309f06cf1eb -
Trigger Event:
release
-
Statement type: