HLS Lectures at INFN FPGA School
</a>
I was very happy to teach for a day and a half on High Level Synthesis (HLS) at Milano Bicocca as part of a week long FPGA school. The overall course organisation was fantastic, Simone did a great job bringing the school together, Mirko and Andrea put together excellent course material, and Francesco and Giulio were tirelessly on hand during the exercises.
In the HLS part, I focussed on two topics that I think are most important for grasping effective FPGA programming: numerics and loops. Students first worked through some by-hand integer and fixed-point arithmetic exercises, before putting them into practise in code. I put together an open ended exercise on the physics algorithm of computing the Missing Transverse Energy (MET). Starting from only a simple Python reference implementation, some files of simulated particle data, and an HLS testbench, students needed to make an efficient HLS implementation using fixed-point arithmetic, looking to achieve a MET performance close to the floating-point reference.
On the second day, we used the same MET example to explore loops. We went through understanding loop-carried dependencies, fixed loop bounds, and loop unrolling. The students put their loop optimisation skills into practise by making their MET implementation from the first day run with a higher throughput and lower latency.
We also took a small detour to implement an HLS IP into the Arty-100T board that the students had been using in the HDL sections of the course.
Students needed to study the HLS interface documentation and determine which signals of their UART transmitter and receiver reference design to connect to the HLS IP ports.
We then used a simple serial console to send and receive data from the HLS module that summed up the received value and transmitted the currently accumulated value.
This was also a first time for me using an Arty-100T board, and I’m hoping to build on it with some examples based on hls4ml
and conifer
.
Take a look at the full FPGA course material here, and the HLS exercises here.