Files
FPGA-Neural/hardware/v2/docs/HARDWARE_FREEZE.md
T
micheleandClaude Sonnet 5 8e014d8d49 V2.0.0 hardware freeze - single SDRAM
FASE #1 hardware freeze for FPGA-Neural V2, N4/P8, single external
SDRAM (Alliance Memory AS4C4M16SA-6TIN) serving weights, activations,
and results through one physical sdram_controller.v instance. Removes
the PSRAM dependency (hardware/v1/rtl/psram_controller.v +
memory_interface.v) from the V2 physical path entirely -- V1 itself
remains fully unmodified, the golden reference.

New RTL: sdram_unified_backend.v (2-way W/AR arbitration over one
SDRAM controller, real per-byte DQM write masking added to
sdram_controller.v for correct single-byte result writes with no
read-modify-write), nms_neural_multiprocessor_sdram_unified.v (the
frozen top-level). Two real bugs found and fixed via full-system
testing before being accepted (ERR-0023): a deadlock and an off-by-one
data-shift bug in the new arbitration logic.

Real results: N=4 and N=2 D-Stress bit-exact (256/256 neurons), 40
real AUTO REFRESH events interleaved with zero corruption, real
Yosys+nextpnr-ecp5 synthesis/P&R for LFE5U-45F-8CABGA381 (149/245
TRELLIS_IO, a real 45-pin reduction from the prior dual-memory
design). Timing is MARGINAL (1/8 P&R seeds >=80MHz), reported honestly
rather than masked by the best seed.

Real, sourced ball-level pinout for the SDRAM bus + clk/rst (39/149
signals, P&R-verified) using the official Lattice ECP5U-45 pinout CSV
found on disk during this step's own pre-commit review -- corrects an
earlier draft that wrongly assumed no real pinout data was available.

Chip readiness: NO. Real, disclosed blockers remain (no physical host
interface exists yet -- the RTL's own reg_* ports are a 110-pin raw
test-harness bus; clock source/PLL decision; power/configuration
component selection) -- see hardware/v2/docs/{HARDWARE_FREEZE,
CHIP_READINESS,OPEN_ITEMS}.md for the complete, itemized status.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013xXuuRUWZScuo1DeYJxs3v
2026-09-06 13:39:55 +02:00

6.7 KiB

FPGA-Neural V2 — HARDWARE FREEZE (FASE #1, single external SDRAM)

Frozen reference configuration

FPGA:            LFE5U-45F-8BG381, ECP5U, speed grade -8
Neural Processor: P_IN=8, INT8 operands, INT32 accumulator,
                  8 parallel MAC, balanced adder tree (neural_processor.v,
                  UNCHANGED since before this freeze)
Multiprocessor:  N_PROCESSORS=4 (N4/P8 is the frozen reference; N2 also
                  validated; N8 is a FUTURE EVOLUTION, not part of this freeze)
Architecture:    Neural Multiprocessor -> Dataflow -> Neural Director ->
                  Dependency Manager -> Memory Manager -> streaming tile
                  delivery (STEP13 architecture, intact, unchanged)
External memory: ONE SDRAM ONLY -- Alliance Memory AS4C4M16SA-6TIN,
                  serving weights, activations, AND results (DEC-0031/
                  0032/0033/0034). No PSRAM, no second memory device.
Weight path:     PACK128 (BURST_LEN=8, N_ENTRIES=4 cache, STEP18/STEP19)
Target clock:    80 MHz minimum (real oscillator/PLL source: OPEN, see
                  CLOCK_ARCHITECTURE.md)
V1:              golden/reference implementation, untouched (confirmed:
                  zero modifications; V2 no longer instantiates ANY V1
                  RTL at all, since psram_controller.v was removed from
                  the physical path -- DEC-0034)
Frozen top-level: nms_neural_multiprocessor_sdram_unified
                  (hardware/v2/nms/rtl/nms_neural_multiprocessor_sdram_unified.v)

N4/P8 is the frozen V2.0 hardware reference. This does not mean N4 is the final or maximum architecture — N8, higher clocks, or new datapath ideas are explicitly FUTURE EVOLUTIONS, out of scope for this freeze.

Repository audit summary

Full detail: see the audit performed for this step (repository structure, V1/V2 boundary, top-level candidates, dead-code classification, PSRAM-dependency confirmation, LPF/docs/scripts inventory). Key findings:

  • hardware/v1/**: complete, self-contained, untouched. Real synthesized/certified golden reference (spi_neuron_top.v).
  • hardware/v2/rtl/ + hardware/v2/nms/rtl/: the frozen top-level (nms_neural_multiprocessor_sdram_unified.v) instantiates nms_dataflow_core_sdram.v, sdram_unified_backend.v (STEP19, new), sdram_controller.v, nms_memory_manager_stream_wide.v, weight_prefetch_engine_wide.v, nms_activation_replicated.v, nms_activation_fill_ctrl_v3.v, nms_weight_packed.v, dependency_manager.v, neural_director.v, neural_processor.v, slot_mem_arbiter.v, slot_mem_arbiter_wide.v, prefetch_engine.vzero V1 files, confirmed by successful lint/synthesis with no V1 RTL in the file list.
  • Every other nms_neural_multiprocessor_*.v/nms_dataflow_core_*.v variant (plain, _pf, _stream, _actfix, _actfix2, _dual32, _sdram, _sdram_pack128) is real, historical, superseded-but- documented project experiment history — dead relative to the frozen top, NOT deleted (each remains the subject of its own STEP report).
  • hardware/v2/constraints/ was empty before this step; now contains v2_unified.lpf (partial — see PINOUT.md).
  • The referenced sibling pinout repository (../basic-ecp5-pcb) does not exist on disk, BUT the real Lattice pinout CSV itself (FPGA-SC-02034-3-0-ECP5U-45-Pinout.csv, rev 3.0) is present at ~/Downloads/ and was found during this step's own pre-commit review, with a real summary already at docs/pinouts.md (repo root). This corrected an earlier draft of this freeze that wrongly assumed no real pinout data existed — see PINOUT.md.

Status table

Area Status Evidence Blocker
RTL PASS Strict Verilator lint (latches/multi-driver/comb-loops/case-completeness): zero findings across the full frozen hierarchy No
Simulation PASS Isolated tb_sdram_controller.v (461/461, 9 freq/burst configs), isolated tb_sdram_unified_backend.v (40/40) No
Bit-exact PASS Full N=4 AND N=2 D-Stress (256/256 neurons each), golden software model comparison No
SDRAM PASS Real init/refresh/read/write/burst/masked-write, 40 real AUTO REFRESH events interleaved with zero corruption across a ~50,000-cycle run No
Synthesis PASS Real Yosys 0.68+post synthesis, N=4: TRELLIS_FF=6425, TRELLIS_COMB=6023, MULT18X18D=32, DP16KD=0 No
P&R PASS (fits) Real nextpnr-ecp5 0.11.1, TRELLIS_IO=149/245 (fits with headroom) No
Timing MARGINAL 8 real seeds: 66.97/74.00/74.45/74.92/79.23/79.53/79.80/81.84 MHz — only 1/8 ≥80MHz CRITICAL
Pinout PARTIAL 39/149 signals real, sourced, P&R-verified (clk/rst + full 37-signal SDRAM bus); 110-signal host bus unassigned BLOCKER (host bus only)
Clock INCOMPLETE Single-clock-domain RTL confirmed (no CDC); no PLL exists; oscillator-vs-PLL decision not made CRITICAL
Power INCOMPLETE Real rail voltages known from datasheets; no regulator selection, no current budget OPEN
Configuration INCOMPLETE Standard ECP5 JTAG/config pins identified; no flash part chosen, no V2 config LPF beyond the partial v2_unified.lpf OPEN
Host INCOMPLETE 110-pin raw parallel bus exists at the RTL boundary; no physical protocol, no serializer RTL BLOCKER
PCB NOT READY See SCHEMATIC_READINESS.md's own checklist Multiple (host, pinout, power)
Bring-up READY (procedure only) FIRST_POWER_ON.md defines the full 12-step test sequence Cannot execute until host/pinout blockers close

Single-SDRAM verification (this step's own core mandate)

  • PSRAM dependency: REMOVED — confirmed by successful synthesis/ P&R with zero V1 files in the compile list, and a real, measured 45-pin I/O reduction (194→149/245 TRELLIS_IO) exactly matching the removed PSRAM interface's own pin count.
  • Weights/activations/results: all confirmed sharing the single physical SDRAM, real bit-exact traffic at three distinct, non-overlapping memory-map regions, simultaneously, under real N=4 contention (see MEMORY_ARCHITECTURE.md).
  • Real bugs found and fixed during this consolidation (ERR-0023): a full deadlock and a subsequent off-by-one data-shift bug in the new arbitration logic, both caught via full-system (not merely isolated) testing before being accepted — see errors.log for the complete root-cause writeups.

Deliverables produced by this step

HARDWARE_FREEZE.md (this file), CHIP_READINESS.md, MEMORY_ARCHITECTURE.md, PINOUT.md, POWER_ARCHITECTURE.md, CLOCK_ARCHITECTURE.md, SCHEMATIC_READINESS.md, FIRST_POWER_ON.md, OPEN_ITEMS.md (all under hardware/v2/docs/), plus hardware/v2/constraints/v2_unified.lpf and new RTL/testbenches under hardware/v2/nms/rtl/ and hardware/v2/nms/sim/.