Engee documentation

Bit Slice

Returns a field of consecutive bits from the input signal.

blockType: Bit Slice

Path in the library:

/Basic/Logic and Bit Operations/Bit Slice

Description

Block Bit Slice 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 parameters LSB Position and MSB Position. For the input word size parameter values LSB Position and MSB Position must satisfy the following constraints:

,

where and parameter values MSB Position and LSB Position accordingly.

Ports

Input

# IN_1 — Input signal
scalar | vector | the matrix

Details

The input signal for which bit partitioning is performed. The input signal has a maximum bit width 128.

Data types

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

Complex numbers support

Yes

Output

# OUT_1 — Output signal
scalar | vector | the matrix

Details

The output signal for which bit partitioning was performed. The word length of the output signal is calculated as:

,

Where and parameter values MSB Position and LSB Position accordingly.

Data types

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

Complex numbers support

Yes

Parameters

Main

# MSB Position — the position of the highest bit
Integer

Details

Specifies the position (counted from zero) of the most significant bit (MSB) of the extraction field.

For the input word size , parameter values LSB Position and MSB Position must satisfy the following constraints:

.

Default value

7

Program usage name

lidx

Tunable

No

Evaluatable

Yes

# LSB Position — the position of the low-order bit
Integer

Details

Specifies the position (counted from zero) of the least significant bit (LSB) of the extraction field.

For the input word size , parameter values LSB Position and MSB Position must satisfy the following constraints:

.

Default value

0

Program usage name

ridx

Tunable

No

Evaluatable

Yes

Additional options

C code generation: Yes