BobBot eff04cfa10
ci / test (push) Canceled after 0s
ci / build-arm64 (push) Canceled after 0s
feat(ecs): slice 1 — I2C field model, board registers, pixel (ports of _fields/board/pixel.py)
- innesco-ecs: declarative I2cField (byte/enum/bool/int) with the exact
  read-modify-write semantics of _fields.py, incl. the raw-byte getter quirk
- Board: mux, fastin_src, external_dac, sel_data_en_src, si_clk_oe,
  si_clk_in, analog_power, direction_register + config_crystal sequencer
- Pixel: power/frontend/adj/ctrl + finetune_dac nibble logic
- 7 integration tests against a fake data_server (register-file mock)
- faithful-port findings #7 (enum codes wider than mask don't round-trip
  in Python either) and #8 (crystal hi/lo aliasing) documented
- 21 tests green across the workspace
2026-11-12 23:19:23 +00:00
…
…
…

innesco-rs

Rust clone of innesco (the IGNITE64 control/DAQ software, timespot/innesco on baltig). This repo is a separate clean-room-style port: the original Python/C repository is untouched, and its license/authorship is respected.

Deployment target: AMD Kria K26 SOM (Zynq UltraScale+ MPSoC, quad Cortex-A53, aarch64, Ubuntu 22.04) — the board buffering/timestamping the IGNITE64 detector data.

Layout

crate ported from status
innesco-protocol innesco/ecs/protocol.py ECS wire protocol (Read/Write/Ping, >BI headers) + TCP client
innesco-decoding innesco/decoding/csrc/decoding.c 13-byte frame decoder, DCO calibration, position map; golden tests
innesco-cli — ping, decode subcommands (zero-dependency)

Zero external dependencies (pure std): cross-compiling for arm64 needs no cross-linked C libraries, and release binaries are small (panic = "abort", LTO).

Build (x86_64 host)

cargo test --workspace                       # golden tests
cargo build --release                        # host binary
export CARGO_TARGET_DIR=/tmp/innesco-rs-target   # keep artifacts off NFS

Build for arm64 (Kria K26)

scripts/build-arm64.sh --run-tests           # static musl binary (recommended)
scripts/build-arm64.sh --gnu                 # dynamic, glibc (Ubuntu 22.04 on board)

The script bootstraps everything without root: rustup target add, a ziglang pip venv as cross linker (via cargo-zigbuild), then cargo zigbuild --release --target aarch64-unknown-linux-musl. Artifacts land in dist/aarch64-<musl|gnu>/innesco-cli.

Deploy to the Kria: scp dist/aarch64-musl/innesco-cli <board>:~/ && ssh <board> ./innesco-cli ping localhost 8888.

Porting notes

See docs/porting-notes.md for the Python/C → Rust mapping and the (deliberate) divergences from the C extension (64-bit arithmetic where the C overflows 32-bit, strict socket reads where Python truncated silently, skip-and-count instead of abort on malformed packets).

Open Points

(details agreed with Lucio 2026-11-12; user-editable — tell me what to focus on)

  1. Storage layer (after #3) — decisions taken: polars-rs for parquet I/O (feature parity with the notebooks) + S3/MinIO upload is crucial (no local storage on the board — data must be pushed out). Schema need not be byte-identical, but must keep the notebook query surface: columns address, ix, iy, quadrant, tot, adj_ctrl, period, integr_time, v_inj (grep of notebooks 02/04/05/06/07) and the file-path conventions (results/{date}/analog_power=*/dcos-*.parquet, dataset-tag-{n}.parquet — duckdb queries use SELECT *, so paths matter more than column order). Original: 185-line ParquetStorage thread (queue → parquet → S3).
  2. REST API (after #3): 7 endpoints in rest_api.py (/ping, /metrics, /state, PUT /chunksize, POST /tag, POST /daq, GET /dataset). Port: axum + tokio in a separate crate with feature flag (library stays dependency-free). /state and /daq depend on #3; the other four can be ported independently.
  3. Board/slow-control model — IN PROGRESS, slice 1 done:
    • ✅ slice 1: _fields.py (199 L) + board.py (89) + pixel.py (77) → crates/innesco-ecs (7 integration tests against a fake data_server, incl. RMW semantics and the crystal-config sequencer; two faithful-port findings documented in docs/porting-notes.md #7/#8).
    • next: (2) mattonella(+state) 995 L → (3) asic_state 626 → (4) quadrant 502 → (5) daq+DataProcessor 574. Mirror-1:1 first, type-state validation later.
  4. Real-board validation: no qemu here, no network to the boards. (a) A raw frame dump from a real acquisition (even small) → decoder validated on physical data as an official golden test — highest value, zero prerequisites. Lucio will try next week; reminder set for Wed 2026-11-18 09:00. (b) network access to a Kria running data_server → live innesco-cli ping + harmless I2C read (0x7E).
  5. CI runner — deprioritized (Lucio 2026-11-12): verified 2026-11-12 that no Actions runner exists on this Gitea and self-hosting is impossible here (no Docker daemon). Local scripts/build-arm64.sh --run-tests is the working CI substitute.
S
Description
Rust clone of innesco (IGNITE64 ECS protocol + frame decoder), arm64 builds for AMD Kria K26
Readme
96 KiB
Languages
Rust 97.1%
Shell 2.9%