Engee documentation

Integer to Bit Converter

Maps a vector of integers to a vector of bits.

blockType: IntToBit

Path in the library:

/Communication Systems/Utility Blocks/Integer to Bit Converter

Description

Block Integer to Bit Converter maps each integer (or fixed-point value) in the input vector to a group of bits in the output vector.

Ports

Input

# IN_1 — Input signal
integer scalar | A vector is a column of integers

Details

The input signal is in the form of an integer or a column vector of length integers.

If M set by the parameter Number of bits per integer(M):

  • When for the parameter Number of bits per integer(M) the value is set Unsigned The input values must be integers in the range [0, (2M– 1)].

  • When for the parameter Number of bits per integer(M) the value is set Signed The input values must be integers in the range [(–2M-1 ), (2M-1 — 1)].

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Output

# OUT_1 — Output signal
bit scalar | A vector is a column of bits

Details

The output signal returned as a scalar or a column vector of bits of length .

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, UInt8, UInt16, UInt32, UInt64, Bool

Complex numbers support

Yes

Parameters

Parameters

# Number of bits per integer(M) — number of bits per integer (M)
Real number

Details

The number of input bits mapped to each integer in the input as an integer in the range of values [1, 64].

Default value

3

Program usage name

nBits

Tunable

No

Evaluatable

Yes

# Treat input values as — how to process input values
Unsigned | Signed

Details

Specify whether the input ranges of integer values should be treated as signed (Signed) or unsigned (Unsigned).

Values

Unsigned | Signed

Default value

Unsigned

Program usage name

signedinputValues

Tunable

No

Evaluatable

No

# Output bit order — the order of the output bits
MSB first | LSB first

Details

Determine if the first bit of the output is the highest bit (MSB first) or the low - order bit (LSB first).

Values

MSB first | LSB first

Default value

MSB first

Program usage name

bitOrder

Tunable

No

Evaluatable

No

# Output data type — type of output data
Inherit: auto | Smallest unsigned integer | Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Bool

Details

Specify the data type of the output bits.

Values

Inherit: auto | Smallest unsigned integer | Same as input | Float64 | Float32 | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Bool

Default value

Inherit: auto

Program usage name

outDtype

Tunable

No

Evaluatable

No

Additional options

C code generation: Yes