Engee documentation

Mux

Combine input signals of the same data type into a vector.

mux

Description

The Mux block combines real or complex input data with the same type into a vector. You can use multiple Mux blocks to create a vector signal step by step, but the result will be the same as if you used a single block.

Ports

Input

Port_1 - input signal to be included in the output signal
scalar | vector

Input signal to be included in the output signal, scalar or vector.

The input signals for the Mux block can be any combination of scalars and vectors, but they must have the same data type and be real or complex.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Support for complex numbers: yes

Port_n - input signal to be included in the output signal
scalar | vector

Input signal to be included in the output signal, scalar or vector.

The input signals for the Mux block can be any combination of scalars and vectors, but they must have the same data type and be real or complex.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Support for complex numbers: yes

Output

Port_1 - output signal of Mux block
vector

Output signal of the Mux block composed of combined input signals; vector.

The order of the multiplexer output signal elements is determined by the order of the input signal ports.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point.

Support for complex numbers: yes

Parameters

Number of inputs - number of input signals
2 (by default) | scalar | vector

Number of input signals. Integer scalar, vector.

If the parameter is given by a scalar, it specifies the number of input ports. If the parameter is given by a vector, the number of inputs is equal to the length of the vector, and it is expected that the i-th input port will have a vector of length Inputs[i]. The elements of the vector must be positive integers or -1 (a vector of any length or a scalar is allowed on this input).

Usage in program code

Block parameter

Inputs

Values

scalar | vector

By default

2

Additional options

C code generation: Yes