Table of Contents
Fetching ...

Towards Fixed-Point Formats Determination for Faust Programs

Agathe Herrou, Florent de Dinechin, Stéphane Letz, Yann Orlarey, Anastasia Volkova

TL;DR

The paper addresses the challenge of replacing floating-point with fixed-point representations in Faust-compiled audio pipelines, particularly for FPGA targets, by developing automatic fixed-point format inference. It introduces a range-and-accuracy based framework, including the notion of pseudo-injectivity, and integrates it into the Faust compiler to propagate ranges and precisions through a signal graph, emitting fixed-point casts in generated code. The approach is demonstrated on sinewave and Karplus-Strong examples, showing that audio quality can be preserved while inferring fixed-point formats, though the method can yield wider-than-necessary bitwidths, indicating room for optimization. The work advances practical fixed-point deployment for audio on configurable hardware, enabling more resource-efficient implementations while maintaining acceptable fidelity, and outlines concrete avenues for further refinement such as backward propagation and interval-based error modeling.

Abstract

Modern programmable digital signal processing relies on floating-point numbers for their ease of use. Fixed-point number formats have the potential to save resources and improve execution time, but realising this potential burdens the programmer with the need to define each format, at every step of the computation. This article reviews existing methods to automatically determine fixed-point formats, then describes and evaluates the prototype implementation of automatic fixed-point format determination in the Faust compiler.

Towards Fixed-Point Formats Determination for Faust Programs

TL;DR

The paper addresses the challenge of replacing floating-point with fixed-point representations in Faust-compiled audio pipelines, particularly for FPGA targets, by developing automatic fixed-point format inference. It introduces a range-and-accuracy based framework, including the notion of pseudo-injectivity, and integrates it into the Faust compiler to propagate ranges and precisions through a signal graph, emitting fixed-point casts in generated code. The approach is demonstrated on sinewave and Karplus-Strong examples, showing that audio quality can be preserved while inferring fixed-point formats, though the method can yield wider-than-necessary bitwidths, indicating room for optimization. The work advances practical fixed-point deployment for audio on configurable hardware, enabling more resource-efficient implementations while maintaining acceptable fidelity, and outlines concrete avenues for further refinement such as backward propagation and interval-based error modeling.

Abstract

Modern programmable digital signal processing relies on floating-point numbers for their ease of use. Fixed-point number formats have the potential to save resources and improve execution time, but realising this potential burdens the programmer with the need to define each format, at every step of the computation. This article reviews existing methods to automatically determine fixed-point formats, then describes and evaluates the prototype implementation of automatic fixed-point format determination in the Faust compiler.
Paper Structure (29 sections, 3 equations, 9 figures, 2 tables)

This paper contains 29 sections, 3 equations, 9 figures, 2 tables.

Figures (9)

  • Figure 1: Representation of single-precision floating-point numbers: a sign bit, 8 exponent bits, 23 fraction bits.
  • Figure 2: $\pi$ rounded to the toy fixed-point example of Figure \ref{['fig:FPvsFixP']}: $\pi\approx 3.125=2^1+2^0+2^{-3}$.
  • Figure 3: Representation on the real axis of the numbers representable in two toy 6-bit formats: above, two's complement fixed-point with 3 integral bits and 3 fraction bits. Below, floating-point with 3 exponent bits and 2 fraction bits (longer bars are powers of two, subnormals are in red, maximum finite representable value is $1.11_2\cdot 2^{3}=14$, two infinities).
  • Figure 4: Overview of the structure of the Faust compiler.
  • Figure 5: Compilation of a phasor-based sine, from the Faust code to the audio output. Range of signals and prescribed precisions are determined during the Semantic Phase of the compilation, converting the block diagram to a signal graph. These signal properties are then used to determine fixed-point formats, which are indicated in the generated code as casts to fixed-point datatypes.
  • ...and 4 more figures

Theorems & Definitions (1)

  • Definition 1