This page presents FPLibrary, a VHDL library of hardware operators for the floating-point (FP) and the logarithm (LNS) number systems, developped in the Arénaire project, at ENS Lyon.
FPLibrary operators can be downloaded from here. This directory contains several tar-gzipped archive containing VHDL source code.
More detailed instructions, including detailed setup instructions for Xilinx ISE, can be found in the pdf document here.
Extract the archive with:
tar xzvf FPLibrary-0.94.tgz
The resulting directory should have the following structure:
|contains this file
|contains the code for the main package
|contains the code for all the FP operators
|contains the code for all the LNS operators
|contains the code for the conversion operators (support for IEEE-754, FP and LNS formats)
|contains some components shared by the operators
To use the library, you first have to pre-compile it. Its working library has to be
Then, you just have to specify in the declaration of your entities that you need to include this library. This can be done by adding these two lines:
You can now instantiate any of the operators provided by FPLibrary in your designs.
FPLibrary provides the following operators:
|combinatorial addition/subtraction operator
|pipelined addition/subtraction operator
|combinatorial multiplication operator
|pipelined multiplication operator
|combinatorial division operator
|pipelined division operator
|combinatorial square root operator
|pipelined square root operator
|conversion from IEEE-754 format to internal FP format
|conversion from IEEE-754 format to internal LNS format
|conversion from internal FP format to IEEE-754 format
|conversion from internal LNS format to IEEE-754 format
1.3.1. Arithmetic operators
Op one of
Sqrt, we have:
component Op is
component Op_Clk is
nB operand is not defined for square
fmt generic parameter has to be either
FP to instantiate an FP operator
LNS to instantiate an LNS operator. This allows to change the number format of a whole circuit
by changing only one parameter.
wF generic parameters directly determines the range and the precision of the numbers the operator will use:
wE is the size in bits of the exponent and
wF the size in bits of the significand;
wF are the size in bits respectively
of the integer and fractional parts of the fixed-point logarithm.
nB whenever available) is (are) the input port(s) for the operand(s) of the considered operator.
nR is the output port for the result of the considered operator.
For pipelined operators,
clk is the clock port.
1.3.2. Conversion operators
Fmt one of
LNS, we have:
component IEEE754_To_Fmt is
component Fmt_To_IEEE754 is
wF generic parameters have the same meaning as for arithmetic operators.
nR respectively are the input and output ports of the considered operator.
Do not hesitate to contact us (address at ens-lyon.fr) for more details.
These operators have been developped and tested using Xilinx ISE 5.2 and later / ModelSim XE II 5.6e and later.
This program is distributed under the GPL. See inside the archive for details.
Last modified: Mon Jul 31 09:02:43 CEST 2006