API for User Written Fixed-Point and Floating-Point S-Functions.
A supplement to Release 13 of Simulink and Fixed-Point Blockset.
Version 0.9.0 Beta 1
January 8, 2003
Feedback on this beta should be sent to
The MathWorks, Inc.
3 Apple Hill
Natick, MA 01760
This zip file contains the files users need to write Simulink C S-Functions
that directly handle fixed-point data types. The API is compatible with
Release 13 and beyond. These file should be expanded into a user selected
directory. This directory does NOT need to be under MATLABROOT.
All the files are covered by:
Copyright (c) 1984-2003 The MathWorks, Inc.
All Rights Reserved.
This supplement is compatible with Release 13 and later.
MATLAB Version 6.5 (R13)
Simulink Version 5.0 (R13)
Fixed-Point Blockset Version 4.0 (R13)
In Release 14, this API will be formally included in Simulink. It is expected,
but not guaranteed, that if a Fixed-Point S-Functions is compiled in Release 13
using this supplement, then the DLL, aka share object, will work without
modification in Release 14. If the S-Function is recompiled in Release 14,
then care should be taken to recompile using the latest API files and not the
API files included in this zip. When recompiling, it should NOT be necessary
to modify the S-Functions source code; the API will be backwards compatibile.
The API for use in Simulink is described in the main header file.
The API for use in the TLC phase of Real-Time Workshop Code Generation is
The method of compiling user written fixed-point s-functions is described in.
The C source files for several examples are given.
The corresponding TLC files are also given.
Models that demostrate the example sfunctions are supplied.
For Windows and Linux only, the executables are included in
this zip file. For other platforms, users must mex
the files themselves using mex_sfun_user_fxp_examples.m.
A private file necessary for compiling the sfunctions is also
given. No direct use of the contents of this file should be
made. Direct use of the contents will create sfunctions
that are not forward compatible with future Simulink Releases.