There are a lot of very interesting points in a paper I’ve just been reading, When FPGAs are better at floating-point than microprocessors. It’s by Florent de Dinechin and Jérémie Detrey of the Arénaire project in Lyon, France, as well as Octavian Cret and Radu Tudoran of the Technical University of Cluj-Napoca, in Romania. The Arénaire project is a large-scale, long-term project looking at the implementation of computer arithmetic. The project deals both with conventional implementation environments, such as microprocessor-based computers, as well as reconfigurable computing (i.e. FPGA) environments. A key figure in Arénaire has been Jean-Michel Müller, who literally wrote the book on Elementary Function computations. For those that are looking to implement floating-point elementary functions on FPGAs, such as the logarithm and exponential, there is open-source VHDL on the Arénaire project website. It gives compact, accurately-rounded, fully-pipelined cores that are good to go on any modern FPGA.
Anyway, on to some interesting things I picked out from the paper:
The main point made is that FPGAs have more of an advantage at implementing floating-point calculations over microprocessors than comparisons of + & × performance at single and double precision would suggest. We need to ask how best to use FPGAs for the implementation of floating-point algorithms. FPGAs may have significant advantages over microprocessors in implementing algorithms that require less or more precision than is provided by microprocessors. The authors discuss an inductivity calculation as an example application. It consists in computing the inductance of a set of coils used for the magnetic stimulation of the nervous system.They work through how one would approach the implementation of this algorithm, aiming to pipeline as much of it as possible. They advocate thinking about the precision that is necessary to the end user. In this case only a few digits of final precision are required. One needs knowledge of an algorithm’s end precision requirements, and awareness of a number of techniques and rules of thumb for managing precision within an algorithm’s calculations. With this knowledge you can get the same or better precision as you would get with double-precision implementations, but with lower area and latency costs.
The authors describe floating-point accumulators that are built primarily from wide fixed-point additions that occur within a single clock cycle (in the case of the smaller sized accumulators). It makes the implementation of pipelined accumulate units less costly in terms of latency and area. Furthermore, it promises greater precision than is currently possible using standard floating-point addition units.
The authors discuss the advantages of merging operators to create compound operators such as:
The best area and performance results obviously come when the internal precision and general architecture of the compound operator is custom designed. Less obvious was what happened if one naively instantiated the operators +,√ and × in HDL creating a single operator and presenting everything to the synthesiser in HDL (not in pre-synthesised netlists such as NGCs or EDIFs). It turns out the logic synthesiser is smart enough to signficantly improve the resource consumption.
Some other interesting points made by the authors:
- They find it unlikely that we will soon be able to fully automate floating-to-fixed point conversions when implementing algorithms on FPGAs.
- They briefly discuss a method for obtaining exact results for dot-product, and related matrix and vector operations. They invite suggestions of applications that require such precision
- The authors are investigating generators for producing HDL of elementary function cores
- The authors do not advocate implementing hard double-precision arithmetic units on FPGA dies, seeing more value in the implementation of cascadable shifter/normaliser units. (See Underwood et al’s work for more background on this)
P.S. I used Roger’s Online Equation Editor to format the equation in this post, it’s a nice useful website
