Skip to main content

tapestry

[WIP] A python package to add JTAG, IJTAG and TAP in DFT-inserted circuitry and do ICL and PDL — package/CLI name is warptap.

Usage

warptap is a library, not (yet) a CLI tool — import it and call its functions directly. The core pipeline is: insert a JTAG/IJTAG test-access network into your design, then either drive it (PDLInterpreter) and emit a real ATE pattern file, or hand the inserted netlist onward.

from warptap import (
    InstrumentSpec, InstrumentDirection, SignalBinding,
    insert_test_access, PDLInterpreter, to_svf,
)

# One instrument per real signal you want write/read access to.
specs = [
    InstrumentSpec(
        "ctrl_write", width=1, capture_value=0,
        direction=InstrumentDirection.WRITE,
        signal_bits=(SignalBinding("ctrl_in"),),
    ),
    InstrumentSpec(
        "status_read", width=1, capture_value=0,
        direction=InstrumentDirection.READ,
        signal_bits=(SignalBinding("status_out"),),
    ),
]

# Ingest your design, insert the TAP + SIB/instrument network, get back synthesizable Verilog
# plus everything needed to drive it.
inserted_verilog, graph, root = insert_test_access(["my_design.v"], "my_design", specs)

# Drive it: write ctrl_write, wait for it to settle, read status_read.
pdl = PDLInterpreter(graph, root)
pdl.iTarget("ctrl_write")
pdl.iWrite(1)
pdl.iApply()
pdl.iRunLoop(3)
pdl.iTarget("status_read")
pdl.iRead(1)
pdl.iApply()

# Emit a real ATE pattern file from the same ops.
print(to_svf(pdl.program))

to_stapl/to_stil render the identical pdl.program as STAPL/STIL instead; to_icl describes the inserted network's own topology as real ICL text; retarget_faultflow_patterns remaps a faultflow --export-patterns JSON export through the same network. Every exception this library raises subclasses WarptapError.

Development

Requires a real yosys on PATH (this project shells out to it, same as faultflow does for its own Yosys usage — it's never bundled). On Windows, run everything through WSL, which already has yosys/python3/pytest installed system-wide; only the package itself needs an editable install, and system pip there is externally-managed (PEP 668), so that install goes through a small local venv:

wsl bash -lc "cd /mnt/c/path/to/tapestry && python3 -m venv --system-site-packages .venv && ./.venv/bin/pip install -e ."
wsl bash -lc "cd /mnt/c/path/to/tapestry && ./.venv/bin/python -m pytest"

--system-site-packages lets the venv see WSL's system-installed pytest instead of reinstalling it. If a real yosys isn't available at all, WARPTAP_YOSYS_CMD can point at any Yosys-compatible executable — tests/conftest.py falls back to a pip-installed yowasp-yosys (WASM build, see the dev extra) if nothing is found on PATH.

Some tests also cross-simulate hand-authored RTL against its Python behavioral-model counterpart using Icarus Verilog (iverilog/vvp, already present in the documented WSL environment). There's no WASM fallback for these — if neither is on PATH nor pointed at via WARPTAP_IVERILOG_CMD/WARPTAP_VVP_CMD, those tests skip cleanly rather than failing.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

warptap-0.0.1.tar.gz (168.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

warptap-0.0.1-py3-none-any.whl (117.3 kB view details)

Uploaded Python 3

File details

Details for the file warptap-0.0.1.tar.gz.

File metadata

  • Download URL: warptap-0.0.1.tar.gz
  • Upload date:
  • Size: 168.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for warptap-0.0.1.tar.gz
Algorithm Hash digest
SHA256 46b50b97b04c1174aea8679bd2027ee9b2f762de6907d73c00563f8278fefe1f
MD5 4745d86dc861773eb056799aac06f06d
BLAKE2b-256 890657e01e42ea022f20f0233a71c96f432fe4f3727f9e195f1df2f4daad4278

See more details on using hashes here.

Provenance

The following attestation bundles were made for warptap-0.0.1.tar.gz:

Publisher: publish.yml on ranaumarnadeem/warptap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file warptap-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: warptap-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 117.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for warptap-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 92d0c8df0ddd1e49d2b402ba045849dfd9ffa398a019acac6cf0a6f90fc9174c
MD5 c1befbe711e3148f5e7fe37e0946b2d9
BLAKE2b-256 d878088109d96eef0256e59d371fd14c791d7437c9930a36237612786d7fceea

See more details on using hashes here.

Provenance

The following attestation bundles were made for warptap-0.0.1-py3-none-any.whl:

Publisher: publish.yml on ranaumarnadeem/warptap

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page