DSPRelated.com
Forums

Simulink: S functions

Started by Unknown May 2, 2005
People,

I am developing a C-MEX file (S-function) for implementing fixed point
filters and testing the same using Simulink. I have 16 bit signed data
in 1.15 format.

I wanted to know what data format I should use (sfrac(16)/sfix(16)).
Also how does one account for scaling and overflow? If you use
Simulink's filter blocks, this is taken care of internally and what I
think it does is to increase the width of the data type. Now this is
not what I want. So any guidelines on this? What would be best would be
some sample code, so I can go ahead and tweak it to see how things
work. 

Any inputs will be greatly appreciated.

T.

I have resolved this issue. If anyone has a similar issue on fixed
point programming in S-functions, feel free to contact me. 

T.