Simulink simulation use 64 bits double for double data type. The C30 compiler default size for double is 32 bits (equivalent to simulink single variable). This option force the dsPIC/PIC24 C30 Compiler size for double diagram data type to 64 bits doubles. 64 bits double gives more precise results at the cost of a slower computation time and a larger code size.
You should considere using fixed point calculation that will speed up the calculation and reduced the code size ! The fixed point toolbox is perfect to optimized the scaling of your fixed point variables.
The Microchip name PIC, dsPIC, and MPLAB are
registered trademarks of Microchip Technology Inc.
MATLAB, Simulink, and Real-Time Workshop are
registered trademarks of The MathWorks, Inc.