Operator list for FloPoCo version 5.0.git

Shifters, Leading Zero Counters, etc

Shifter
A flexible shifter.
Parameters:
wX (int)
input size in bits
maxShift (int)
maximum shift distance in bits
dir (bool)
0=left, 1=right
wR (int) (optional, default value is -1)
size of the shifted output , -1 means computed, will be equal to wX+maxShift
computeSticky (bool) (optional, default value is false)
if true and wR
inputPadBit (bool) (optional, default value is false)
if true, add an input bit used for left-padding, as in sign extension
LZOC
A leading zero or one counter. The output size is computed.
Parameters:
wIn (int)
input size in bits
countType (int) (optional, default value is -1)
0 means count zeroes, 1 means count ones, -1 means add an input that defines what to count
GenericMux
A Multiplexer
Parameters:
wIn (int)
input word size
inputCount (int)
the number of data inputs (NOT counting the select input!)
GenericLut
A simple look up table.
Parameters:
wIn (int)
input word size
wOut (int)
output word size
entityName (string)
unique name for the LUT
inputValues (string)
colon seperated list of (unsigned) ints specifying the inputs for the LUT
outputValues (string)
colon seperated list of (unsigned) ints specifying the corrisponding outputs
LZOC3
A leading zero counter. The output size is computed.
Parameters:
wIn (int)
input size in bits
useLargeLut (bool) (optional, default value is false)
Use max unrouted lut size to build the encoding
ShiftReg
A plain shift register implementation.
Parameters:
w (int)
the size of the input
n (int)
the number of stages in the shift register, also the number of outputs
reset (int) (optional, default value is 0)
the reset type (0 for none, 1 for synchronous, 2 for asynchronous)
Normalizer
A combined leading zero/one counter and left shifter, useful for floating-point normalization.
Parameters:
wX (int)
input size in bits
wR (int)
output size in bits, with wR <= wX
maxShift (int)
how many bits to count, with maxShift<= wX
computeSticky (bool) (optional, default value is false)
if true and wR
countType (int) (optional, default value is -1)
0 to count zeroes, 1 to count ones, -1 to have a dynamic OZb input that tells what to count

Basic integer operators (pipelined)

IntSquarerLUT
Implements a LUT squarer by simply tabulating all results in the LUT, should only be used for very small word sizes
Parameters:
wIn (int)
size of the input XxX
isSigned (bool)
signedness of the input
BaseMultiplierXilinx2xk
Implements a 2xY-LUT-Multiplier that can be realized efficiently on some Xilinx-FPGAs
Parameters:
wX (int)
size of input X
wY (int)
size of input Y
xIsSigned (bool) (optional, default value is 0)
input X is signed
yIsSigned (bool) (optional, default value is 0)
input Y is signed
BaseMultiplierIrregularLUTXilinx
Implements a non rectangular LUT multiplier from a set that yields a relatively high efficiency compared to recangular LUT multipliers _ _ _ _ _ _ _ _ _ _ _ _ _ _ |_|_|_ |_|_ |_|_|_ |_|_ |_|_|_| |_|_|_ |_|_| |_|_ |_|_|_| |_|_|_ |_|_| |_|_| |_|_| |_|_|_| |_|_| |_|_| |_|_|_| |_|_| |_| |_| |_|_| shape 1 shape 2 shape 3 shape 4 shape 5 shape 6 shape 7 shape 8
Parameters:
wS (int)
shape ID
xSigned (bool) (optional, default value is false)
input X can be signed or unsigned
ySigned (bool) (optional, default value is false)
input Y can be signed or unsigned
BaseMultiplierDSPKaratsuba
Implements the Karatsuba pattern with DSPs where certain multipliers can be omitted to save DSPs
Parameters:
wX (int)
size of input X of a single DSP-block
wY (int)
size of input Y of a single DSP-block
n (int)
size of pattern and number of DSP substitutions
IntMultiplierLUT
Implements a LUT multiplier by simply tabulating all results in the LUT, should only be used for very small word sizes
Parameters:
wX (int)
size of input X
wY (int)
size of input Y
IntConstantComparator
An integer comparator.
Parameters:
w (int)
size in bits of integers to be compared
c (int)
constant
flags (int) (optional, default value is 7)
if bit 0 set output XC
method (int) (optional, default value is -1)
method to be used, for experimental purpose (-1: automatic, 0: symmetric, 1: asymmetric where gt is computed out of lt and eq, 2: binary tree) (plainVHDL option also supported)
Outputs up to 3 mutually exclusive signals: XltC (less than, strictly), XeqC (equal), XgtC (greater than, strictly)
DSPBlock
Implements a DSP block commonly found in FPGAs incl. pre-adders and post-adders computing R = (X1+X2) * Y + Z
Parameters:
wX (int)
size of input X (or X1 and X2 if pre-adders are used)
wY (int)
size of input Y
wZ (int) (optional, default value is 0)
size of input Z (if post-adder is used)
xIsSigned (bool) (optional, default value is 0)
input X is signed
yIsSigned (bool) (optional, default value is 0)
input Y is signed
isPipelined (bool) (optional, default value is 1)
every stage is pipelined when set to 1
usePostAdder (bool) (optional, default value is 0)
use post-adders
usePreAdder (bool) (optional, default value is 0)
use pre-adders
preAdderSubtracts (bool) (optional, default value is 0)
if true, the pre-adder performs a pre-subtraction
BitheapTest
A random test generator for the bitheap.
Parameters:
msb (int)
the msb of the bitheap
lsb (int)
the lsb of the bitheap
nbInputs (int)
the number of signals to add to the bitheap
isSigned (bool)
the signness of the bitheap
weight (int)
the weight of the inputs in the bitheap
IntMultiplier
A pipelined integer multiplier. Also uses the global options: tiling, ilpSolver, etc
Parameters:
wX (int)
size of input X
wY (int)
size of input Y
wOut (int) (optional, default value is 0)
size of the output if you want a truncated multiplier. 0 for full multiplier
signedIO (bool) (optional, default value is false)
inputs and outputs can be signed or unsigned
maxDSP (int) (optional, default value is -1)
limits the number of DSP-Tiles used in Multiplier
use2xk (bool) (optional, default value is false)
if true, attempts to use the 2xk-LUT-Multiplier with relatively high efficiency
useirregular (bool) (optional, default value is false)
if true, attempts to use the irregular-LUT-Multipliers with higher area/lut efficiency than the rectangular versions
useLUT (bool) (optional, default value is true)
if true, attempts to use the LUT-Multipliers for tiling
useDSP (bool) (optional, default value is true)
if true, attempts to use the DSP-Multipliers for tiling
useKaratsuba (bool) (optional, default value is false)
if true, attempts to use rectangular Karatsuba for tiling
superTile (bool) (optional, default value is false)
if true, attempts to use the DSP adders to chain sub-multipliers. This may entail lower logic consumption, but higher latency.
dspThreshold (real) (optional, default value is 0.0)
threshold of relative occupation ratio of a DSP multiplier to be used or not
optiTrunc (bool) (optional, default value is true)
if true, considers the Truncation error dynamicly, instead of defining a hard border for tiling, like in th ARITH paper
minStages (bool) (optional, default value is true)
if true, minimizes stages in combined opt. of tiling an comp., otherwise try to find a sol. with less LUTs and more stages
beamRange (int) (optional, default value is 3)
range for beam search
squarer (bool) (optional, default value is false)
generate squarer
IntSquarer
An integer squarer.
Parameters:
wIn (int)
size of input in bits
wOut (int) (optional, default value is 0)
size of the output if you want a truncated squarer. 0 for exact (full) squarer
method (string) (optional, default value is schoolbook)
squarer design method, schoolbook (standard) or optimal
maxDSP (int) (optional, default value is 0)
limit DSPs, 0 (standard) or allow more
signedIn (bool) (optional, default value is false)
inputs can be signed or unsigned (output always unsigned)
IntComparator
An integer comparator.
Parameters:
w (int)
size in bits of integers to be compared
flags (int) (optional, default value is 7)
if bit 0 set output XY
method (int) (optional, default value is -1)
method to be used, for experimental purpose (-1: automatic, 0: symmetric, 1: asymmetric where gt is computed out of lt and eq, 2: binary tree, 3: two-level minimum latency)
Outputs up to 3 mutually exclusive signals: XltY (less than, strictly), XeqY (equal), XgtY (greater than, strictly)
IntKaratsubaRectangular
Implements a large unsigned Multiplier using rectangular shaped tiles as appears for Xilinx FPGAs. Currently limited to specific, hand-optimized sizes
Parameters:
wX (int)
size of input X
wY (int)
size of input Y
useKaratsuba (bool) (optional, default value is 1)
Uses Karatsuba when set to 1, instead a standard tiling without sharing is used.
useRectangularTiles (bool) (optional, default value is 1)
Uses rectangular tiles when set to 1, otherwise quadratic tiles are used
IntDualAddSub
Pipelined dual adder/subtractor
Parameters:
wIn (int)
input size in bits
opType (int)
1=compute X-Y and X+Y, 2=compute X-Y and Y-X
BaseMultiplierDSPSuperTilesXilinx
Implements a DSP block commonly found in FPGAs incl. pre-adders and post-adders computing R = (X1+X2) * Y + Z
Parameters:
shape (int)
Shape ID (1-12) of the DSP-Superblock
isPipelined (bool) (optional, default value is 0)
use pipelining
xIsSigned (bool) (optional, default value is 0)
input X is signed
yIsSigned (bool) (optional, default value is 0)
input Y is signed
IntAdder
Integer adder. In modern VHDL, integer addition is expressed by a + and one usually needn't define an entity for it. However, this operator will be pipelined if the addition is too large to be performed at the target frequency.
Parameters:
wIn (int)
input size in bits
arch (int) (optional, default value is -1)
-1 for automatic, 0 for classical, 1 for alternative, 2 for short latency
optObjective (int) (optional, default value is 2)
0 to optimize for logic, 1 to optimize for register, 2 to optimize for slice/ALM count
SRL (bool) (optional, default value is true)
optimize for shift registers
IntMultiAdder
A component adding n integers, bitheap based. If wIn=1 it is also a population count
Parameters:
signedIn (bool)
0=unsigned, 1=signed
n (int)
number of inputs to add
wIn (int)
input size in bits
wOut (int) (optional, default value is 0)
output size in bits -- if 0, wOut is computed to be large enough to represent the result
Compressor
A basic compressor.
Parameters:
columnHeights (string)
comma separated list of heights for the columns of the compressor, in decreasing order of the weight. For example, columnHeights="2,3" produces a (2,3:4) GPC
compactView (bool) (optional, default value is false)
whether the VHDL code is printed in a more compact way, or not
BaseMultiplierBoothArrayXilinx
Implements a 2xY-LUT-Multiplier that can be realized efficiently on some Xilinx-FPGAs
Parameters:
wX (int)
size of input X
wY (int)
size of input Y
wAcc (int) (optional, default value is 0)
size of the accumulate input
xIsSigned (bool) (optional, default value is 0)
input X is signed
yIsSigned (bool) (optional, default value is 0)
input Y is signed

Basic floating-point operators

FPDiv
A correctly rounded floating-point division.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
srt (int) (optional, default value is 42)
Can be 42, 43 or 87 so far. Default 42 means radix 4 with digits between -2 and 2. Other choices may have a better area/speed trade-offs
The algorithm used here is the division by digit recurrence (SRT). In radix 4, we use a maximally redundant digit set. In radix 8, we use split-digits in [-7,7], and a bit of prescaling.
FPSqrt
A correctly rounded floating-point square root function.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
method (int) (optional, default value is 1)
0 for plain restoring, 1 for nonrestoring method
IEEEAdd
A single-path floating-point adder.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
FPComparator
An IEEE-like floating-point comparator.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
flags (int) (optional, default value is 31)
generate XltY output if bit 0 set, XeqY if bit 1, XgtY if bit 2, XleY if bit 3, XgeY if bit 4
method (int) (optional, default value is -1)
method to be used in the IntComparator, see IntComparator
Outputs up to 4 mutually exclusive signals: unordered (when one input is NaN), XltY (less than, strictly), XeqY (equal), XsgtY (greater than, strictly). Also two derived signals XleY (less or equal) and XgeY (greater or equal). unordered is set iff at least one of the inputs is NaN. The other ones behave as expected on two non-NaN values, with the IEEE 754 conventions: +0 = -0; +infinity = +infinity; -infinity = -infinity. The flags argument controls which signal is generated.;
IEEEFMA
A correctly rounded floating-point FMA.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
FPMult
A floating-point multiplier. The actual FloPoCo component supports different input and output sizes, but this is not available from the command line.
Parameters:
wE (int)
input exponent size in bits, for X or for both X and Y
wF (int)
input significand fraction size in bits, for X or for both X and Y
wEY (int) (optional, default value is 0)
second input exponent size in bits (0 means wEY=wE)
wFY (int) (optional, default value is 0)
second input significand fraction size in bits (0 means wFY=wF)
wEOut (int) (optional, default value is 0)
result exponent size in bits (0 means wEOout=wE)
wFOut (int) (optional, default value is 0)
result significand fraction size in bits (0 means wFOout=wF)
correctlyRounded (bool) (optional, default value is true)
correct (true) or faithful (false) rounding
dspThreshold (real) (optional, default value is 0.0)
threshold of relative occupation ratio of a DSP multiplier to be used or not
FPAdd
A correctly rounded floating-point adder.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
sub (bool) (optional, default value is false)
implement a floating-point subtractor instead of an adder
dualPath (bool) (optional, default value is false)
use a dual-path algorithm, more expensive but shorter latency
onlyPositiveIO (bool) (optional, default value is false)
optimize for only positive input and output numbers
Single-path is lower hardware, longer latency than dual-path.
The difference between single-path and dual-path is well explained in textbooks such as Ercegovac and Lang's Digital Arithmetic, or Muller et al's Handbook of floating-point arithmetic.

Posit operators

PositExp
A faithful posit exponential function.
Parameters:
width (int)
Posit size in bits
wES (int)
exponent size in bits
d (int) (optional, default value is 0)
degree of the polynomial. 0 choses a sensible default.
k (int) (optional, default value is 0)
input size to the range reduction table, should be between 5 and 15. 0 choses a sensible default.
g (int) (optional, default value is -1)
number of guard bits
Parameter d and k control the DSP/RamBlock tradeoff. In both cases, a value of 0 choses a sensible default. Parameter g is mostly for internal use.
For all the details, see this article.
PositAdd
A correctly rounded posit adder.
Parameters:
width (int)
posit size in bits
wES (int)
exponent size in bits
PositFunctionByTable
Evaluator of function f using a table.
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
width (int)
size of the Posit
wES (int)
size of the Posit's exponent.
This operator uses a table to store function values.

Multipliers and dividers by constants

FPConstMult
Floating-point constant multiplier using the shift-and-add approach.
Parameters:
wE (int)
input exponent width, also output exponent width if weOut=-1
wF (int)
input significand width, also output significand width if wFOut=-1
constant (string)
constant in sollya formalism (e.g. "cos(3*pi/2)" or "13176795b-22")
wEout (int) (optional, default value is -1)
output exponent width, -1 means same as wE
wFout (int) (optional, default value is -1)
output significand width, -1 means same as wF
cst_width (int) (optional, default value is 0)
constant precision. If set to zero, the actual width will be computed in order to get a faithful result.
An early version of the technique used is described in this article.
FixRealShiftAdd
Table based real multiplier. Output size is computed
Parameters:
signedIn (bool)
0=unsigned, 1=signed
msbIn (int)
weight associated to most significant bit (including sign bit)
lsbIn (int)
weight associated to least significant bit
lsbOut (int)
weight associated to output least significant bit
constant (string)
constant given in arbitrary-precision decimal, or as a Sollya expression, e.g "log(2)"
targetUlpError (real) (optional, default value is 1.0)
required precision on last bit. Should be strictly greater than 0.5 and lesser than 1
This variant of shift-and-add multiplier is briefly described in this article.
Special constants, such as 0 or powers of two, are handled efficiently.
FPConstMultRational
Correctly rounded floating-point multiplier by a rational constant.
Parameters:
wE (int)
input exponent width, also output exponent width if weOut=-1
wF (int)
input significand width, also output significand width if wFOut=-1
a (int)
numerator
b (int)
denominatorwEout(int)=-1: output exponent width, -1 means same as wE
wFout (int) (optional, default value is -1)
output significand width, -1 means same as wF
The technique used is described in this article.
FixRealConstMult
Table based real multiplier. Output size is computed
Parameters:
signedIn (bool)
0=unsigned, 1=signed
msbIn (int)
weight associated to most significant bit (including sign bit)
lsbIn (int)
weight associated to least significant bit
lsbOut (int)
weight associated to output least significant bit
constant (string)
constant given in arbitrary-precision decimal, or as a Sollya expression, e.g "log(2)"
targetUlpError (real) (optional, default value is 1.0)
required precision on last bit. Should be strictly greater than 0.5 and lesser than 1
method (string) (optional, default value is auto)
desired method. Can be 'KCM', 'ShiftAdd' or 'auto' (let FloPoCo decide which operator performs best)
The KCM variant is described in this article. The Shift-and-Add variant is described in this article.
Special constants, such as 0 or powers of two, are handled efficiently.
IntConstMultShiftAddOptTernary
Integer constant multiplication using shift and ternary additions in an optimal way (i.e., with minimum number of ternary adders). Works for coefficients up to 4194303 (22 bit)
Parameters:
wIn (int)
Input word size
constant (int)
constant
Nope.
FixRealKCM
Table based real multiplier. Output size is computed
Parameters:
signedIn (bool)
0=unsigned, 1=signed
msbIn (int)
weight associated to most significant bit (including sign bit)
lsbIn (int)
weight associated to least significant bit
lsbOut (int)
weight associated to output least significant bit
constant (string)
constant given in arbitrary-precision decimal, or as a Sollya expression, e.g "log(2)"
targetUlpError (real) (optional, default value is 1.0)
required precision on last bit. Should be strictly greater than 0.5 and lesser than 1
This variant of Ken Chapman's Multiplier is briefly described in this article.
Special constants, such as 0 or powers of two, are handled efficiently.
FixFixConstMult
Table based real multiplier. Output size is computed
Parameters:
signedIn (bool)
0=unsigned, 1=signed
msbIn (int)
weight associated to most significant bit (including sign bit)
lsbIn (int)
weight associated to least significant bit
lsbOut (int)
weight associated to output least significant bit
constant (string)
constant given in arbitrary-precision decimal, or as a Sollya expression, e.g "log(2)"
targetUlpError (real) (optional, default value is 1.0)
required precision on last bit. Should be strictly greater than 0.5 and lesser than 1
This variant of Ken Chapman's Multiplier is briefly described in this article.
Special constants, such as 0 or powers of two, are handled efficiently.
FixComplexKCM
Table-based complex multiplier. Inputs are two's complement. Output size is computed
Parameters:
msbIn (int)
weight associated to most significant bit (including sign bit)
lsbIn (int)
weight associated to least significant bit
lsbOut (int)
weight associated to output least significant bit
constantRe (string)
real part of the constant, given as a Sollya expression, e.g "log(2)"
constantIm (string)
imaginary part of the constant, given as a Sollya expression, e.g "log(2)"
extrabit (bool) (optional, default value is true)
do we need extra bit for addition
IntConstMultShiftAddOpt
Integer constant multiplication using shift and add in an optimal way (i.e., with minimum number of adders). Works for coefficients up to 524287 (19 bit)
Parameters:
wIn (int)
Input word size
constant (int)
constant
epsilon (int) (optional, default value is 0)
Allowable error for truncated constant multipliers
Nope.
IntConstMultShiftAddRPAG
Integer constant multiplication using shift and add using the RPAG algorithm
Parameters:
wIn (int)
Input word size
constant (string)
list of constants
epsilon (int) (optional, default value is 0)
Allowable error for truncated constant multipliers
Nope.
IntConstMult
Integer multiplier of an unsigned number by a constant using a shift-and-add tree.
Parameters:
wIn (int)
input size in bits
n (int)
constant to multiply by
An early version of this operator is described in this article.
IntConstDiv
Integer divider by a small constant.
Parameters:
wIn (int)
input size in bits
d (intlist)
integer to divide by. Either a small integer, or a colon-separated list of small integers, in which case a composite divider by the product is built
arch (int) (optional, default value is 0)
architecture used -- 0 for linear-time, 1 for log-time, 2 for multiply-and-add by the reciprocal
computeQuotient (bool) (optional, default value is true)
if true, the architecture outputs the quotient
computeRemainder (bool) (optional, default value is true)
if true, the architecture outputs the remainder
alpha (int) (optional, default value is -1)
Algorithm uses radix 2^alpha. -1 choses a sensible default.
This operator is described, for arch=0, in this article, and for arch=1, in this article.
IntConstMultShiftAdd
A component for building constant multipliers based on pipelined adder graphs (PAGs).
Parameters:
wIn (int)
Wordsize of pag inputs
graph (string)
Realization string of the pag
epsilon (int) (optional, default value is 0)
Allowable error for truncated constant multipliers
pipeline (bool) (optional, default value is true)
Enable pipelining of the pag
sync_inout (bool) (optional, default value is true)
Enable pipeline registers for input and output stage
sync_muxes (bool) (optional, default value is true)
Enable counting mux-only stages as full stage
sync_every (int) (optional, default value is 1)
Count of stages after which will be pipelined
truncations (string) (optional, default value is "")
provides the truncations for subvalues

Composite fixed-point operators

Fix2DNorm
Computes sqrt(x*x+y*y)
Parameters:
msb (int)
weight of the MSB of both inputs and outputs
lsb (int)
weight of the LSB of both inputs and outputs
method (int) (optional, default value is -1)
technique to use, -1 selects a sensible default

Elementary functions in fixed- or floating-Point

FixSinCos
Computes (1-2^(-w)) sin(pi*x) and (1-2^(-w)) cos(pi*x) for x in -[1,1[
Parameters:
lsb (int)
weight of the LSB of the input and outputs
method (int) (optional, default value is 0)
0 for table- and mult-based, 1 for traditional CORDIC, 2 for reduced-iteration CORDIC
wA (int) (optional, default value is 0)
input size to the table. 0 choses a sensible value matching the target block RAM size.
For a fixed-point 2's complement input x in [-1,1[, evaluates (1-2^(lsbIn))*{sin,cos}(pi*x).
For more details, see this article.
FixAtan2
Computes atan(X/Y) as A=(angle in radian)/pi, so A in [-1,1).
Parameters:
lsb (int)
weight of the LSB of both inputs and outputs
method (int)
parameter select between: InvMultAtan with approximations of the corresponding degree (0..7), plain CORDIC (8), CORDIC with scaling (9), a method using surface approximation (10), Taylor approximation of order 1 (11) and 2 (12)
For more details, see this article.
FPExp
A faithful floating-point exponential function.
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
d (int) (optional, default value is 0)
degree of the polynomial. 0 choses a sensible default.
k (int) (optional, default value is 0)
input size to the range reduction table, should be between 5 and 15. 0 choses a sensible default.
g (int) (optional, default value is -1)
number of guard bits
fullInput (bool) (optional, default value is 0)
input a mantissa of wF+wE+g bits (useful mostly for FPPow)
Parameter d and k control the DSP/RamBlock tradeoff. In both cases, a value of 0 choses a sensible default. Parameter g is mostly for internal use.
For all the details, see this article.
FPLog
Floating-point logarithm
Parameters:
wE (int)
exponent size in bits
wF (int)
mantissa size in bits
method (int) (optional, default value is 0)
0 for iterative, 1 for polynomial
inTableSize (int) (optional, default value is 0)
The input size to the tables of the iterative method, in bits, between 6 and 16. 0 choses a a sensible value
For details on the technique used, see this article and this research report.
FPPow
A floating-point power function.
Parameters:
wE (int)
exponent size in bits for both inputs
wF (int)
mantissa size in bits for both inputs
type (int) (optional, default value is 0)
0 for pow, 1 for the powr function introduced in IEEE754-2008

Arbitrary function approximators

FixFunctionByMultipartiteTable
A function evaluator using the multipartite method.
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
signedIn (bool)
if true the function input range is [-1,1), if false it is [0,1)
lsbIn (int)
weight of input LSB, for instance -8 for an 8-bit input
lsbOut (int)
weight of output LSB
nbTO (int) (optional, default value is 0)
number of Tables of Offsets, between 1 (bipartite) to 4 or 5 for large input sizes. -- 0: let the tool choose
This operator uses the multipartite table method as introduced in this article, with the improvement described in this article.
FixFunctionByTable
Evaluator of function f on [0,1) or [-1,1), depending on signedIn, using a table.
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
signedIn (bool)
if true the function input range is [-1,1), if false it is [0,1)
lsbIn (int)
weight of input LSB, for instance -8 for an 8-bit input
lsbOut (int)
weight of output LSB
This operator uses a table to store function values.
UniformPiecewisePolyApprox
Helper/Debug feature, does not generate VHDL. Uniformly segmented piecewise polynomial approximation of function f, accurate to targetAcc on [0,1)
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
targetAcc (real)
the target approximation errror of the polynomial WRT the function
d (int)
the degree to use
FixFunctionByPiecewisePoly
Evaluator of function f on [0,1), using a piecewise polynomial of degree d with Horner scheme.
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
lsbIn (int)
weight of input LSB, for instance -8 for an 8-bit input
lsbOut (int)
weight of output LSB
d (int)
degree of the polynomial
approxErrorBudget (real) (optional, default value is 0.25)
error budget in ulp for the approximation, between 0 and 0.5
This operator uses a table for coefficients, and Horner evaluation with truncated multipliers sized just right.
For more details, see this article.
FixFunctionBySimplePoly
Evaluator of function f on [0,1) or [-1,1), using a single polynomial with Horner scheme
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
signedIn (bool) (optional, default value is true)
if true the function input range is [-1,1), if false it is [0,1)
lsbIn (int)
weight of input LSB, for instance -8 for an 8-bit input
lsbOut (int)
weight of output LSB
This operator uses a table for coefficients, and Horner evaluation with truncated multipliers sized just right.
For more details, see this article.
VaryingPiecewisePolyApprox
Helper/Debug feature, does not generate VHDL. Uniformly segmented piecewise polynomial approximation of function f, accurate to targetAcc on [0,1)
Parameters:
f (string)
function to be evaluated between double-quotes, for instance "exp(x*x)"
targetAcc (real)
the target approximation errror of the polynomial WRT the function
lsbIn (int)
input of x
lsbOut (int)
output of f(x)

Conversions between number systems

Posit2PIF
Converts Posits to Posit Intermediate Format
Parameters:
width (int)
The input size
wES (int)
The exponent size
OutputIEEE
Conversion from FloPoCo to IEEE-754-like floating-point formats.
Parameters:
wEIn (int)
input exponent size in bits
wFIn (int)
input mantissa size in bits
wEOut (int)
output exponent size in bits
wFOut (int)
output mantissa size in bits
onlyPositiveZeroes (bool) (optional, default value is false)
when true, normalize +0 and -0 to +0
InputIEEE
Conversion from IEEE-754-like to FloPoCo floating-point formats. Subnormals are all flushed to zero at the moment.
Parameters:
wEIn (int)
input exponent size in bits
wFIn (int)
input mantissa size in bits
wEOut (int)
output exponent size in bits
wFOut (int)
output mantissa size in bits
Fix2FP
Conversion from FloPoCo floating-point to fixed-point.
Parameters:
signed (bool) (optional, default value is true)
can be false if all numbers will be positive
MSB (int)
weight of the MSB of the output
LSB (int)
weight of LSB of the input
wE (int)
output exponent size in bits
wF (int)
output mantissa size in bits
PIF2Posit
Converts Posit Intermediate Format to Posits
Parameters:
width (int)
The size of the posit
wES (int)
The exponent size (for the posit)
FP2Fix
Conversion from FloPoCo floating-point to fixed-point.
Parameters:
wE (int)
input exponent size in bits
wF (int)
input mantissa size in bits
signed (bool) (optional, default value is true)
can be false if all numbers will be positive
MSB (int)
weight of the MSB of the output
LSB (int)
weight of LSB of the output
trunc (bool) (optional, default value is true)
true means truncated (cheaper), false means rounded
PIF2Fix
Converts Posit Intermediate Format to the FixPoint format used in the exponential
Parameters:
width (int)
The size of the posit
wES (int)
The exponent size (for the posit)
Posit2Posit
This should do nothing
Parameters:
width (int)
The size of the posit
wES (int)
The width of the exponent
Posit2FP
Convert Posit to floating point
Parameters:
width (int)
total size of the encoding
es (int)
exponent field length

Filters and FFTs

FixRootRaisedCosine
A generator of fixed-point Root-Raised Cosine filters, for inputs between -1 and 1
Parameters:
alpha (real)
roll-off factor, between 0 and 1
lsbIn (int)
position of the LSB of the input, e.g. -15 for a 16-bit signed input
lsbOut (int)
position of the LSB of the output
n (int)
filter order (number of taps will be 2n+1)
FixHalfSine
A generator of fixed-point Half-Sine filters, for inputs between -1 and 1
Parameters:
lsbIn (int)
position of the LSB of the input, e.g. -15 for a 16-bit signed input
lsbOut (int)
position of the LSB of the output
n (int)
filter order (number of taps will be 2n)
For more details, see this article.
FixFIR
A fix-point Finite Impulse Filter generator.
Parameters:
lsbIn (int)
integer size in bits
lsbOut (int)
integer size in bits
symmetry (int) (optional, default value is 0)
0 for normal filter, 1 for symmetric, -1 for antisymmetric. If not 0, only the first half of the coeff list is used.
rescale (bool) (optional, default value is false)
If true, divides all coefficients by 1/sum(|coeff|)
coeff (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeff="1.234567890123:sin(3*pi/8)"
For more details, see this article.
FixSOPCfull
A fix-point Sum of Product by Constants (detailed interface).
Parameters:
msbIn (string)
colon-separated string of ints, input's last significant bit
lsbIn (string)
colon-separated string of ints, input's last significant bit
msbOut (int)
output's most significant bit
lsbOut (int)
output's last significant bit
coeff (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeff="1.234567890123:sin(3*pi/8)"
FixIIR
A fix-point Infinite Impulse Response filter generator.
Parameters:
lsbIn (int)
input least significant bit
lsbOut (int)
output least significant bit
H (real) (optional, default value is 0)
worst-case peak gain. if 0, it will be computed by the WCPG library
Heps (real) (optional, default value is 0)
worst-case peak gain of the feedback loop. if 0, it will be computed by the WCPG library
coeffa (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeffa="1.234567890123:sin(3*pi/8)"
coeffb (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeffb="1.234567890123:sin(3*pi/8)"
buildWorstCaseTestBench (bool) (optional, default value is false)
if true, the TestBench for this IIR will begin with a stimulation by the worst-case input signal
FixIIRShiftAdd
An Infinite Impulse Response filter generator using IntConstMultShiftAdd (optional).
Parameters:
msbIn (int)
input most significant bit
lsbIn (int)
input least significant bit
lsbOut (int)
output least significant bit
H (real) (optional, default value is 0)
worst-case peak gain. if 0, it will be computed by the WCPG library
Heps (real) (optional, default value is 0)
worst-case peak gain of the feedback loop. if 0, it will be computed by the WCPG library
guardbits (int) (optional, default value is -1)
number of guard bits for computation in recursive feedback path (-1: automatic)
coeffa (string) (optional, default value is -1)
colon-separated list of real coefficients using Sollya syntax. Example: coeffa="1.234567890123:sin(3*pi/8)"
coeffb (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeffb="1.234567890123:sin(3*pi/8)"
shifta (int) (optional, default value is -1)
Num of rightshifts for coeffa (must be positive)
shiftb (int)
Num of rightshifts for coeffb (must be positive)
method (string) (optional, default value is plain)
plain or multiplierless
grapha (string) (optional, default value is emptya)
graph in rpag format for coeffa
graphb (string) (optional, default value is emptyb)
graph in rpag format for coeffb
FixSOPC
A fix-point Sum of Product by Constants.
Parameters:
lsbIn (int)
input's last significant bit
lsbOut (int)
output's last significant bit
coeff (string)
colon-separated list of real coefficients using Sollya syntax. Example: coeff="1.234567890123:sin(3*pi/8)"

Test Benches

TestBench
Behavorial test bench for the preceding operator.
Parameters:
n (int) (optional, default value is -2)
number of random tests. If n=-2, an exhaustive test is generated (use only for small operators)
file (bool) (optional, default value is true)
Inputs and outputs are stored in file test.input (lower VHDL compilation time). If false, they are stored in the VHDL
Wrapper
Wraps the preceding operator between registers (for frequency testing).
Parameters:

AutoTest

AutoTest
A tester for operators.
Parameters:
Operator (string)
name of the operator to test, All if we need to test all the operators
Dependences (bool) (optional, default value is false)
test the operator's dependences

Highly target optimized primitive operators

XilinxTernaryAddSub
A ternary adder subtractor build of xilinx primitives.
Parameters:
wIn (int)
The wordsize of the adder
AddSubBitMask (int) (optional, default value is 0)
First bitmask for input negation
AddSubBitMask2 (int) (optional, default value is -1)
Second bitmask for configurable input negation
Xilinx_LUT5
Provides variants of Xilinx LUT5 primitives.
Parameters:
variant (string)
The LUT variant (LUT5, LUT5_L, etc.)
init (string)
The LUT content
XilinxAddSub
An adder/subtractor build of xilinx primitives.
Parameters:
wIn (int)
The wordsize of the adder
mode (int) (optional, default value is 0)
Bitmask for input negation, removes configurability
dss (bool) (optional, default value is false)
Creates configurable adder with possibility to substract both inputs at same time
XilinxLOOKAHEAD8
Provides the Xilinx LOOKAHEAD8 primitive introduced by Versal.
Parameters:
lookb (string) (optional, default value is FALSE)
lookahead generic "bool" param (Values: "TRUE" | "FALSE")
lookd (string) (optional, default value is FALSE)
lookahead generic "bool" param (Values: "TRUE" | "FALSE")
lookf (string) (optional, default value is FALSE)
lookahead generic "bool" param (Values: "TRUE" | "FALSE")
lookh (string) (optional, default value is FALSE)
lookahead generic "bool" param (Values: "TRUE" | "FALSE")
XilinxFourToTwoCompressor
An efficient 4:2 compressor build of xilinx primitives.
Parameters:
wOut (int)
The wordsize of the 4:2 compressor
useLastColumn (bool) (optional, default value is 0)
if the 4:2 compressor should additonally compress two bits in the last column, this should be set to true
XilinxComparator
A comparator build of xilinx primitives.
Parameters:
wIn (int)
Wordsize of comparator inputs
type (string)
Type of comparator ( gt,ge,lt,le,eq,ne )
Nope.
RowAdder
Row adder for cormpression.
Parameters:
wIn (int)
input width of the row adder
XilinxGPC
Implements Xilinx optimized GPCs Available GPC sizes are: (6,0,6;5), (6,0,7;5), (6,1,5;5), (6,2,3;5) (1,3,2,5;5), (1,4,1,5;5), (1,4,0,6;5), (1,4,0,7;5), (2,1,1,7;5)
Parameters:
columnHeights (string)
comma separated list of heights for the columns of the compressor, in decreasing order of the weight. For example, columnHeights="6,0,6" produces a (6,0,6:5) GPC
XilinxCARRY4
Provides the Xilinx CARRY4 primitive.
Parameters:
XilinxLUT
Provides variants of Xilinx LUT primitives.
Parameters:
variant (string)
The LUT variant (LUT6, LUT6_2, etc.)
init (string)
The LUT content

Miscellaneous

TargetModel
A dummy operator useful when designing a new Target
Parameters:
type (int) (optional, default value is 0)
when 0, build an adder of size 32
This operator is for FloPoCo developers only.
Synthesize this operator, then look at its critical path.
Also see Target.hpp.
TutorialOperator
An heavily commented example operator to start with FloPoCo.
Parameters:
param0 (int) (optional, default value is 16)
A first parameter, here used as the input size
param1 (int)
A second parameter, here used as the output size
Feel free to experiment with its code, it will not break anything in FloPoCo.
Also see the developper manual in the doc/ directory of FloPoCo.
SRTDivNbBitsMin
A SRT design tool
Parameters:
radix (int)
It has to be 2^n
alpha (int)
digit set is [-alpha, alpha]