Engee documentation

Bit Slice

Returns the serial bit field from the input signal.

bit slice

Description

The Bit Slice block returns a field of consecutive bits from the input signal. Specify the lower and upper bounds of the bit field using zero-base indexing in the LSB Position and MSB Position parameters. For the input word size , the values of LSB Position and MSB Position must meet the following constraints:

.

Ports

Input

Port_1 - input signal
scalar | vector | matrix

Input signal for which bit sectionalisation is performed. The input signal has a maximum bit width of 128.

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

*Support for complex numbers: Yes

Output

Port_1 - output signal
scalar | vector | matrix

Output signal for which bit sectionalisation is performed. The word length of the output signal is calculated as

,

where and are the values of MSB Position and LSB Position parameters respectively.

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

*Support for complex numbers: Yes

Parameters

MSB Position - position of the high bit
7 (By default)

Specifies the position (counting from zero) of the most significant bit (MSB) of the field to be extracted.

For an input word size of , the values of LSB Position and MSB Position must meet the following constraints:

.

Usage in program code

Block parameter

lidx

Values

scalar

By default

7

LSB Position - position of the least significant bit
0 (By default)

Specifies the position (counting from zero) of the least significant bit (LSB) of the field to be extracted.

For an input word size of , the values of LSB Position and MSB Position must meet the following constraints:

.

Usage in program code

Block parameter

ridx

Values

scalar

By default

0

Additional options

C code generation: Yes