Repository navigation
test(parlio): #2548 add boot-time ISR-streaming functional validation - #2561
Conversation
Adds `AutoResearchParlioStream::validateAtBoot()` — a self-contained boot-time test that exercises the engine's production ISR-chunked streaming path (`ParlioEngine` 3-buffer ring + `txDoneCallback` ISR + BF1 from #2559) and reports PASS/FAIL via `esp_rom_printf` to the USB-Serial-JTAG console (COM25 on the P4 dev board). Workload: 16-lane × 256-LED WS2812B (canonical bench config, forces the engine's 16-lane Wave8 branch → `wave8Transpose_16x4_bf1_pipe4`). 5 back-to- back `FastLED.show() + FastLED.wait()` cycles, each timed. Validated on real ESP32-P4 v1.3: BENCH_PARLIO_STREAM_VALIDATE PASS lanes=16 leds=256 iters=5 iter0=23530 iter1=16998 iter2=17000 iter3=16997 iter4=17001 steady_avg_us=16999 (WS2812B 16-lane TX=7680us) All 5 iterations completed within the 200ms timeout — 0 hangs, 0 stalls. The streaming engine + BF1 work correctly. (The ~17ms steady-state per show vs the 7.68ms TX floor is a separate optimization opportunity: each show() serializes the begin/wait/end + disable/re-enable cycle. The BF1+pipe4 encode itself is 1.75ms/frame as measured by the bench harness.) Bypasses the testSimd RPC routing (broken on COM25, #2541) so this works at boot without any host-side coordination. Opt-in via build flag: `-DFL_PARLIO_STREAM_VALIDATE_AT_BOOT=1` Refs #2548. Validates #2559 in production. Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThis PR adds a boot-time functional benchmark for PARLIO streaming validation to FastLED examples. A new header implements a 16-lane timing benchmark that initializes FastLED PARLIO channels, fills LED buffers with a fixed pattern, runs show/wait iterations with timeout measurement, and reports pass/fail diagnostics. The benchmark is optionally invoked during ChangesPARLIO Streaming Validation Feature
Estimated Code Review Effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…e to RPC (#2562) Removes the `FL_PARLIO_STREAM_VALIDATE_AT_BOOT` boot-time hook landed in #2561 and re-exposes the same functional test as a JSON-RPC handler `parlioStreamValidate`, matching the convention of the other autoresearch utility benches (`wave8ExpandBenchmark` #2539, `parlioEncodeBenchmark` #2547). ### Changes - `AutoResearchParlioStream.h`: - `validateAtBoot()` (esp_rom_printf-based) → `validateParlioStreaming()` returning a `ValidateResult` struct (channels_ok, completed, per_iter_us[], steady_avg_us, failed_iter, etc.). - Caller-supplied `num_lanes`, `num_leds`, `iterations`, `timeout_ms` so the RPC can drive different workloads. - Static LED buffer sized for the canonical worst case (16 × 256) to avoid repeated allocation across RPC calls. - `AutoResearch.ino`: - Drop the `#ifdef FL_PARLIO_STREAM_VALIDATE_AT_BOOT` boot-time hook. - Keep the header include for the RPC handler in AutoResearchRemote.cpp. - `AutoResearchRemote.cpp`: - Add `parlioStreamValidate` bind: parses optional `numLanes`/`numLeds`/ `iterations`/`timeoutMs` from args, calls `validateParlioStreaming()`, returns full result as JSON (`channelsOk`, `completed`, `lanes`, `ledsPerLane`, `iterations`, `perIterUs:[…]`, `steadyAvgUs`, `failedIter`, `timeoutMs`). - Register in `discoverFunctions` metadata (totalFunctions 24 → 25, Phase 4 Utility, full args + returns docstring). ### Validation - `bash lint --cpp` clean - Build + flash on ESP32-P4 v1.3 (`bash autoresearch esp32p4 --simd --no-fbuild`) succeeds; handler is registered. - On-device RPC invocation is blocked on P4 by the pre-existing #2541 (testSimd RPC over UART0 fails because the host connects via COM25 USB-Serial-JTAG, different physical path). Same blocker that already affects `testSimd`, `wave8ExpandBenchmark`, and `parlioEncodeBenchmark`. The handler will be invokable from CI / other platforms once that infra issue is resolved. - Functional correctness was previously demonstrated end-to-end via the boot-time variant in #2561: 5 back-to-back show()+wait() iterations, 16-lane × 256-LED WS2812B, all completed within timeout (steady-state ~17 ms/frame, 0 hangs). Refs #2548, #2541. Supersedes the boot-time hook from #2561. Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary
Adds
AutoResearchParlioStream::validateAtBoot()— a self-contained boot-time test that exercises the production ISR-chunked streaming engine path (ParlioEngine3-buffer ring +txDoneCallbackISR + BF1 from #2559) on real hardware.Bypasses the testSimd RPC routing (broken on COM25 USB-Serial-JTAG, #2541) by reporting via
esp_rom_printfso it works at boot without any host-side coordination. Opt-in via build flag-DFL_PARLIO_STREAM_VALIDATE_AT_BOOT=1.Validated on ESP32-P4 v1.3
Canonical 16-lane × 256-LED WS2812B workload (forces the engine's 16-lane Wave8 branch →
wave8Transpose_16x4_bf1_pipe4):5 back-to-back
FastLED.show() + FastLED.wait()cycles all completed within the 200 ms timeout — 0 hangs, 0 stalls. The streaming engine + BF1 work correctly end-to-end.Test plan
FL_PARLIO_STREAM_VALIDATE_AT_BOOT=1is set explicitly)Files
Note: encode vs frame timing
The ~17 ms steady-state per
show()vs the 7.68 ms TX floor is a separate optimization opportunity — eachshow()currently serializes the engine's begin/wait/end +mPeripheral->disable()/enable()reset cycle. The BF1+pipe4 encode itself is 1.75 ms/frame (4.4× faster than TX) as measured by the bench harness onperf/parlio-l1l2l3. Closing the ~9 ms wait gap is future work (could potentially overlap two frames if the peripheral re-enable becomes optional).Refs #2548. Validates #2559 in production.
🤖 Generated with Claude Code
Summary by CodeRabbit