\chapter{Parameters and configurability} \label{ch:param} \section{Build parameters (synthesis-time)} \begin{fnwarn}[Current, real board parameters (\code{fpga\_neural\_v2\_top.v})] The table below reflects the real, current SDRAM-architecture top level. The PSRAM-era \S\S\ref{ch:mem} chapters below this one describe an earlier, real, correctly-measured milestone with different defaults (notably \code{ADDR\_WIDTH}=23 and a PSRAM data-bus parameter) --- superseded, not deleted, since that data remains accurate for the architecture it was measured on. \end{fnwarn} \begin{tabularx}{\textwidth}{L{3.0cm} C{1.8cm} Y} \toprule \rowh \thd{Parameter} & \thd{Default} & \thd{Meaning} \\ \midrule \code{DATA\_WIDTH} & 8 & Data width (INT8), unchanged from V1. \\ \rowa \code{ACC\_WIDTH} & 32 & Accumulator width. \\ \code{P\_IN} & 8 & Parallel MAC lanes per neuron per tile; must be even (word-level burst constraint, ch.~\ref{ch:mem}). \\ \rowa \code{ADDR\_WIDTH} & 26 & Byte-address width (widened 23$\to$26 for the 64\,MB SDRAM device, DEC-0039). \\ \code{N\_SLOTS} & 4 & Concurrent Memory Manager$+$Neural Processor pairs. \textbf{Production configuration} --- real 8/8-seed timing closure at 64\,MHz (ch.~\ref{ch:hw} \S\ref{sec:clock-closure-current}). \\ \rowa \code{N\_NODES} & 16 & Dependency Manager node-table depth. Sized to the largest node-id range a graph will ever use; never reclaimed (ch.~\ref{ch:arch}). \\ \code{MAX\_DEPS} & 4 & Maximum producers a single node can list. \\ \rowa \code{QUEUE\_DEPTH} & 8 & Neural Director's own ready-job FIFO depth. \\ \code{MAX\_TILES} & 16 & Longest activation/weight tile run a job can request. \\ \rowa \code{CLK\_FREQ\_MHZ} & 64 & Real system clock, generated by \code{ecp5\_pll\_sys\_clk.v} from the 16\,MHz oscillator; 80\,MHz confirmed NO-GO (ch.~\ref{ch:hw} \S\ref{sec:clock-closure-current}). \\ \bottomrule \end{tabularx} \begin{fnwarn}[\texttt{N\_SLOTS} is a real, measured trade-off, not a free parameter] \code{N\_SLOTS}=4 is the production default: the largest slot count that reliably closes real timing at 64\,MHz on every tested placement seed (8/8). \code{N\_SLOTS}=8 is functionally correct (bit-exact) but only 3/8 seeds close timing --- deferred, not production-frozen. Do not simply raise \code{N\_SLOTS} without re-running the real 8-seed \code{nextpnr-ecp5} matrix. \end{fnwarn} \section{Word-alignment constraint (post word-burst rewrite)} Since the memory backend now moves 16-bit words rather than bytes (ch.~\ref{ch:mem}), every tile base address the system computes (\code{x\_base + tile\_idx*P\_IN}, and equivalently for weights) must land on an even byte address. \code{P\_IN} even and \code{x\_base}/ \code{w\_base} themselves even together guarantee this for every tile of every job --- true of every address this project's own testbenches use, and a trivial constraint for any real loader/host to satisfy. \section{Characterized configurations (PSRAM-era; see ch.~\ref{ch:hw} \S\ref{sec:clock-closure-current} for the current SDRAM-architecture numbers)} \begin{tabularx}{\textwidth}{C{1.6cm} C{2.6cm} C{2.6cm} Y} \toprule \rowh \thd{N\_SLOTS} & \thd{Fmax, word-burst only} & \thd{Fmax, $+$activation cache} & \thd{Notes} \\ \midrule 1 & 152.44~MHz & 131.79~MHz & Best real wall-clock speedup (3.86$\times$ vs baseline); no arbitration contention possible. \\ \rowa 2 & 133.58~MHz & \textbf{87.72~MHz} & \textbf{Recommended default} --- real 2.45$\times$ speedup vs baseline, still comfortably above 80\,MHz. \\ 4 & 112.07~MHz & 65.01~MHz (\FAIL) & No additional real throughput; fails 80\,MHz with the cache active. Not recommended. \\ \rowa 8 & 92.63~MHz (dataflow\_core only, no real PSRAM chain) & not re-measured & Real DSP ceiling for P\_IN=8 (64/72 MULT18X18D); a resource ceiling, not a useful operating point. \\ \bottomrule \end{tabularx} \section{Build versus runtime} \begin{center} \begin{tikzpicture}[font=\footnotesize,node distance=6mm] \node[fnblockD,minimum width=54mm,minimum height=17mm](b){\textbf{BUILD (synthesis)}\\[2pt] {\scriptsize N\_SLOTS, N\_NODES, MAX\_DEPS,}\\{\scriptsize QUEUE\_DEPTH, P\_IN, DATA\_WIDTH, ACC\_WIDTH}\\{\scriptsize $\Rightarrow$ machine ceiling}}; \node[fnblockT,right=16mm of b,minimum width=54mm,minimum height=17mm](r){\textbf{RUNTIME (node registration)}\\[2pt] {\scriptsize reg\_node\_id, reg\_required, reg\_producer\_ids,}\\{\scriptsize reg\_x\_base/w\_base/n\_tiles/result\_addr}\\{\scriptsize $\Rightarrow$ the actual dependency graph}}; \draw[fnbus] (b) -- node[fnlbl,above]{$\le$} (r); \end{tikzpicture} \end{center} Full field-level description of the runtime (node registration) interface: ch.~\ref{ch:regs}.