Files
FPGA-Neural/hardware/v2/logs
micheleandClaude Sonnet 5 481b5d223f perf: fix N=4@64MHz 7/8->8/8 by removing any_pending fan-out (user's idea)
Real critical-path trace after the flash #1 revert showed a NEW
bottleneck (neural_director.job_out_slot -> dependency_manager.
node_resolved/node_state, 76-84% routing) distinct from every prior
fix this session -- already a flat, parallel 64-way compare, not a
serial chain, so the established restructuring fix class doesn't
apply. Root cause: any_pending (added for FPGA_DATA_READY) reads
node_state[0:N_NODES-1] combinationally every cycle, adding real
fan-out onto the same congested signal.

User's own suggestion: replace the combinational scan with a
synchronous up/down counter. pending_count +1 on registration
acceptance, -1 on dispatch acceptance; any_pending = (pending_count
!= 0) -- mathematically identical (DEC-0008: nodes never reclaimed
mid-run) but reads one small register instead of scanning a 16-wide
array every cycle.

Verified: D-Stress N=4 bit-exact (49927 cycles, data_ready PASS).
Fresh 8-seed P&R: N_SLOTS=4 @ 64MHz now 8/8 PASS (was 7/8 after the
flash revert), worst seed1 64.55MHz, best seed0 72.37MHz.

See decisions.log DEC-0042.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xXuuRUWZScuo1DeYJxs3v
2026-09-07 19:16:01 +02:00
..

Formato dei log V2

Regola non negoziabile (docs/v2-description.md §25-29): ogni attività significativa (modifica, simulazione, sintesi, benchmark, decisione, errore) deve essere registrata. Nessun log viene mai sovrascritto o troncato — solo append. Nessun ID esperimento (EXP-XXXX) o decisione (DEC-XXXX) viene mai riutilizzato, anche se il risultato è un FAIL.

File

  • development.log — log principale di sviluppo, un'entry per ogni sessione di lavoro/milestone (creazione file, refactor, avanzamento roadmap).
  • architecture.log — decisioni e note di architettura a grana fine (non scelte finali — quelle vanno in decisions.log — ma esplorazioni, alternative considerate, vincoli scoperti).
  • simulation.log — ogni run di simulazione (Icarus/Verilator): test, vettori, cicli, PASS/FAIL, confronto bit-exact con V1, stall/memory-wait.
  • synthesis.log — ogni run Yosys: LUT/FF/DSP/BRAM, warning, problemi CHECK.
  • timing.log — ogni run nextpnr-ecp5: Fmax, percorso critico, WNS/TNS se disponibili. Fmax "ufficiale" di una configurazione = solo da qui, mai da simulazione o stima.
  • benchmark.log — tabelle di confronto per configurazione (Fmax, MAC/cycle, cycles/neuron, utilization, ecc.), sempre con etichetta THEORETICAL/SIMULATED/SYNTHESIZED/POST-P&R.
  • decisions.log — decisioni architetturali importanti, formato DEC-XXXX (vedi docs/v2-description.md §27).
  • experiments.log — registro principale, un EXP-XXXX per ogni esperimento end-to-end (config → sim/synth/timing → risultato), rimanda a reports/experiments/EXP-XXXX/.
  • errors.log — errori/bug/regressioni incontrati durante lo sviluppo V2 stesso (non i bug V1, già chiusi in hardware/v1/docs/validation/bugs.md).

Campi minimi per entry (§26)

timestamp, experiment_id (se applicabile), git_commit, session/agent,
module, configuration, action, reason, command, result, errors, decision,
next_action

Per synthesis/timing aggiungere: LUT, FF, DSP, BRAM, Fmax, critical path, WNS/TNS. Per simulazione: test, vectors, cycles, PASS/FAIL, bit-exact result, stall cycles, memory wait, utilization.