Return field of consecutive bits from input signal
HDL Coder / Logic and Bit Operations
The Bit Slice block returns a field of consecutive bits from the input signal. Specify the lower and upper boundaries of the bit field by using zero-based indices in the LSB Position and MSB Position parameters.
MSB Position
Specifies the bit position (zero-based) of the most significant bit (MSB) of the field to extract. The default is 7.
For an input word size WS
, LSB Position and
MSB Position must satisfy the following constraints:
WS > MSB Position >= LSB Position >= 0;
The word length of the output is computed as (MSB Position - LSB Position) +
1
.
LSB Position
Specifies the bit position (zero-based) of the least significant bit (LSB) of the field to extract. The default is 0.
The block has the following ports:
Supported data types: Fixed-point, integer (signed or unsigned), Boolean
Maximum bit width: 128
Supported data types: unsigned fixed-point or unsigned integer.