# Distributed Arithmetic for Real-time Neural Networks on FPGAs

- Institution: CERN
- Department: FPGA Developers' Forum (FDF)
- Speaker: Chang Sun
- Year: 2025
- Language: English
- Subjects: Mathematics
- Source: [CERN](https://videos.cern.ch/record/3021064)
- Licence: [CERN](http://copyright.web.cern.ch)
- Who can watch: Tweens profiles and older (sources give no ratings; placed by Invisible Network from the source's own words)

Neural networks with a latency requirement at the order of $\mu$s, like the ones used at the CERN Large Hadron Colliders, are typically deployed on FPGAs fully unrolled. A bottleneck for deployment of such neural networks is area utilization, which is directly related to the constant matrix-vector multiplications (CMVM) performed in the networks. In this work, we implement an algorithm that optimizes the area consumption for such neural networks on FPGAs by performing the CMVMs with distributed arithmetic (DA) and integrate with the hls4ml library, a FOSS library for running real-time neural network inference on FPGAs. The optimized resource usage and latency are compared with the ones from the original hls4ml implementation on different networks. The results show that the proposed optimization can achieve a reduction of on-chip resource by up to a half in realistic quantized neural networks, while reducing the latency by up to 40\%, all while maintaining bit-accurate output values..

0:00:00 Slide 1

0:01:17 Slide 2

0:02:51 Slide 3

0:04:49 Slide 4

0:06:06 Slide 5

0:08:03 Slide 6

0:09:19 Slide 7

0:11:58 Slide 8

0:13:29 Slide 9

0:14:49 Slide 10

0:19:05 Slide 11

0:20:10 Slide 12

0:21:27 Slide 13

## Lectures

1. [Distributed Arithmetic for Real-time Neural Networks on FPGAs](https://invisiblenetwork.ai/learn/cern/3021064/7b0f3a8669f5), 24 min (CERN's player)
