Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Bit Slice

Return field of consecutive bits from input signal

Library

HDL Coder / HDL Operations

Description

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.

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.

Ports

The block has the following ports:

Input
  • Supported data types: Fixed-point, integer (signed or unsigned), Boolean

  • Maximum bit width: 128

Output

Supported data types: unsigned fixed-point or unsigned integer.

Introduced in R2014a

Was this topic helpful?