Operator CASE

Operator Library: Logic

The CASE operator multiplexes multiple input links of identical formats. The number of input links has to be selected at the instantiation of the module and determines the bit width of the input link "Switch". The value at input link Switch decides which input link is selected and forwarded to the output. When the Switch input selects a non-existent input link, the output of the operator becomes zero. The operator can be used with kernels. Each kernel component is selected independently.

I/O Properties

Property Value
Operator Type O
Input Links I0, data input
I1..In-1, data input
Switch, data input
Output Link O, data output

Supported Link Format

Link Parameter Input Link I0 Input Link I1..In-1 Input Link Switch Output Link O
Bit Width [1, 64]1 as I0 auto2 as I0
Arithmetic {unsigned, signed} as I0 unsigned as I0
Parallelism any as I0 as I0 as I0
Kernel Columns any as I0 as I0 as I0
Kernel Rows any as I0 as I0 as I0
Img Protocol {VALT_IMAGE2D, VALT_LINE1D, VALT_PIXEL0D, VALT_SIGNAL}3 as I0 as I0 as I0
Color Format any as I0 VAF_GRAY as I0
Color Flavor any as I0 FL_NONE as I0
Max. Img Width any as I0 as I0 as I0
Max. Img Height any as I0 as I0 as I0

1

The range of the input bit width is [1, 64] for unsigned values. For signed inputs, the range is [2, 64]. For unsigned color inputs, the range is [3, 63] and for signed color, the range is [6, 63].

3

If image protocol VALT_SIGNAL is used, only 2 inputs can be addressed and used.

2

The bit width of the switch input is automatically determined from the number if input links n

Parameters

None

Examples of Use

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