Boundary scan test library
Project description
EByST
Boundary scan test framework for board validation
Basic example
# initialize JTAG interface driver (currently only FTDI chips with MPSSE are supported)
drv = ebyst.drivers.MPSSE(ebyst.drivers.MPSSE.list_devices()[0])
ctl = ebyst.TapController(drv)
ctl.detect_chain()
# Add device(s) to chain
dev = ebyst.Device.from_bsdl("bsdl/BSDLLCMXO2-256HCQFN32.BSM")
ctl.add_device(dev)
ctl.validate_chain()
# Start test
ctl.extest()
# Loopback test (assuming loopback on pins
dev.pinmap['O'].output_enable(True)
dev.pinmap['I'].output_enable(False)
dev.pinmap['O'].set_value(1)
await ctl.cycle() # drive output
await ctl.cycle() # sample input
print(dev.pinmap['I'].get_value())
dev.pinmap['O'].set_value(0)
await ctl.cycle() # drive output
await ctl.cycle() # sample input
print(dev.pinmap['I'].get_value())
# I2C test
i2c = ebyst.interfaces.I2C(ctl, dev.pinmap['PB9A'], dev.pinmap['PB4B'])
await i2c.init()
dev_address = 0xa0
reg_address = 0x10
data = 0xa5
print(f"Writing {dev_address:02x}:{reg_address:02x} <= {data:02x}")
await i2c.write(0xa0, 0x10, 0xa5)
print(f"Reading {dev_address:02x}:{reg_address:02x} => ", end='')
await x = i2c.read(0xa0, 0x10)
print(f"{x:02x}")
ctl.reset()
Async
The library uses asyncio to allow running multiple tests in parallel.
When the loopback test and I2C test above are put in different tasks, they share the same boundary scan cycles,
meaning they run completely parallel
(Note that this only works when they are not using different pins, if pins are shared between tests, make sure to
schedule them appropriately)
Example;
async def main():
drv = ebyst.drivers.MPSSE(ebyst.drivers.MPSSE.list_devices()[0])
dev = ebyst.Device.from_bsdl("bsdl/BSDLLCMXO2-256HCQFN32.BSM")
ctl = ebyst.TapController(drv)
ctl.detect_chain()
ctl.add_device(dev)
ctl.validate_chain()
ctl.extest()
async with asyncio.TaskGroup() as tg:
tg.create_task(loopback_test(ctl, dev.pinmap['PB2C'], dev.pinmap['PB2A']))
tg.create_task(loopback_test(ctl, dev.pinmap['PB4C'], dev.pinmap['PB4D']))
if __name__ == "__main__":
logging.basicConfig()
logging.getLogger().setLevel(logging.INFO)
asyncio.run(main())
see also tests/test_async.py
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 Distribution
Built Distribution
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 ebyst-0.2.1.tar.gz.
File metadata
- Download URL: ebyst-0.2.1.tar.gz
- Upload date:
- Size: 67.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25467af4abf751f350d90425a29c2758f1e786df98e0a1737efc2c4b4a8446ff
|
|
| MD5 |
577f282301c83e5d9bb5c1e205afe76c
|
|
| BLAKE2b-256 |
5c07b5180c571f0d24e6a77e42f69545b0371d1a5644cb6b45f1c82c0e7d6b6d
|
Provenance
The following attestation bundles were made for ebyst-0.2.1.tar.gz:
Publisher:
publish-to-pypi.yml on swolix/ebyst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ebyst-0.2.1.tar.gz -
Subject digest:
25467af4abf751f350d90425a29c2758f1e786df98e0a1737efc2c4b4a8446ff - Sigstore transparency entry: 157706813
- Sigstore integration time:
-
Permalink:
swolix/ebyst@6ee1b523196df6462ab797e666b9f14b12513e17 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/swolix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@6ee1b523196df6462ab797e666b9f14b12513e17 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ebyst-0.2.1-py3-none-any.whl.
File metadata
- Download URL: ebyst-0.2.1-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
37a7f9c27fb1037bf2493cc8ccbff9735115658b8a3a567bf342cc046fc18bda
|
|
| MD5 |
ae36a53c31e3b0d5fe7e2634ad257a91
|
|
| BLAKE2b-256 |
efd0bb0d3d2669d2545914be329df4e6b1cc305959f62a76fc6015210f3dba02
|
Provenance
The following attestation bundles were made for ebyst-0.2.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on swolix/ebyst
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ebyst-0.2.1-py3-none-any.whl -
Subject digest:
37a7f9c27fb1037bf2493cc8ccbff9735115658b8a3a567bf342cc046fc18bda - Sigstore transparency entry: 157706814
- Sigstore integration time:
-
Permalink:
swolix/ebyst@6ee1b523196df6462ab797e666b9f14b12513e17 -
Branch / Tag:
refs/tags/v0.2.1 - Owner: https://github.com/swolix
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@6ee1b523196df6462ab797e666b9f14b12513e17 -
Trigger Event:
push
-
Statement type: