Operator SUB

Operator Library: Arithmetics

Operator SUB calculates the difference between input link I1 and input link I2 i.e. O = I1 - I2

I/O Properties

Property Value
Operator Type O
Input Links I1, data input
I2, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I1 Input Link I2 Output Link O
Bit Width [1, 62] unsigned, [2, 62] signed [1, 62] unsigned, [2, 62] signed auto1
Arithmetic {unsigned, signed} {unsigned, signed} signed
Parallelism any any as I1
Kernel Columns any any as I1
Kernel Rows any any as I1
Color Format VAF_GRAY VAF_GRAY as I1
Color Flavor FL_NONE FL_NONE as I1
Max. Img Width any any as I1
Max. Img Height any any as I1


The output bit width is automatically determined from the input link bit widths. The output bit width is determined by


Type static write parameter
Default AUTO
Range (AUTO, EmbeddedALU, LUT)

Parameter ImplementationType influences the implementation strategy of the operator, i.e., which logic elements are used for implementing the operator.

You can select one of the following values:

AUTO: When the operator is instantiated, the optimal implementation strategy is selected automatically based on the parametrization of the connected links.

EmbeddedALU: The operator uses embedded arithmetic logic elements of the FPGA that are not LUT based.

LUT: The operator uses the LUT logic of the FPGA.

[Note] Use AUTO in General

Normally, the parameter should be set to AUTO. In special cases, i.e., if one kind of FPGA ressource runs short in a design, you can manually influence the FPGA resource management using the values EmbeddedALU and/or LUT.

Examples of Use

The use of operator SUB is shown in the following examples: