FeNN: A RISC-V vector processor for Spiking
Neural Network acceleration
Zainab Aizaz∗ § , James C. Knight∗ § , and Thomas Nowotny∗
∗ School of Engineering and Informatics, University of Sussex,Brighton, BN1 9QJ, UK §
Equal contribution
Email: {[Link], [Link], [Link]}@[Link]
Abstract—Spiking Neural Networks (SNNs) have the potential much lower arithmetic intensity. Bautembach et al. [3], Knight
to drastically reduce the energy requirements of AI systems. and Nowotny [4] previously showed that SNNs can be simu-
However, mainstream accelerators like GPUs and TPUs are lated effectively on GPUs. However, the low arithmetic inten-
arXiv:2506.11760v1 [[Link]] 13 Jun 2025
designed for the high arithmetic intensity of standard ANNs
so are not well-suited to SNN simulation. FPGAs are well- sity of SNNs means that SNN simulations can easily saturate
suited to applications with low arithmetic intensity as they a GPU’s memory bandwidth but leave its compute resources
have high off-chip memory bandwidth and large amounts of under-utilised. Furthermore, while low-precision weights have
on-chip memory. Here, we present a novel RISC-V-based soft been widely adopted in GPU designs to reduce memory band-
vector processor (FeNN), tailored to simulating SNNs on FPGAs. width requirements, they are typically handled by the systolic
Unlike most dedicated neuromorphic hardware, FeNN is fully
programmable and designed to be integrated with applications MAC arrays which do not support the operations required
running on standard computers from the edge to the cloud. We for simulating SNNs at low precision [5, 6]. Finally, because
demonstrate that, by using stochastic rounding and saturation, simulating SNNs is an iterative process and GPUs have limited
FeNN can achieve high numerical precision with low hardware capacity for global synchronisation, several kernels typically
utilisation and that a single FeNN core can simulate an SNN are launched every simulation timestep causing a significant
classifier faster than both an embedded GPU and the Loihi
neuromorphic system. overhead (order of 10 µs).
Index Terms—SNN, FPGA, RISC-V Digital neuromorphic systems [7, 8] are tailored to the low
arithmetic intensity of SNN simulations, typically only having
I. I NTRODUCTION modest computational resources but large amounts of fast local
memory. These systems are very efficient but typically not
Artificial Neural Networks (ANNs) have demonstrated flexible enough for developing new algorithms. Furthermore,
super-human performance in areas ranging from image classi- neuromorphic systems are not available off the shelf and unlike
fication to playing go [1]. However, training and using ANNs GPUs cannot easily be integrated with applications running on
is computationally very expensive and only possible due to standard computers as they are typically standalone systems.
modern hardware and software. The primary computational Field-Programmable Gate Arrays (FPGAs) represent an inter-
primitive ANNs require is matrix multiplication, which has esting middle ground as they can be integrated seamlessly with
a very high arithmetic intensity. Numerous accelerators in- standard computers and not only offer high external memory
cluding GPUs and TPUs have been designed to accelerate bandwidth similar to GPUs but also large amounts of on-chip
matrix multiplication, typically by streaming data from high memory that can be accessed in a single cycle (around 40 MiB
bandwidth external memory into systolic arrays of multiply- on a high-end Alveo U55C). Although FPGAs also have DSP
accumulate units. However, high arithmetic intensity leads to cores to enable single-cycle integer multiplication, they run
high energy requirements, representing a growing problem at relatively low clock speeds (typically a few 100 MHz)
for the AI industry. At the same time, the biological neural so cannot compete with GPUs for arithmetically-intensive
network of the human brain can still outperform ANNs in tasks. This has meant that they have thus far only been
many tasks while only consuming 20 W. used for inference with standard ANNs [9]. However, FPGAs
While ANNs are inspired by the brain, they differ in several are well-suited to SNN simulations because of their lower
key areas, one of which is that biological neurons communi- arithmetic intensity. Over the years, there has been a plethora
cate with sparse binary events called spikes. This has been of fixed-function FPGA SNN accelerators which demonstrate
incorporated in artificial Spiking Neural Networks (SNNs) this [10, 11]. However, such systems have a high entry barrier
which have already been successful in spatio-temporal pro- as they require re-synthesis using FPGA tools and potentially
cessing applications such as audio denoising and autonomous even writing HDL if the emulated model changes. Naylor
driving [2]. As spikes carry no ‘value’ to multiply, simulating et al. [12] demonstrated that a fully programmable vector
SNNs does not require matrix multiplication and thus has a soft-core processor running on an Altera Stratix IV FPGA
could simulate SNNs faster than the then state-of-the-art, and
This work was funded by EPSRC grants EP/V052241/1 and EP/S030964/1;
and the EU’s Horizon 2020 research and innovation programme under Grant more recent programmable systems [13, 14] have shown that
Agreement 945539. Hardware was provided by the Xilinx University Program. this approach continues to be competitive on newer FPGA
TABLE I
RISCV LOAD STORE BRAM H ARDWARE UTILISATION . B RACKETED VALUES ARE PER LANE /PE.
RISCV RISCV RISCV RISCV Design Lanes Frequency Utilisation
FETCH DECODE EXECUTE WRITEBACK [MHz] LUT FF
SNAVA [14] 100 125 148 774 (1488) 97 824 (978)
Issue Commit Result GaBAN [13] 8 286 28 759 (3595) 9605 (1201)
FeNN 32 166 32 915 (1028) 32 547 (1017)
BRAM FENN FENN FENN
(IM) DECODE EXECUTE WRITEBACK
to make the CV32E40X more suitable for FPGA synthesis,
FENN LOAD STORE URAM
we have simplified its fetch and load-store stages to work
with synchronous Block RAMS – removing the need for any
Fig. 1. Block diagram of FeNN, tightly coupled to CV32E40X RISC-V core. instruction prefetch or alignment logic.
Black arrows indicate pipeline stages and key signals. Blue arrows highlight
the ‘Issue’, ‘Commit’ and ‘Result’ signals defined by the CV32E40X’s XIF
extension interface.
B. 3-stage pipelined vector co-processor
While it is common for inference accelerators to use 8 bit
or even 4 bit weights, we want to offer more flexibility and,
architectures like AMD’s UltraScale+. in future, also accelerate SNN training workloads. Hence, our
Here, we present our FPGA-Enhanced Neural Net- accelerator operates on 16 bit types throughout. Specifically,
work (FeNN) accelerator: a vector soft-processor, tailored to FeNN operates on vectors of 32 16 bit values using a SIMD
the needs of SNN simulation and the hardware resources avail- architecture and a standard register-register instruction set,
able on modern FPGAs. Uniquely, it is designed to operate as backed by a three-port vector register file with 32 512 bit
an in-memory accelerator, capable of scaling from embedded registers, implemented using distributed memory. The majority
systems based on Zynq MPSoCs to workstations or cloud of on-chip memory on UltraScale+ FPGAs is provided through
nodes equipped with large accelerators such as the Xilinx ‘wide’ (72 bit) ‘UltraRAM’ memory which we use to imple-
Alveo U55C. We show that, by using stochastic rounding and ment local memories, large enough to store all model state
saturation, complex spiking neuron models can be simulated in our current prototype. These memories are created using 8
accurately using 16 bit fixed-point arithmetic and demonstrate parallel sets of chained UltraRAM blocks, enabling FeNN to
a recurrent SNN that classifies spoken digits [15] on FeNN. load and store entire vectors in a single cycle.
This classifier runs significantly faster than a similar model In order to provide scope for further expansion, FeNN
running on Loihi and twice as fast as the same model running is implemented within a full 30 bit RISC-V instruction set
on an embedded GPU while using half the energy. quadrant (binary prefix 10). Within this quadrant, our initial
FeNN design implements a minimal instruction set supporting:
II. M ETHODS
• Addition, subtraction and multiplication of vectors.
A. Scalar core • Loading and storing of vectors in UltraRAM.
Soft vector processors can either be tightly coupled, where • Moving data between scalar and vector registers.
individual instructions are offloaded from the scalar processor • Generating random numbers.
to the vector processor or decoupled, where ‘kernels’ of • Computing masks by comparing vectors.
vector instructions are assembled separately and copied to • Selecting between elements of two vectors using masks.
the accelerator. While tightly coupled architectures allow fine- Multiplication is implemented using DSP blocks and, as these
grained communication between scalar and vector cores, their can operate at several times our operating frequency, this
performance can be restricted by the throughput of the scalar leaves time in the execute cycle to apply a 16 bit barrel shift
processor and each application must be compiled for the novel to the result in order to implement fixed-point multiplication.
architecture [12]. However, decoupled vector processors have Because FeNN has 32 vector lanes, the masks used for non-
to implement the entire control flow for the desired algorithms uniform control flow conveniently fit in a standard 32-bit
which would introduce significant complexity. RISC-V register. Thus, in our tightly-coupled architecture,
We have developed a best-of-both-worlds architecture where masks can be processed using vector and scalar instructions,
our FeNN vector processor works as a decoupled, in-memory removing hardware requirements for separate mask registers.
accelerator for a standard host CPU (a quad-core ARM Cortex- 1) Pipeline: Figure 1 illustrates how FeNN is pipelined
A53 on the Kria KV260) running Linux but is tightly coupled alongside the CV32E40X with synchronisation occurring
to its own scalar core. The scalar core is a CV32E40X through the XIF extension interface. All instructions can be
developed by the Open Hardware Group and is a small and executed within a single execute clock cycle and we include
efficient, 32-bit, in-order RISC-V core with a 4-stage pipeline. additional logic between the writeback and execute stages to
Data and control hazards notwithstanding, this core can issue enable bypassing of RAW hazards between vector registers.
1 instruction per cycle and provides a convenient extension UltraRAM resources are synchronous with a 1-cycle latency
interface upon which to implement our co-processor. In order so addresses are calculated in the execute cycle and values
A B
1.0
0.5
0.15
0.0
1.0 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00
P(x=k)
0.10 0.5
0.0
0.05 1.0 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00
0.5
0.00 0.0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1.00 0.75 0.50 0.25 0.00 0.25 0.50 0.75 1.00
k Bit error
Fig. 2. (A) Histogram of 3200 Poisson variates sampled from distribution with λ = 5, generated on FeNN. Horizontal lines indicate Probability Mass
Function of distribution. (B) Histograms showing the bit error distribution of 21 760 random S0.15 multiplication operations with (top) round-to-zero (middle)
round-to-nearest and (bottom) stochastic rounding (after Hopkins et al. [6]).
read from memory are written back to the register file in the and instruction BRAMs connected to the scalar RISC-V core
writeback cycle. are exposed to the ARM core via standard AXI BRAM
2) Random number generation: Efficient pseudorandom controllers. Similarly, control and status registers are exposed
number generation is important in many SNN models as via an AXI GPIO controller. These resources are then memory
well as for stochastic rounding [6] so an efficient Random mapped by user-space applications running on the ARM
Number Generator (RNG) is a key requirement for FeNN. core. Applications use a C++-based Just-in-Time assembler
Because FeNN operates on 16 bit numbers, we require an to generate FeNN instructions and copy them, alongside any
RNG with a small state size that can generate 16 bit of initial state, to the memory-mapped BRAMs. FeNN is then
randomness per cycle in each vector lane. Inspired by its use reset and simulates multiple SNN timesteps while the host
in the Propeller 2 microcontroller, we chose a Xoroshiro32++ polls, waiting for FeNN to finish.
generator [16] which is relatively high quality and extremely
D. Adaptive Leaky Integrate-and-Fire neuron model
hardware friendly – requiring only a handful of addition,
XOR, rotation and shift operations. However, if it were to Standard Recurrent SNNs (RSNNs) using Leaky Integrate-
be implemented as a standard RISC-V instruction – which and-Fire (LIF) neurons have inferior short-term memory ca-
reads at most two operands and writes back another – the pacities compared to recurrent ANN architectures such as
instruction to generate a random number would need to read LSTMs. Adaptive LIF (ALIF) neurons – which augment a
32 bit and write 48 bit of state per cycle requiring extra standard LIF neuron with a slowly adapting threshold – are
register file ports. Furthermore, incorporating the RNG into one solution to this problem [18]. The dynamics of an ALIF
a stochastic multiplication instruction would require reading neuron’s membrane voltage V can be calculated using an
two more operands and writing back yet another. Instead, we Exponential Euler scheme,
add two special two-port registers dedicated to holding the V [t + 1] =αV [t] + I syn [t + 1] − S[t]Vth (1)
RNG state. These can be populated from vector memory using
−1
special variants of the vector load instruction. where α = e controls the neuron’s leak (τm = 20), I syn is
τm
3) Stochastic rounding: A standard fixed point multipli- the input current and Vth = 0.6 is the baseline firing threshold
cation is performed by calculating (A * B) >> N where A which is subtracted from V when a spike occurs. Spikes are
and B are two fixed-point encoded operands and N is the triggered when the membrane voltage crosses the adaptive
number of fractional bits in the representation. The right shift threshold:
by N truncates the result leading to round-to-zero behaviour.
However, Mikaitis [17] demonstrated that rounding can be S[t] =H (V [t] − (Vth + βA[t])) (2)
implemented simply by turning the multiplication into a MAC where β = 0.0174 is the adaptation strength and H the
( (( A * B) + R) >> N) which is supported in hardware by Heaviside function. The adaptation A evolves as
the DSP blocks. Round-to-nearest can be implemented simply
by setting R to 0.5 (in fixed-point with N fractional bits) and A[t + 1] =ρA[t] + S[t] (3)
stochastic rounding by adding N bits of randomness (the mean −1
of which will be 0.5) from the RNG. where ρ = e τa controls the rate of adaptation (τa = 2000).
C. System-on-Chip design
In our current prototype we have instantiated a single FeNN
core on an AMD Kria KV260 development board. The data
$ &