FloatApprox: faithfully rounded floating-point function approximators in FPGAs
David B. Thomas Imperial College London
David Thomas, Imperial College, dt10@ic.ac.uk 1
floating-point function approximators in FPGAs David B. Thomas - - PowerPoint PPT Presentation
FloatApprox : faithfully rounded floating-point function approximators in FPGAs David B. Thomas Imperial College London 1 David Thomas, Imperial College, dt10@ic.ac.uk FloPoCo : Parameterised primitives 2 David Thomas, Imperial College,
David Thomas, Imperial College, dt10@ic.ac.uk 1
David Thomas, Imperial College, dt10@ic.ac.uk 2
David Thomas, Imperial College, dt10@ic.ac.uk 3
David Thomas, Imperial College, dt10@ic.ac.uk 4
David Thomas, Imperial College, dt10@ic.ac.uk 5
David Thomas, Imperial College, dt10@ic.ac.uk 6
David Thomas, Imperial College, dt10@ic.ac.uk 7
David Thomas, Imperial College, dt10@ic.ac.uk 8
David Thomas, Imperial College, dt10@ic.ac.uk 10
Source Pipelined Faithful RTL add, mul, div FloPoCo Yes Yes Yes log, exp FloPoCo Yes Yes Yes sin, cos FPLibrary No Yes Yes Altera Yes Yes Altera flow only Xilinx Yes ? Vivado HLS only log1p Altera Yes Yes Altera flow only expm1 Altera Yes No OpenCL only erf Altera Yes No OpenCL only
David Thomas, Imperial College, dt10@ic.ac.uk 11
Source Pipelined Faithful RTL add, mul, div FloPoCo Yes Yes Yes log, exp FloPoCo Yes Yes Yes sin, cos FPLibrary No Yes Yes Altera Yes Yes Altera flow only Xilinx Yes ? Vivado HLS only log1p Altera Yes Yes Altera flow only expm1 Altera Yes No OpenCL only erf Altera Yes No OpenCL only
David Thomas, Imperial College, dt10@ic.ac.uk 12
Source Pipelined Faithful RTL add, mul, div FloPoCo Yes Yes Yes log, exp FloPoCo Yes Yes Yes sin, cos FPLibrary No Yes Yes Altera Yes Yes Altera flow only Xilinx Yes ? Vivado HLS only log1p Altera Yes Yes Altera flow only expm1 Altera Yes No OpenCL only erf Altera Yes No OpenCL only
David Thomas, Imperial College, dt10@ic.ac.uk 13
David Thomas, Imperial College, dt10@ic.ac.uk 14
David Thomas, Imperial College, dt10@ic.ac.uk 15
David Thomas, Imperial College, dt10@ic.ac.uk 16
David Thomas, Imperial College, dt10@ic.ac.uk 17
18 David Thomas, Imperial College, dt10@ic.ac.uk
2 4 6 8 10 12 14 16 0.5 1.5 2.5 3.0 3.5 4.0 16 06 . ) 1 . sin(
95 .
x x x x y
19 David Thomas, Imperial College, dt10@ic.ac.uk
David Thomas, Imperial College, dt10@ic.ac.uk 20
David Thomas, Imperial College, dt10@ic.ac.uk 21
David Thomas, Imperial College, dt10@ic.ac.uk 22
David Thomas, Imperial College, dt10@ic.ac.uk 23
David Thomas, Imperial College, dt10@ic.ac.uk 24
David Thomas, Imperial College, dt10@ic.ac.uk 25
David Thomas, Imperial College, dt10@ic.ac.uk 26
David Thomas, Imperial College, dt10@ic.ac.uk 27
David Thomas, Imperial College, dt10@ic.ac.uk 28
David Thomas, Imperial College, dt10@ic.ac.uk 31
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand
David Thomas, Imperial College, dt10@ic.ac.uk 32
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 33
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 34
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 35
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 36
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 37
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 38
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 39
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 40
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21 1.0 2.0 2.0 1.0 1.5 1.5
David Thomas, Imperial College, dt10@ic.ac.uk 41
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21 1.0 2.0 2.0 1.0 1.5 1.5
David Thomas, Imperial College, dt10@ic.ac.uk 42
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand 20 2-1 2-3 2-2 2-4 22 21 23 2-4 2-3 2-2 2-1 20 21
David Thomas, Imperial College, dt10@ic.ac.uk 43
Segmentation Fixed-Point Polynomial Table-Lookup s flags expnt significand c0 cd ... s flags
c0 cd x
c1
c1
expnt
y = ∑ci xi x ëSiû ≤ i ≤ éSiù
s flags expnt significand
David Thomas, Imperial College, dt10@ic.ac.uk 44
David Thomas, Imperial College, dt10@ic.ac.uk 45
David Thomas, Imperial College, dt10@ic.ac.uk 46
David Thomas, Imperial College, dt10@ic.ac.uk 47
David Thomas, Imperial College, dt10@ic.ac.uk 48
David Thomas, Imperial College, dt10@ic.ac.uk 49
David Thomas, Imperial College, dt10@ic.ac.uk 50
David Thomas, Imperial College, dt10@ic.ac.uk 51
David Thomas, Imperial College, dt10@ic.ac.uk 52