Operator list for FloPoCo version 4.1.2
Shifters, Leading Zero Counters, etc
 Shifter
 A classical barrel shifter. The output size is computed.
 Parameters:

wIn
(int
)  input size in bits

maxShift
(int
)  maximum shift distance in bits

dir
(bool
)  0=left, 1=right
 LZOC
 A leading zero/one counter. One input specifies if 0s or 1s should be counted. The output size is computed.
 Parameters:

wIn
(int
)  input size in bits
 LZOCShifterSticky
 A combined leading zero/one counter and shifter, useful for floatingpoint normalization.
 Parameters:

wIn
(int
)  input size in bits

wOut
(int
)  output size in bits

wCount
(int
)  size in bits of the count output

computeSticky
(bool
) (optional, default value is false)  if false the shiftedout bits are discarded, if true they are ORed into a sticky bit which is output

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)
 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
 IntComparator
 An integer comparator.
 Parameters:

wIn
(int
)  input size in bits

criteria
(int
)  2=lesser than, 1=lesser or equal, 0=equal, 1=greater or equal, 2=greater

constant
(bool
)

constValue
(int
)  the value to compare to
 IntDualSub
 Pipelined dual adder/subtractor
 Parameters:

wIn
(int
)  input size in bits

opType
(int
)  1=compute XY and X+Y, 2=compute XY and YX
 IntMultiplier
 A pipelined integer multiplier.
 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

superTile
(bool
) (optional, default value is false)  if true, attempts to use the DSP adders to chain submultipliers. This may entail lower logic consumption, but higher latency.
 IntSquarer
 A pipelined integer squarer.
 Parameters:

wIn
(int
)  size of input in bits
Basic floatingpoint Operators
 FPAdd
 A correctly rounded floatingpoint adder.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits

sub
(bool
) (optional, default value is false)  implement a floatingpoint subtractor instead of an adder

dualPath
(bool
) (optional, default value is false)  use a dualpath algorithm, more expensive but shorter latency
 Singlepath is lower hardware, longer latency than dualpath.
The difference between singlepath and dualpath is well explained in textbooks such as Ercegovac and Lang's Digital Arithmetic, or Muller et al's Handbook of floatingpoint arithmetic.
 FPAddSub
 A fused floatingpoint adder and subtracter, computes both a+b and ab.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
 FPAddDualPath
 Floatingpoint adder with dualpath architecture. Trades a larger circuit size for a smaller latency.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
 FPAdd3Input
 A 3operand floatingpoint adder.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
 FPAddSinglePath
 A floatingpoint adder with a new, more compact singlepath architecture.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
 FPAddSinglePathIEEE
 A floatingpoint adder with a new, more compact singlepath architecture.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
 FPMult
 A floatingpoint multiplier. The actual FloPoCo component supports different input and output sizes, but this is not available from the command line.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  input's mantissa size in bits

wFout
(int
) (optional, default value is 0)  output's mantissa size in bits (if 0 or ommitted, will be equal to wFIn)
 FPSquare
 A floatingpoint squarer, using IntSquarer for the mantissa.
 Parameters:

wE
(int
)  exponent size in bits

wF_in
(int
)  input's mantissa size in bits

wF_out
(int
)  output's mantissa size in bits
 FPDiv
 A correctly rounded floatingpoint division.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits

radix
(int
) (optional, default value is 0)  Can be 0, 4 or 8. Default 0 means: let FloPoCo choose between 4 and 8. In your context, the other choice may have a better area/speed tradeoffs
 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 splitdigits in [10,10], and a bit of prescaling.
 FPSqrt
 A correctly rounded floatingpoint square root function.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits
Multipliers and dividers by constants
 IntConstMult
 Integer multiplier by a constant using a shiftandadd 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.
 FPConstMult
 Floatingpoint constant multiplier using the shiftandadd approach.
 Parameters:

wE_in
(int
)  input exponent width

wF_in
(int
)  input significand part width

wE_out
(int
)  output exponent width

wF_out
(int
)  output significand width

constant
(string
)  constant in sollya formalism (e.g. "cos(3*pi/2)" or "13176795b22")

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.
 FPConstMultRational
 Correctly rounded floatingpoint multiplier by a rational constant.
 Parameters:

wE_in
(int
)  input exponent width

wF_in
(int
)  input significand part width

wE_out
(int
)  output exponent width

wF_out
(int
)  output significand width

a
(int
)  numerator

b
(int
)  denominator
 The technique used is described in this article.
 FPRealKCM
 Table based real multiplier for floating points input.
 Parameters:

wE
(int
)  exponent width

wF
(int
)  significand width

constant
(string
)  constant given in arbitraryprecision decimal, or as a Sollya expression, e.g "log(2)"
 KCM is a tablebased method well suited to LUTbased FPGAs. It is due to Ken Chapman who published it in 1994.
 IntConstDiv
 Integer divider by a small constant.
 Parameters:

wIn
(int
)  input size in bits

d
(int
)  small integer to divide by

arch
(int
) (optional, default value is 0)  architecture used  0 for lineartime, 1 for logtime

remainderOnly
(bool
) (optional, default value is false)  if true, the architecture doesn't output the quotient

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.
 FPConstDiv
 Correctly rounded floatingpoint divider by a small constant.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits

d
(int
)  small integer to divide by

dExp
(int
) (optional, default value is 0)  binary exponent of d (the operator will divide by d.2^dExp)

alpha
(int
) (optional, default value is 1)  Algorithm uses radix 2^alpha. 1 choses a sensible default.
 Correct rounding to the nearest (if you want other rounding modes contact us). This operator is described in this article.
 FixRealKCM
 Table based real multiplier. Output size is computed
 Parameters:

signedInput
(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 arbitraryprecision 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
 Tablebased 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)"
Composite floatingpoint operators
 FPLargeAcc
 Accumulator of floatingpoint numbers into a large fixedpoint accumulator. CURRENTLY BROKEN, contact us if you want to use it
 Parameters:

wEX
(int
)  the width of the exponent

wFX
(int
)  the width of the fractional part

MaxMSBX
(int
)  the weight of the MSB of the expected exponent of X

MSBA
(int
)  the weight of the least significand bit of the accumulator

LSBA
(int
)  the weight of the most significand bit of the accumulator
 Kulischlike accumulator of floatingpoint numbers into a large fixedpoint accumulator. By tuning the MaxMSB_in, LSB_acc and MSB_acc parameters to a given application, rounding error may be reduced to a provably arbitrarily low level, at a very small hardware cost compared to using a floatingpoint adder for accumulation.
For details on the technique used and an example of application, see this article
 LargeAccToFP
 Postnormalisation unit for FPLargeAcc.
 Parameters:

wE_out
(int
)  the width of the output exponent

wF_out
(int
)  the width of the output fractional part

MSBA
(int
)  the weight of the most significand bit of the accumulator

LSBA
(int
)  the weight of the least significand bit of the accumulator
 Converts the (fixedpoint) output of FPLargeAcc or FPDotProduct (with the same parameters) into a floatingpoint number.
For details on the technique used and an example of application, see this article
 FPDotProduct
 Floatingpoint dot product unit based on FPLargeAcc
 Parameters:

wE
(int
)  the width of the exponent for the inputs X and Y

wFX
(int
)  the width of the fraction for the input X

wFY
(int
)  the width of the fraction for the input Y

MaxMSBX
(int
)  maximum expected weight of the MSB of the summand

MSBA
(int
)  The weight of the LSB of the accumulator determines the final accuracy of the result

LSBA
(int
)  The weight of the MSB of the accumulator has to greater than that of the maximal expected result
 Kulischlike dot product operator. It feeds a long accumulator with the unrounded result of a floatingpoint multiplier, thus removing rounding errors from the multiplication as well.
Composite fixedpoint operators
Elementary functions in fixed or floatingPoint
 FPExp
 A faithful floatingpoint 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
 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
 Floatingpoint logarithm using an iterative method.
 Parameters:

wE
(int
)  exponent size in bits

wF
(int
)  mantissa size in bits

inTableSize
(int
) (optional, default value is 0)  The input size to the tables, 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 floatingpoint power function.
 Parameters:

wE
(int
)  exponent size in bits for both inputs

wF
(int
)  mantissa size in bits for both inputs

logSizeTable
(int
) (optional, default value is 0)  The table size input for the log in bits

type
(int
) (optional, default value is 0)  type of power function (0 pow  1 powr. See IEEE7542008)

expTableSize
(int
) (optional, default value is 0)  The table size input for the exponent in bit

expDegree
(int
) (optional, default value is 0)
 For all the details, see this article
 FixSinCos
 Computes (12^(w)) sin(pi*x) and (12^(w)) cos(pi*x) for x in [1,1[, using tables and multipliers.
 Parameters:

lsb
(int
)  weight of the LSB of the input and outputs
 For a fixedpoint 2's complement input x in [1,1[, calculates (12^(lsbIn))*{sin,cos}(pi*x) using a table and multiplierbased technique.
For more details, see this article.
 CordicSinCos
 Computes (12^(w)) sin(pi*x) and (12^(w)) cos(pi*x) for x in [1,1[, using CORDIC algorithm
 Parameters:

lsb
(int
)  weight of the LSB of the input and outputs

reducedIterations
(int
) (optional, default value is 0)  If 1, number of iterations will be reduced at the cost of two multiplications.
 This is a classical CORDIC, implemented the FloPoCo way: it is lastbit accurate, hopefully at the minimum cost.
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.
Arbitrary function approximators
 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 doublequotes, for instance "exp(x*x)"

signedIn
(bool
)  true if the function input is [1,1), false if it is [0,1)

lsbIn
(int
)  weight of input LSB, for instance 8 for an 8bit input

msbOut
(int
)  weight of output MSB

lsbOut
(int
)  weight of output LSB
 This operator uses a table to store function values.
 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 doublequotes, for instance "exp(x*x)"

lsbIn
(int
)  weight of input LSB, for instance 8 for an 8bit input

msbOut
(int
)  weight of output MSB

lsbOut
(int
)  weight of output LSB

signedIn
(bool
) (optional, default value is true)  defines the input range : [0,1) if false, and [1,1) otherwise
 This operator uses a table for coefficients, and Horner evaluation with truncated multipliers sized just right.
For more details, see this article.
 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 doublequotes, for instance "exp(x*x)"

lsbIn
(int
)  weight of input LSB, for instance 8 for an 8bit input

msbOut
(int
)  weight of output MSB

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.
 FixFunctionByMultipartiteTable
 A function evaluator using the multipartite method.
 Parameters:

f
(string
)  function to be evaluated between doublequotes, for instance "exp(x*x)"

nbTables
(int
)  the number of tables used to decompose the function, between 2 (bipartite) to 4 or 5 for large input sizes

lsbIn
(int
)  weight of input LSB, for instance 8 for an 8bit input

msbOut
(int
)  weight of output MSB

lsbOut
(int
)  weight of output LSB

signedIn
(bool
) (optional, default value is false)  defines the input range : [0,1) if false, and [1,1) otherwise
 This operator uses the multipartite table method as introduced in this article, with the improvement described in this article.
 BasicPolyApprox
 Helper/Debug feature, does not generate VHDL. Polynomial approximation of function f, accurate to targetAcc on [0,1)
 Parameters:

f
(string
)  function to be evaluated between doublequotes, for instance "exp(x*x)"

targetAcc
(real
)  the target approximation errror of the polynomial WRT the function

signedIn
(bool
) (optional, default value is true)  defines the input range : [0,1) if false, and [1,1) otherwise

g
(int
) (optional, default value is 1)  the number of guardbits added. Using 1 gives sensible default
 PiecewisePolyApprox
 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 doublequotes, for instance "exp(x*x)"

targetAcc
(real
)  the target approximation errror of the polynomial WRT the function

d
(int
)  the degree to use
Conversions between number systems
 Fix2FP
 Conversion from FloPoCo floatingpoint to fixedpoint.
 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
 FP2Fix
 Conversion from FloPoCo floatingpoint to fixedpoint.
 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
 InputIEEE
 Conversion from IEEE754like to FloPoCo floatingpoint 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
 OutputIEEE
 Conversion from FloPoCo to IEEE754like floatingpoint 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
Filters and FFTs
 FixFIR
 A fixpoint Finite Impulse Filter generator.
 Parameters:

lsbIn
(int
)  integer size in bits

lsbOut
(int
)  integer size in bits

isSymmetric
(bool
) (optional, default value is false)  If true, if true, will use half the number of multipliers

rescale
(bool
) (optional, default value is false)  If true, divides all coefficient by 1/sum(coeff)

coeff
(string
)  colonseparated list of real coefficients using Sollya syntax. Example: coeff="1.234567890123:sin(3*pi/8)"
 For more details, see this article.
 FixSOPC
 A fixpoint Sum of Product by Constants.
 Parameters:

lsbIn
(int
)  input's last significant bit

lsbOut
(int
)  output's last significant bit

coeff
(string
)  colonseparated list of real coefficients using Sollya syntax. Example: coeff="1.234567890123:sin(3*pi/8)"
 FixIIR
 A fixpoint Infinite Impulse Response filter generator.
 Parameters:

lsbIn
(int
)  input most significant bit

lsbOut
(int
)  output least significant bit

H
(real
) (optional, default value is 0)  worstcase peak gain. if 0, it will be computed by the WCPG library

Heps
(real
) (optional, default value is 0)  worstcase peak gain of the feedback loop. if 0, it will be computed by the WCPG library

coeffa
(string
)  colonseparated list of real coefficients using Sollya syntax. Example: coeffa="1.234567890123:sin(3*pi/8)"

coeffb
(string
)  colonseparated list of real coefficients using Sollya syntax. Example: coeffb="1.234567890123:sin(3*pi/8)"
 FixSIF
 A fixpoint SIF implementation.
 Parameters:

paramFileName
(string
)  the name of the file containing the parameters for the SIF

testsFileName
(string
) (optional, default value is "")  the name of the file containing the tests for the SIF
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
Miscellaneous
 NbBitsMin
 A tool for FPDiv to compute where to truncate both partial remainder and divider.
 Parameters:

radix
(int
)  It has to be 2^n

digitSet
(int
)  the range you allow for each digit [digitSet, digitSet]
 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.
 UserDefinedOperator
 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.