Was a separate, untracked directory (DataSheet/) outside the repo. Renamed to lowercase and moved in as hardware/v2/docs/datasheet/, with its own .gitignore for LaTeX build byproducts (compiled PDFs stay tracked, .aux/.log/.toc/etc do not). Now versioned and shares this repo's own remote instead of living untracked on disk. Content: IT+EN LaTeX chapter sources, reference manufacturer PDFs, and compiled datasheet PDFs including the 2026-09-07 SDRAM upgrade addendum (AS4C32M16SB-7BIN part/pinout/timing) in the v2-en chapters. Note: hardware/v2/docs/DatasheetLatex/ (and the v1 sibling) is a separate, already-tracked, differently-structured LaTeX document that predates this move -- left untouched, not merged, since its chapter set and content differ and merging was not requested. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013xXuuRUWZScuo1DeYJxs3v
120 lines
6.0 KiB
TeX
120 lines
6.0 KiB
TeX
\thispagestyle{plain}
|
|
\noindent
|
|
\begin{tikzpicture}
|
|
\node[fill=fnDark,text=white,rounded corners=2pt,inner sep=6pt,
|
|
minimum width=\textwidth,anchor=west]
|
|
{\large\bfseries FPGA-Neural --- Descrizione generale e caratteristiche};
|
|
\end{tikzpicture}
|
|
|
|
\vspace{6pt}
|
|
\noindent
|
|
{\small FPGA-Neural è un \textbf{acceleratore hardware parametrico per reti neurali}
|
|
feed-forward completamente contenuto nell'FPGA. Il calcolo (moltiplicazione,
|
|
accumulo, bias, attivazione, saturazione) avviene interamente on-chip in aritmetica
|
|
intera INT8/INT32; il sistema host fornisce solo configurazione, pesi, dati di
|
|
ingresso e controllo attraverso una semplice interfaccia SPI, senza mai far parte
|
|
del datapath computazionale. Un unico bitstream serve qualunque topologia fino al
|
|
massimo di build.}
|
|
|
|
\vspace{8pt}
|
|
\begin{multicols}{2}
|
|
{\color{fnDark}\large\bfseries Caratteristiche}\\[2pt]
|
|
{\footnotesize
|
|
\begin{itemize}[leftmargin=1.1em]
|
|
\item Datapath \textbf{INT8 $\times$ INT8 $\to$ INT16 $\to$ INT32}, accumulo a 32~bit
|
|
con estensione di segno.
|
|
\item \textbf{Balanced binary adder tree} ($O(\log_2 \text{PARALLEL})$) al posto della
|
|
riduzione lineare.
|
|
\item MAC parallelo configurabile: \code{PARALLEL} MAC hardware simultanei per neurone,
|
|
mappati su DSP \code{MULT18X18D}.
|
|
\item Architettura completamente \textbf{parametrica}: \code{N\_INPUTS}, \code{N\_NEURONS},
|
|
\code{PARALLEL}, \code{DATA\_WIDTH}, \code{ACC\_WIDTH}, \code{N\_LAYERS}.
|
|
\item \textbf{Larghezza di rete a runtime}: \code{n\_inputs\_real}/\code{n\_neurons\_real}
|
|
per-layer, un solo bitstream per ogni topologia fino al massimo.
|
|
\item Attivazioni configurabili: \code{ACT\_RELU} (default) e \code{ACT\_NONE} (lineare
|
|
con saturazione bilaterale), con saturazione INT8.
|
|
\item \textbf{Due tipi di rete}: classica multi-layer dense (\code{layer\_sequencer},
|
|
buffer ping-pong) e \textbf{grafo arbitrario sparse} (\code{graph\_engine} +
|
|
buffer di attivazione in block RAM \code{DP16KD}), selezionabili a runtime.
|
|
\item Sottosistema di \textbf{memoria dedicata}: interfaccia byte$\leftrightarrow$word,
|
|
controller PSRAM parallelo asincrono con \textbf{page mode} (70~ns accesso
|
|
casuale, 20~ns burst di pagina), 8~MB indirizzabili (23~bit).
|
|
\item Interfaccia host \textbf{SPI Mode 0} MSB-first, \code{SET\_NET\_TYPE}+dispatch, \code{STATUS.done}
|
|
sticky/clear-on-read, \code{READ\_CONFIG} runtime.
|
|
\item \textbf{Sottosistema flash} boot/persistenza: accesso esclusivo della FPGA a una
|
|
\code{W25Q128JV} SPI NOR (16~MB) via SPI master dedicato, copy engine
|
|
flash$\leftrightarrow$PSRAM e catalogo a 16 slot con CRC32, 8 opcode host.
|
|
\item Verificato in \textbf{simulazione} (Icarus Verilog) e \textbf{sintesi reale}
|
|
(Yosys + nextpnr-ecp5 + ecppack).
|
|
\end{itemize}}
|
|
|
|
\columnbreak
|
|
|
|
{\color{fnDark}\large\bfseries Applicazioni}\\[2pt]
|
|
{\footnotesize
|
|
\begin{itemize}[leftmargin=1.1em]
|
|
\item Inferenza a bassa latenza deterministica come periferica di
|
|
SoC Linux, Raspberry-Pi-like, ESP32, microcontrollori.
|
|
\item Blocco hardware riusabile integrabile in progetti eterogenei
|
|
(piattaforma, non singola rete).
|
|
\item Edge AI su reti dense compatte quantizzate INT8.
|
|
\item Off-loading del carico neurale dalla CPU host verso hardware
|
|
dedicato con throughput prevedibile.
|
|
\end{itemize}}
|
|
|
|
\vspace{4pt}
|
|
{\color{fnDark}\large\bfseries Target \& toolchain}\\[2pt]
|
|
{\footnotesize
|
|
\begin{itemize}[leftmargin=1.1em]
|
|
\item FPGA: Lattice ECP5 \code{LFE5U-45F-8BG381C} ($-8$, CABGA381).
|
|
\item Sintesi: Yosys; place\&route: nextpnr-ecp5; bitstream: Project~Trellis
|
|
(\code{ecppack}).
|
|
\item Simulazione: Icarus Verilog (\code{-g2012}).
|
|
\item PSRAM: ISSI \code{IS66WVE4M16EBLL-70BLI} (64\,Mb, 4M$\times$16).
|
|
\end{itemize}}
|
|
\end{multicols}
|
|
|
|
\vspace{2pt}
|
|
% --- tabella parametri chiave ---
|
|
\noindent
|
|
{\small\color{fnDark}\bfseries Parametri chiave (configurazione baseline caratterizzata)}
|
|
\vspace{2pt}
|
|
|
|
\noindent
|
|
\begin{tabularx}{\textwidth}{L{3.2cm}L{3.6cm}Y}
|
|
\toprule
|
|
\rowh \thd{Grandezza} & \thd{Valore} & \thd{Note} \\
|
|
\midrule
|
|
Precisione dati & INT8 (signed) & \code{DATA\_WIDTH}=8 \\
|
|
\rowa Accumulatore & INT32 (signed) & \code{ACC\_WIDTH}=32 \\
|
|
Ingressi / neuroni & 256 / 4 & baseline benchmark datapath \\
|
|
\rowa MAC simultanei & $2\ldots64$ & $=$\code{PARALLEL}$\times$\code{N\_NEURONS} \\
|
|
Attivazioni & ReLU, lineare & \code{ACT\_RELU} / \code{ACT\_NONE} \\
|
|
\rowa Fmax (P=2, datapath) & 87.88~MHz & benchmark datapath isolato \\
|
|
Fmax (P=2, sistema integrato) & 67.91~MHz & sistema completo incl. sottosistema flash, place\&route reale \\
|
|
Throughput MAC (P=16) & $\approx$3.34~G\,MAC/s & teorico, solo datapath \\
|
|
\rowa Memoria di lavoro & 8~MB PSRAM & bus parallelo 16-bit, 70~ns / 20~ns page mode \\
|
|
Spazio indirizzi & 23~bit (byte) & \code{ADDR\_WIDTH}=23 \\
|
|
\bottomrule
|
|
\end{tabularx}
|
|
|
|
\vspace{8pt}
|
|
\noindent
|
|
{\small\color{fnDark}\bfseries Diagramma a blocchi del sistema}
|
|
\begin{center}
|
|
\begin{tikzpicture}[node distance=6mm and 10mm,font=\footnotesize]
|
|
\node[fnblockD,minimum width=26mm,minimum height=13mm] (host){HOST\\{\scriptsize configura / addestra / controlla}};
|
|
\node[fnblockT,right=16mm of host,minimum width=52mm,minimum height=22mm] (eng){};
|
|
\node[anchor=north,font=\footnotesize\bfseries,text=fnDark] at (eng.north){FPGA -- Neural Network Engine};
|
|
\node[fnreg,fill=white] (spi) at ([yshift=-2mm]eng.center){\code{spi\_slave} + \code{spi\_engine}};
|
|
\node[fnreg,fill=white,below=2.5mm of spi] (arb){\code{mem\_arbiter} + \code{layer\_sequencer}};
|
|
\node[fnreg,fill=white,above=2.5mm of spi] (core){\code{neuron\_memory} $\to$ \code{neuron\_parallel} $\to$ \code{mac8}};
|
|
\node[fnblock,right=16mm of eng,minimum width=24mm,minimum height=13mm] (ram){PSRAM 8\,MB\\{\scriptsize \code{psram\_controller}}};
|
|
\draw[fnbus] (host) -- node[fnlbl,above]{SPI} (eng.west|-host);
|
|
\draw[fnbus] (eng.east|-ram) -- node[fnlbl,above]{16-bit async} (ram);
|
|
\end{tikzpicture}
|
|
\end{center}
|
|
\begin{center}\footnotesize\itshape\color{fnGrey}
|
|
Il datapath neurale è interamente nell'FPGA; l'host non partecipa alle singole
|
|
operazioni MAC.\end{center}
|