Full Feature Spiking Neural Network Simulation on Micro-Controllers for Neuromorphic Applications at the Edge
Authors: L. Niedermeier, J. L. Krichmar
Organizations: Niedermeier Consulting, Zurich, ZH, Switzerland · Department of Computer Science, University of California, Irvine, CA, USA · Department of Cognitive Sciences, University of California, Irvine, CA, USA
Microcontroller units (MCU), which have an order of magnitude lower Size, Weight and Power (SWaP) than standard computers, makes them suitable for applications at the edge. Neuromorphic computing, which can realize low SWaP, relies on Spiking Neural Networks (SNNs). Until now, software based simulations of SNNs required GPU-based workstations, application classified core processors such as the ARM Cortex-A53, or specialized hardware like Intel's Loihi. In the present work, we demonstrate that the SNN simulator CARLsim can run its full feature set on a MCU RP2350 with 8 MB memory. We accomplished this by utilizing IEEE 16-bit float point numbers, which reduced memory requirements without loss of function. We were able to run the Synfire4 benchmark which comprises 1200 neurons. The accuracy was 97.5% compared to the standard single precision numbers. Furthermore, we show that CARLsim runs a Synfire4 benchmark scaled-down to 186 neurons on a MCU in real-time at only 20 mW. Compared to the smallest application class ARM processor used by Raspberry in their Pi Zero 2 W, our MCU implementation is five times more energy efficient for the SNN itself, and an order of magnitude better when compared to the complete SoC (MCU/CPU + Board).
Figures & tables
Fig. 1: Neuromorphic Applications on RP2350 MCUs. (a) An MCU has no operating system (OS) with a hardware abstraction layer and one dedicated application running that is flashed to its persistent memory. (b) CARLsim MCU enables a new class of neuromorphic applications. (c) The Raspberry Pico build system enables reusable source library based on CMake such as the SparkFun extension for the 8 MB PSRAM memory extension.
Fig. 2: The RP2350 MCU with two ARM Cortex-M33 cores. a) The SparkFun Pro Micro RP2350 has 8MB PSRAM extension (on the backside) that enables CARLsim. b) RP2350 MCU (backside) with 8MB PSRAM. The chip APS6404L, package code USON-8L, by apmemory is only 3x2mm small (left above sparkfun ). The SWD connector for the debug probe was a custom extension soldered onto the test points of the board.
Fig. 3: PSRAM circuit. Schematic of 8 MB PSRAM circuit for the APS6404L-3SQR-ZR QSPI chip.
Fig. 4: Architecture of Synfire4 benchmark network. The four segments are recurrently connected to measure the performance of a typical traveling wave through the SNN. The normal spike generator can generate various types of stimulus pulses.
Group
Size
Neuron Type
a
b
c
d
Cstim
200
poisson (spike generator)
Cexc[i]
200
excitatory (regular spiking)
0.02
0.2
-65
8
Cinh[i]
50
inhibitory (fast spiking)
0.1
0.2
-65
2
i∈{0,1,2,3}
TABLE I: Izhikevich neuron parameter for Synfire SNN with four segments.
Pre-Synaptic
Post-Synaptic
Connections*
Weight
Delay
Cstim
Cexc[0]
60
1.0
10 ms
Cstim
Cinh[0]
60
3.5
10 ms
Cexc[i]
Cexc[i+1]
60
1.0
10 ms
Cexc[i]
Cinh[i+1]
60
3.5
10 ms
Cinh[i+1]
Cexc[i+1]
25
-2.0
8 ms
Cexc[3]
Cexc[0]
60
1.0
10 ms
TABLE II: Synaptic connections of Synfire SNN with recurrent four segments.
Simulation load step
Mem. Size
Total Used
Total Available
(SRAM + PSRAM)
8.477 MB
1. CARLsim Init.
4.228 MB
4.228 MB
4.249 MB
2. Random Gen.
0.001 MB
4.229 MB
4.248 MB
3. Conn. Info
1.315 MB
5.544 MB
2.934 MB
4. Syn. State
0.156 MB
5.700 MB
2.777 MB
5. Neuron State
0.082 MB
5.782 MB
2.696 MB
TABLE III: Memory ramp-up of CARLsim MCU for the Synfire4 benchmark (1200 neurons) on a SparkFun Micro Pro 2 RP2350.
Fig. 5: CARLsim Synfire4 benchmark scaled-down to 186 neurons for running Synfire SNN in real-time on a RP2350 MCU (marked by the cyan circle) requires less than 20 mW of power. The baseline of the MCU is about 50 mW. The power was measured with the USB power meter at the left side. At the right side, the connected Raspberry Pi Debug Probe is shown, over which the experiment was controlled.
Simulation load step
Mem. Size
Total Used
Total Available
(SRAM + PSRAM)
8.478 MB
1. CARLsim Init.
0.808 MB
0.808 MB
7.670 MB
2. Random Gen.
0.000 MB
0.808 MB
7.670 MB
3. Conn. Info
0.047 MB
0.855 MB
7.623 MB
4. Syn. State
0.005 MB
0.860 MB
7.618 MB
5. Neuron State
0.012 MB
0.871 MB
7.606 MB
TABLE IV: Memory ramp-up of CARLsim MCU for the Synfire4 benchmark mini (186 neurons) on a SparkFun Micro Pro 2 RP2350.
Description
Synfire4
Synfire4,mini
Synfire4,mini
MCU (M33)
MCU (M33)
CPU (A53)
RP2350
RP2350
Pi Zero 2 W
SNN, neurons:
1,200
186
186
SNN, synapses:
81,154
2,430
2,430
Execution time:
27.4 s
29.7 s
30.02 s
Model time:
1 s
30 s
30 s
TABLE V: Performance comparison of CARLsim on the Synfire4 benchmark for SparkFun Pro Micro RP2350 (Arm Cortex-M33) vs. Raspberry Pi Zero 2 W (Arm Cortex-A53).
Centre for Advanced Electronics, Indian Institute of Technology Indore, Simrol 453552, Indore, India · Dept. of Electrical Engineering, Indian Institute of Technology Indore, Simrol 453552, Indore, India