Fixed-Point Blockset    
Gateway Out

Convert a Fixed-Point Blockset data type to a Simulink data type

Library

Data Type

Description

The Gateway Out block is a masked S-function that converts any data type supported by the Fixed-Point Blockset to a Simulink data type.

The Output and Input to have equal parameter list controls how the output is treated. The possible values are Real World Value and Stored Integer. In terms of the general encoding scheme described in Scaling, Real World Value treats the output as V = SQ + B where S is the slope and B is the bias. Stored Integer treats the output as a stored integer, Q. Selecting Stored Integer may be useful in these circumstances:

For more information about this parameter list, refer to the Gateway In block description.

The Output data type parameter list specifies the Simulink data type to use for the output. All built-in data types are supported as well as the boolean data type. auto indicates the Fixed-Point Blockset data type is converted to whatever data type Simulink back propagates.

Remarks

The MATLAB built-in integer data types are limited to 32 bits. If you want to output fixed-point numbers that range between 33 and 53 bits without loss of precision or range, you should use the Gateway Out block to store the value inside a double.

If you want to output fixed-point numbers with more than 53 bits without loss of precision or range, then you must break the number into pieces using the Gain block, and then output the pieces using the Gateway Out block.

For example, suppose the original signal is an unsigned 128-bit value with default scaling. You can break this signal into four pieces using four parallel Gain blocks configured with the gain and output settings shown below.

Piece
Gain
Output Data Type
1
2^0
uint(32) - Least significant 32 bits
2
2^-32
uint(32)
3
2^-64
uint(32)
4
2^-96
uint(32) - Most significant 32 bits

For each Gain block, you must also configure the Round toward parameter to Floor, and the Saturate to max or min when overflows occur check box must be unselected.

Parameters and Dialog Box

Output and Input to have equal
Specify the type of value the input and output are to have equal.
Output data type
Any built-in data type supported by Simulink.
Round toward
Rounding mode for fixed-point output.
Saturate to max or min when overflows occur
If selected, fixed-point overflows saturate.

Characteristics

Input Ports
Any data type supported by the blockset
Output Port
Any built-in Simulink data type
Direct Feedthrough
Yes
Scalar Expansion
N/A

See Also

Gateway In


  Gateway In Inherited Increment Real World