Table Of Contents

MT UnPack Bits (G Dataflow)

Version:
    Last Modified: February 7, 2018

    Unpacks data to an unsigned or signed integer array.

    This node unpacks MN-sized binary data of the form b i = {0,1}, to an unsigned or signed integer array a_n,

    where;

    i = 0…MN-1, and M denotes the number of bits per integer.

    n = 0…N-1, and N denotes the size of the array.

    connector_pane_image
    datatype_icon

    input integers

    The signed or unsigned integer data a n , n = 0…N-1, to be converted into binary data.

    Default: empty

    datatype_icon

    bits per integer

    Number of binary data values that are packed into an integer.

    If you set the integer format parameter to Unsigned, the maximum value is 31. If you set the integer format parameter to Signed, the maximum value is 32.

    Default: 1

    datatype_icon

    packed bit order

    The order in which the binary data stream is packed into integers.

    Name Description
    MSB first

    Data is packed with the most significant bit (MSB) first.

    LSB first

    Data is packed with the least significant bit (LSB) first.

    Default: MSB first

    datatype_icon

    integer format

    Input integer format.

    Name Description
    Unsigned

    The entire number is packed as a positive integer.

    Signed

    The most significant bit (MSB) determines the sign of the input integer.

    Default: Unsigned

    datatype_icon

    error in

    Error conditions that occur before this node runs.

    The node responds to this input according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Default: No error

    datatype_icon

    output bit stream

    The output binary data stream b i = {0,1}, i = 0…MN-1, that corresponds to the packed representation of the input binary data.

    Where,

    i = 0…MN-1, and M denotes the number of bits per integer.

    n = 0…N-1, and N denotes the size of the array.

    datatype_icon

    error out

    Error information.

    The node produces this output according to standard error behavior.

    Standard Error Behavior

    Many nodes provide an error in input and an error out output so that the node can respond to and communicate errors that occur while code is running. The value of error in specifies whether an error occurred before the node runs. Most nodes respond to values of error in in a standard, predictable way.

    error in does not contain an error error in contains an error
    If no error occurred before the node runs, the node begins execution normally.

    If no error occurs while the node runs, it returns no error. If an error does occur while the node runs, it returns that error information as error out.

    If an error occurred before the node runs, the node does not execute. Instead, it returns the error in value as error out.

    Relationship between Input Integers and Output Bit Stream

    The relationship between the input integers and the output bit stream is given by the following equations:

    b i×M+j = (a i »(M-1-j)) &1, j = 0…M-1, i = 0…N - 1 (packed bit order set to MSB first)

    b i×M+j = (a i »j) &1, j = 0…M - 1, i = 0…N - 1 (packed bit order set to LSB first)

    Where » denotes the operation of right shifting, and the operator & stands for the logical AND operation.

    For example, assume the input integers array is the element [4], the bits per integer value is specified as 3, and integer format is set to Unsigned. If packed bit order is set to MSB first, the output bit stream is [1 0 0]. If the packed bit order is set to LSB first, the output bit stream is [0 0 1]. The signed negative numbers are stored as the 2's complement. Thus, if integer format is set to Signed and the bits per integer is set to 3, the input integer array is the element [-3], and the packed bit order is set to MSB First the output bit stream is [1 0 1].

    Where This Node Can Run:

    Desktop OS: Windows

    FPGA: Not supported

    Web Server: Not supported in VIs that run in a web application


    Recently Viewed Topics