test: certify layer_sequencer chain (C.5), find critical BUG-005

Layer chain / ping-pong / busy-done certified via the existing
pre-session test, which already verifies the actual ping-pong buffer
address used (not just the value) and correct busy/done timing.

New finding, BUG-005 (CRITICAL): run_num_layers=0 has no guard at
compile time or runtime, and unlike BUG-002's 1-bit group_index (which
can never represent the wraparound value), layer_idx here is a full
8-bit register that naturally reaches it. Confirmed empirically with a
minimal neuron_memory stub: RUN_NETWORK(0) runs through all 256
possible layer indices (21761 cycles), reading arbitrary PSRAM bytes
far past the real descriptor table as if they were valid layer
descriptors, running real neuron_memory passes on them, and writing
results to ping-pong buffer addresses derived from that arbitrary
data. More severe than BUG-002/003/004: reachable via a single
documented SPI opcode (RUN_NETWORK), real PSRAM corruption risk rather
than just a hang or wrong result. Root cause fully isolated, not just
the symptom.

Full regression: 40/40 real tests pass, 1 new observational test
(no pass/fail by design) deterministically reproduces BUG-005.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xXuuRUWZScuo1DeYJxs3v
This commit is contained in:
2026-09-04 14:47:41 +02:00
co-authored by Claude Sonnet 5
parent b528901510
commit f81d7fa1b3
22 changed files with 278 additions and 17 deletions
+1
View File
@@ -36,6 +36,7 @@ EXPECTED_COMPILE_FAIL = {
# an inconsistent naming convention worth flagging in the inventory).
BENCHMARK_NO_VERDICT = {
"graph_engine_bandwidth",
"layer_sequencer_bug005_zero_layers", # confirmed-bug reproduction, prints a RESULT line, no PASS/FAIL by design
}
# Every module-defining file under rtl/ and the sim/ behavioral models used