svf: extract player core into standalone libsvf, keep bscan glue

The SVF player now lives in electronics/libsvf behind a five-function
JTAG ops table, shared with the wifi_jtag_programmer Zephyr firmware.
src/modules/svf/ shrinks to the bscan_*-backed port (bs_svf_play),
which also keeps the FTDI stale-FIFO warm-up. Local checkout override:
-DFETCHCONTENT_SOURCE_DIR_SVF=<path>.
This commit is contained in:
2026-06-13 00:14:07 +02:00
parent 2752c3404b
commit 831bd7c129
10 changed files with 106 additions and 501 deletions

View File

@@ -23,9 +23,13 @@ new is in `src/bs/` (the REPL) and the project modules (`target/`,
sitting alongside the Viveris ones. The BSDL parser was extracted into
a standalone library, **[libbsdl](ssh://gitea@git.beafrancois.fr:8329/electronics/libbsdl.git)**
(LGPL, seeded from the same Viveris loader), and is now pulled in via
CMake `FetchContent` instead of vendored. To build against a local
checkout (e.g. side-by-side dev): configure with
`-DFETCHCONTENT_SOURCE_DIR_BSDL=/path/to/libbsdl`.
CMake `FetchContent` instead of vendored. The SVF player core moved the
same way into **[libsvf](ssh://gitea@git.beafrancois.fr:8329/electronics/libsvf.git)**
(shared with the `wifi_jtag_programmer` Zephyr firmware, which plays SVF
through an embedded JTAG port); `src/modules/svf/` is now only the
bscan-backed glue. To build against local checkouts (side-by-side dev):
configure with `-DFETCHCONTENT_SOURCE_DIR_BSDL=/path/to/libbsdl` and/or
`-DFETCHCONTENT_SOURCE_DIR_SVF=/path/to/libsvf`.
## Architecture
@@ -41,14 +45,15 @@ src/
├── config/ Built-in config.script
├── os_interface/ Portable fs/network wrappers
└── natsort/ Natural pin-name sorting
— pulled via FetchContent (LGPL, separate repo) —
── (libbsdl) BSDL (.bsd) parser; struct + JSON; stable C ABI
— pulled via FetchContent (LGPL, separate repos) —
── (libbsdl) BSDL (.bsd) parser; struct + JSON; stable C ABI
└── (libsvf) portable SVF player core (svf_play_buf/file over a 5-op JTAG port)
— new (this project) —
├── target/ Target registry: FPGAs + CPUs (parses data/targets.yaml)
├── bscan/ JTAG TAP primitives (set_ir/shift_ir/shift_dr/tap_reset/
│ idle_cycles) + BSCAN proxy (bitstream load, SPI-over-USER1)
├── spi_flash/ SPI NOR chip DB + read/erase/program/verify over a callback
├── svf/ SVF player (svf_play): SIR/SDR/RUNTEST/STATE, masked compare
├── svf/ glue: bscan_*-backed svf_jtag_ops port for libsvf (bs_svf_play)
├── probes/ Probe-config profiles loader (parses data/probes.yaml, libyaml)
├── program/ `program` dispatch: routes a target to its backend by `prog`
└── arm_debug/ ARM7TDMI (EmbeddedICE) debug: halt/resume, Thumb->ARM, memory read (works); flash-write backend TODO