m一个in Content

位到整数转换器

位的地图向量到整数的相应向量

  • 图书馆:
  • 通信工具箱 /实用程序块

  • 位到整数转换器块

描述

位到整数转换器block maps groups of bits in the input vector to integers in the output vector.

如果mis specified by theNumber of bits per integer(M)范围:

  • 对于未签名的整数,块地图每组m范围内整数的位[0,(2m- 1)]。结果,输出向量长度为​​1/m次输入矢量长度。

  • 对于签名的整数,块地图每组m范围内整数的位m-1),(2m- 1- 1)]。

端口

在put

展开全部

输入信号,指定为位置的标量或列向量,其长度是在该值中指定的值的倍数Number of bits per integer(M)范围。这input must be bits with values of 0 or 1.

数据类型:双倍的

输出

展开全部

输出信号,作为整数的整数或列向量返回。这钻头填料后,将结果的整数值视为参数指定输入位是未签名还是签名的。

  • 当输入位被视为未签名时,每个整数输出在范围内[0,(2m- 1)]。

  • 当将输入位视为签名时,每个整数输出在范围内[(–2m-1),(2m- 1- 1)]。

参数

展开全部

输入位的数量映射到输出中的每个整数,在范围内指定为整数[1,32]。

输入位顺序,指定为'MSB first'or'LSB首先

  • 'MSB first'- 输入信号的第一位是最重要的位(MSB)。

  • 'LSB首先- 输入信号的第一位是最小显着的位(LSB)。

指定所得整数值是在填料后将所得整数值视为签名还是未签名。此参数设置确定哪个输出数据类型选择可用。

输出数据类型选项根据输出的所需签名而更改。

如果输出整数为,您可以从以下选择中选择输出数据类型选项:

  • 通过内部规则继承

  • 最小的整数

  • 双倍的

  • 单身的

  • int8

  • int16

  • INT32

如果输出整数为Unsigned,您还可以从以下选项中选择选项:

  • 与输入相同

  • UINT8

  • UINT16

  • UINT32

当您将参数设置为通过内部规则继承, the block determines the output data type based on the input data type.

  • 如果输入信号为浮点(要么双倍的or单身的), the output data type is the same as the input data type.

  • 如果输入数据类型不是浮点数最小的整数

当您将参数设置为最小的整数, the block selects the output data type based on the settings used in the硬件实施窗格(万博1manbetxSimulink)of the Configuration Parameters dialog box.

  • 如果您选择ASIC/FPGA对于设备供应商,根据设置,输出数据类型是最小的理想整数或定点数据类型Number of bits per integer(M)范围。

  • 对于所有其他设备供应商选择,输出数据类型是最小的(签名或未签名)整数长度长度,足够大,可以适合理想的最小位尺寸。

Block Characteristics

数据类型

布尔|双倍的|fixed point[[一个这是给予的[[b这是给予的|integer|单身的

多维信号

no

可变大小信号

是的

[[一个这是给予的Fixed-point inputs must be ufix(1).

[[b这是给予的ufix (N)或sfix (N)当选择ASIC / FPGA在the Hardware Implementation Pane and output data-type is set to either (a) Smallest integer or, (b) Inherit via internal rule and at the same time input is non floating-point.

扩展功能

C/C ++代码生成
使用Simulink®Coder™生成C和C ++代码。万博1manbetx

也可以看看

功能

在troduced before R2006a