Download Fixed-Point Blockset User`s Guide

Transcript
FixPt Gateway In
information so that the necessary shifts are performed for the summation
operation.
/* Fixed-Point Sum Block: <Root>/FixPt Sum
*
* y = u0 + u1
*
* Input0 Data Type: Fixed Point
S16
* Input1 Data Type: Fixed Point
S16
* Output0 Data Type: Fixed Point
S16
*
* Round Mode: Floor
* Saturation Mode: Wrap
*
*/
sum = ((in1) << 3);
sum += ((in2) << 1);
Characteristics
2^-2
2^-4
2^-5
Input Port
Any built-in Simulink data type
Output Port
Any data type supported by the blockset
Direct Feedthrough
Yes
Sample Time
Inherited
Scalar Expansion
No
States
0
Vectorized
Yes
9-55