| Real-Time Workshop® | ![]() |
| On this page… |
|---|
Opening the Real-Time Workshop Pane Selecting a Target Configuration Configuring the Target Language for Generated Code Configuring Generated Identifiers |
As discussed in Adjusting Simulation Configuration Parameters for Code Generation, many model configuration parameters affect the way that the Real-Time Workshop® software generates code and builds an executable from your model.
However, you initiate and directly control the code generation and build process from the Real-Time Workshop pane and related tabs (also presented as subnodes).
In addition to using the Configuration Parameters dialog box, you can use get_param and set_param to individually access most configuration parameters. The configuration parameters you can get and set are listed in Parameter Command-Line Information Summary in the Real-Time Workshop reference.
There are three ways to open the Real-Time Workshop pane of the Configuration Parameters dialog box:
From the Simulation menu, choose Configuration Parameters (or type Ctrl+E). When the Configuration Parameters dialog box opens, click Real-Time Workshop in the Select (left) pane.
Select Model Explorer from the View menu in the model window, or type daexplr on the MATLAB® command line and press Enter. In the Model Explorer, expand the node for the current model in the left pane and click Configuration (active). The configuration dialog elements are listed in the middle pane. Clicking any of these brings up that dialog in the right pane. Alternatively, right-clicking the Real-Time Workshop configuration element in the middle pane and choosing Properties from the context menu activates that dialog in a separate window.
Select Options from the Real-Time Workshop submenu of the Tools menu in the model window.
The general Real-Time Workshop pane, as it appears in the Model Explorer, appears in the next figure.
Real-Time Workshop Pane

This pane allows you to specify most of the options for controlling the Real-Time Workshop code generation and build process. The content of the pane and its subpanes can change depending on the target you specify. Thus, a model that has multiple configuration sets can invoke parameters in one configuration that do not apply to another configuration. In addition, some configuration options are available only with the Real-Time Workshop® Embedded Coder™ product.
For descriptions of Real-Time Workshop pane parameters, see Real-Time Workshop Pane: General in the Real-Time Workshop reference.
Use the Browse button on the Real-Time Workshop pane to open the System Target File Browser (See Selecting a System Target File). The browser lets you select a preset target configuration consisting of a system target file, template makefile, and make command.
If you select a target configuration by using the System Target File Browser, your selection appears in the System target file field (target.tlc).
If you are using a target configuration that does not appear in the System Target File Browser, enter the name of your system target file in the System target file field. Click Apply or OK to configure for that target.
Choosing and Configuring Your Target describes the use of the browser and includes a complete list of available target configurations.
Use the Language menu in the Target selection section of the Real-Time Workshop pane to select the target language for the code generated by the Real-Time Workshop code generator. You can select C or C++. The Real-Time Workshop software generates .c or .cpp files, depending on your selection, and places the files in your build directory.
Note If you select C++, you might need to configure the Real-Time Workshop software to use the appropriate compiler before you build a system. For details, see Choosing and Configuring a Compiler. |
To control compiler optimizations for your Real-Time Workshop makefile build at Simulink® GUI level, use the Compiler optimization level parameter. The Compiler optimization level parameter provides
Target-independent values Optimizations on (faster runs) and Optimizations off (faster builds), which allow you to easily toggle compiler optimizations on and off during code development
The value Custom for entering custom compiler optimization flags at Simulink GUI level, rather than editing compiler flags into template makefiles (TMFs) or supplying compiler flags to Real-Time Workshop make commands
The default setting is Optimizations off (faster builds). Selecting the value Custom enables the Custom compiler optimization flags field, in which you can enter custom compiler optimization flags (for example, -O2).
Note If you specify compiler options for your Real-Time Workshop makefile build using OPT_OPTS, MEX_OPTS (except MEX_OPTS="-v"), or MEX_OPT_FILE, the value of Compiler optimization level is ignored and a warning is issued about the ignored parameter. |
For more information about the Compiler optimization level parameter and its values, see Compiler optimization level and Custom compiler optimization flags in the Real-Time Workshop reference.
You can enter Target Language Compiler (TLC) command line options in the TLC options edit field, for example
-aVarName=1 to declare a TLC variable and/or assign a value to it
-IC:\Work to specify an include path
-v to obtain verbose output from TLC processing (for example, when debugging)
Specifying TLC options does not add any flags to the Make command field, as do some of the targets available in the System Target File Browser.
For additional information, see Setting Target Language Compiler Options for details, as well as the Target Language Compiler documentation.
The Generate makefile option specifies whether the Real-Time Workshop build process is to generate a makefile for a model. By default, the Real-Time Workshop build process generates a makefile. You can suppress the generation of a makefile, for example in support of custom build processing that is not based on makefiles, by clearing Generate makefile . When you clear this option,
The Make command and Template makefile options are unavailable.
You must set up any post code generation build processing, using a user-defined command, as explained in Customizing Post Code Generation Build Processing.
A high-level M-file command, invoked when a build is initiated, controls the Real-Time Workshop build process. Each target has an associated make command. The Make command field displays this command.
Almost all targets use the default command, make_rtw. Third-party targets might supply another make command. See the vendor's documentation.
In addition to the name of the make command, you can supply arguments in the Make command field. These arguments include compiler-specific options, include paths, and other parameters. When the build process invokes the make utility, these arguments are passed along in the make command line.
Template Makefiles and Make Options lists the Make command arguments you can use with each supported compiler.
The Template makefile field has these functions:
If you have selected a target configuration using the System Target File Browser, this field displays the name of an M-file that selects an appropriate template makefile for your development environment. For example, in Real-Time Workshop Pane: General, the Template makefile field displays grt_default_tmf, indicating that the build process invokes grt_default_tmf.m.
Template Makefiles and Make Options gives a detailed description of the logic by which the Real-Time Workshop build process selects a template makefile.
Alternatively, you can explicitly enter the name of a specific template makefile (including the extension) or an M-file that returns a template make file in this field. You must do this if you are using a target configuration that does not appear in the System Target File Browser. For example, this is necessary if you have written your own template makefile for a custom target environment or you.
If you specify your own template makefile, be sure to include the filename extension. If you omit the extension, the Real-Time Workshop build process attempts to find and execute a file with the extension .m (that is, an M-file). The template make file (or an M-file that returns a template make file) must be on the MATLAB path. To determine whether the file is on the MATLAB path, enter the following command in the MATLAB Command Window:
which tmf_filename
To configure the model for code generation only, rather than a complete build (make command does not execute), select the Generate code only parameter. The code is not compiled and an executable is not built.
When you select this option, the label of the Build button changes to Generate code.
To generate an navigable summary of source files when the model is built, select the Create code generation report parameter on the Report pane. Selecting this parameter causes the Real-Time Workshop software to produce an HTML file for each generated source file, plus a summary and an index file, in a directory named html within the build directory. If you also select the Launch report automatically option (which is enabled by selecting Create code generation report) , the HTML summary and index are automatically displayed. If you do not want to see the report at that time, clear this second check box. In either case, you can refer to HTML reports at any time. To review an existing HTML report, use any HTML browser to open the file html/model_codgen_rpt.html within your build directory.
For more detail on report content, see Viewing Generated Code in Generated HTML Reports.
Configure how the Real-Time Workshop code generator inserts comments into generated code, by modifying parameters on the Comments pane.
Note Comments can include international (non-US-ASCII) characters encountered during code generation when found in Simulink block names and block descriptions, user comments on Stateflow® diagrams, Stateflow object descriptions, custom TLC files, and code generation template files. |
For descriptions of Comments pane parameters, see Real-Time Workshop Pane: Comments in the Real-Time Workshop reference.
Configure how the Real-Time Workshop code generator uses symbols to name identifiers and objects by setting parameters on the Symbols pane.
The only symbols option available for GRT targets is Maximum identifier length. This is the only symbols option for GRT targets. The Maximum identifier length field allows you to limit the number of characters in function, type definition, and variable names. The default is 31 characters. This is also the minimum length you can specify; the maximum is 256 characters. Consider increasing identifier length for models having a deep hierarchical structure, and when exercising some of the mnemonic identifier options described below.
Within a model containing Model blocks, no collisions of constituent model names can exist. When generating code from a model that uses model referencing, the Maximum identifier length must be large enough to accommodate the root model name and the name mangling string (if any). A code generation error occurs if Maximum identifier length is too small.
When a name conflict occurs between a symbol within the scope of a higher level model and a symbol within the scope of a referenced model, the symbol from the referenced model is preserved. Name mangling is performed on the symbol from the higher level model.
If the Real-Time Workshop Embedded Coder product is installed on your system, the Symbols pane expands to include options for controlling identifier formats, mangle length, scalar inlined parameters, and Simulink data object naming rules. For details, see Customizing Generated Identifiers in the Real-Time Workshop Embedded Coder documentation.
For descriptions of Symbols pane parameters, see Real-Time Workshop Pane: Symbols in the Real-Time Workshop reference.
Real-Time Workshop software reserves certain words for its own use as keywords of the generated code language. Real-Time Workshop keywords are reserved for use internal to Real-Time Workshop software or C programming, and should not be used in Simulink models as identifiers or function names. If your model contains any reserved keywords, the Real-Time Workshop build does not complete and an error message is displayed. To address this error, modify your model to use identifiers or names that are not reserved. The following tables list Real-Time Workshop Language Keywords and Real-Time Workshop Target Function Library Keywords.
Note If you are licensed for Real-Time Workshop Embedded Coder software, you can register additional reserved identifiers in the Simulink environment. For more information about using Real-Time Workshop Embedded Coder software to register additional reserved identifiers, see Adding Target Function Library Reserved Identifiers in the Real-Time Workshop Embedded Coder documentation. |
Real-Time Workshop® Language Keywords
| abs | continue | FALSE | NULL | time_T |
| asm | creal_T | float | pointer_T | true |
| auto | creal32_T | for | real_T | TRUE |
| bool | creal64_T | fortran | real32_T | typedef |
| boolean_T | cuint8_T | goto | real64_T | uint_T |
| break | cuint16_T | id_t | register | uint8_T |
| byte_T | cuint32_T | if | return | uint16_T |
| case | default | int | short | uint32_T |
| char | do | int_T | signed | uint64_T |
| char_T | double | int8_T | single | union |
| cint8_T | else | int16_T | sizeof | unsigned |
| cint16_T | enum | int32_T | static | void |
| cint32_T | extern | int64_T | struct | volatile |
| const | false | long | switch | while |
Real-Time Workshop® Target Function Library Keywords
| acos | FLT_MIN | muDoubleScalarMax | rt_Lookup32 |
| acosf | fmax | muDoubleScalarMin | rt_MAX |
| acosh | fmaxf | muDoubleScalarMod | rt_MIN |
| acoshf | fmin | muDoubleScalarPower | truncf |
| asin | fminf | muDoubleScalarRound | trunc |
| asinf | fmod | muDoubleScalarSign | RT_PI |
| asinh | fmodf | muDoubleScalarSin | rt_SATURATE |
| asinhf | hypot | muDoubleScalarSinh | rt_SGN |
| atan | hypotf | muDoubleScalarSqrt | rt_UNSGN |
| atan2 | ldexp | muDoubleScalarTan | tanhf |
| atan2f | log | muDoubleScalarTanh | rt_ZCFcn |
| atanf | log10 | pow | rtInf |
| atanh | log10f | powf | rtInfF |
| atanhf | logf | roundf | rtIsInf |
| ceil | memcmp | rt_ABS | rtIsInfF |
| ceilf | memcpy | rt_atan2 | rtIsNaN |
| cos | memset | rt_atan232 | rtIsNaNF |
| cosf | muDoubleScalarAbs | utAssert | rtMinusInf |
| cosh | muDoubleScalarAcos | rt_DIVQUOT | rtMinusInfF |
| coshf | muDoubleScalarAcosh | rt_DIVREM | rtNaN |
| DBL_EPSILON | muDoubleScalarAsin | RT_E | rtNaNF |
| DBL_MAX | muDoubleScalarAsinh | rt_FSGN | sin |
| DBL_MIN | muDoubleScalarAtan | rt_hypot | sinf |
| exp | muDoubleScalarAtan2 | rt_hypot32 | sinh |
| exp10 | muDoubleScalarAtanh | rt_I32ZCFcn | sinhf |
| exp10f | muDoubleScalarCeil | rt_InitInfAndNaN | SLibSfcnHelperFcns |
| expf | muDoubleScalarCos | RT_LN_10 | sqrt |
| fabs | muDoubleScalarCosh | RT_LOG10E | sqrtf |
| fabsf | muDoubleScalarExp | rt_Lookup | tan |
| floor | muDoubleScalarFloor | rt_Lookup2D_General | tanf |
| floorf | muDoubleScalarHypot | rt_Lookup2D_Normal | tanh |
| FLT_EPSILON | muDoubleScalarLog | rt_Lookup2D32_General | |
| FLT_MAX | muDoubleScalarLog10 | rt_Lookup2D32_Normal |
Configure a model such that the Real-Time Workshop code generator includes external code—headers, files and functions—in generated code by using the Custom Code pane.
Use the Custom Code pane to insert code into the generated files and to include additional files and paths in the build process.
| To... | Select... |
|---|---|
| Insert custom code near the top of the generated model.c or model.cpp file, outside of any function | Source file and enter the custom code to insert. |
| Insert custom code near the top of the generated model.h file | Header file and enter the custom code to insert. |
| Insert custom code inside the model's initialize function in the model.c or model.cpp file | Initialize function |
| Insert custom code inside the model's terminate function in the model.c or model.cpp file. | Terminate functionand enter the custom code to insert. Also select the Terminate function required parameter on the Interface pane. |
| Add include directories, which contain header files, to the build process | Include directories and enter the absolute or relative paths to the directories. If you specify relative paths, the paths must be relative to the directory containing your model files, not relative to the build directory. The order in which you specify the directories is the order in which they are searched for source and include files. |
| Add source files to be compiled and linked | Source files and enter the full paths
or just the filenames for the files. A filename is sufficient if the
file is in the current MATLAB directory or in one of the include
directories. For each additional source that you specify, the Real-Time Workshop build
process expands a generic rule in the template makefile for the directory
in which the source file is found. For example, if a source file
is found in directory inc, the Real-Time Workshop build
process adds a rule similar to the following: %.obj: buildir\inc\%.c
$(CC) -c -Fo$(@F) $(CFLAGS) $< The Real-Time Workshop build process adds the rules in the order you list the source files. |
| Add libraries to be linked | Libraries and enter the full paths or just the filenames for the libraries. A file name is sufficient if the library is located in the current MATLAB directory or is listed as one of the Include directories. |
Note Custom code that you include in a configuration set is ignored when building S-function targets, accelerated simulation targets, and model reference simulation targets. |
For descriptions of Custom Code pane parameters, see Real-Time Workshop Pane: Custom Code in the Real-Time Workshop reference documentation.
Use the Debug pane to configure a model such that generated code and the build process are optimized for troubleshooting. You can set parameters that apply to the model compilation phase, the target language code generation phase, or both.
The debug parameters will be helpful if you are writing TLC code for customizing targets, integrating legacy code, or developing new blocks. .
See the Target Language Compiler documentation for details. Also, consider using the Model Advisor as a tool for troubleshooting model builds.
For descriptions of Debug pane parameters, see Real-Time Workshop Pane: Debug in the Real-Time Workshop reference documentation.
Use the Interface pane to control which math library is used at run time, whether to include one of three APIs in generated code, and certain other interface options.
| To... | Select or Enter... |
|---|---|
| Specify the target-specific math library to use when generating code | Select C89/C90(ANSI), C99(ISO), or GNU99(GNU) for Target function library. (Additional values may be listed if you have created and registered target function libraries with the Real-Time Workshop Embedded Coder product, or if you have licensed any Link or Target products.) Selecting C89/C90(ANSI) provides the ANSI®[a] C set of library functions. For example, selecting C89/C90(ANSI) would result in generated code that calls sin() whether the input argument is double precision or single precision. However, if you select C99(ISO), the call instead is to the function sinf(), which is single precision. If your compiler supports the ISO®[b] C math extensions, selecting the ISO C library can result in more efficient code. For more information about target function libraries, see Selecting and Viewing Target Function Libraries. |
| Direct where the Real-Time Workshop code generator should place fixed-point and other utility code | Select Auto or Shared
location for Utility function generation.
The shared location directs code for utilities to be placed within
the slprj directory in your working directory,
which is used for building model reference targets. If you select Auto,
|
| Specify a string to be added to the variable names used when logging data to MAT-files, to distinguish logging data from Real-Time Workshop and Simulink applications | Enter a prefix or suffix, such as rt_ or (_rt, for MAT-file variable name modifier. The Real-Time Workshop code generator prefixes or appends the string to the variable names for system outputs, states, and simulation time specified in the Data Import/Export pane. See Configuring a Model for Data Logging for information on MAT-file data logging. |
| Specify an API to be included in generated code | Select C-API, External mode, or ASAP2 for Interface. When you select C-API or External mode, other options appear. C-API and External mode are mutually exclusive. However, this is not the case for C-API and ASAP2. For more information on working with these interfaces, see C-API for Interfacing with Signals and Parameters and External Mode. |
[a] ANSI is a registered trademark of the American National Standards Institute, Inc. [b] ISO is a registered trademark of the International Organization for Standardization. | |
Note Before setting Target function library, verify that your compiler supports the library you want to use. If you select a parameter value that your compiler does not support, compiler errors can occur. For example, if you select C99(ISO) and your compiler does not support the ISO C math extensions, compile-time errors likely will occur. |
When the Real-Time Workshop Embedded Coder product is installed on your system, the Interface pane expands to include several additional options. For details, see Configuring Model Interfaces in the Real-Time Workshop Embedded Coder documentation.
For a summary of option dependencies, see Interface Dependencies. For details on using the external mode interface, see External Mode. For information on using C-API and ASAP2 interfaces see Data Exchange APIs.
For descriptions of Interface pane parameters, see Real-Time Workshop Pane: Interface in the Real-Time Workshop reference documentation.
Several parameters available on the Interface pane have dependencies on settings of other parameters. The following table summarizes the dependencies.
| Parameter | Dependencies? | Dependency Details |
|---|---|---|
| Target function library | No | |
| Utility function generation | Yes | |
| Support floating-point numbers (ERT targets only) | No | |
| Support non-finite numbers (ERT targets only) | Yes | Enabled by Support floating-point numbers |
| Support complex numbers (ERT targets only) | No | |
| Support absolute time (ERT targets only) | No | |
| Support continuous time (ERT targets only) | No | |
| Support non-inlined S-functions (ERT targets only) | Yes | Requires that you enable Support floating-point numbers and Support non-finite numbers |
| GRT compatible call interface (ERT targets only) | Yes | Requires that you enable Support floating-point numbers and disable Single output/update function |
| Single output/update function (ERT targets only) | Yes | Disable for GRT compatible call interface |
| Terminate function required (ERT targets only) | Yes | |
| Generate reusable code (ERT targets only) | Yes | |
| Reusable code error diagnostic (ERT targets only) | Yes | Enabled by Generate reusable code |
| Pass root-level I/O as (ERT targets only) | Yes | Enabled by Generate reusable code |
| Create Simulink S-Function block (ERT targets only) | No | |
| MAT-file logging | Yes | For ERT targets, requires that you enable Support floating-point numbers, Support non-finite numbers, and Terminate function required |
| MAT-file file variable name modifier (ERT targets only) | Yes | Enabled by MAT-file logging |
| Suppress error status in real-time model data structure (ERT targets only) | No | |
| Interface | No | |
| Signals in C API | Yes | Set Interface to C-API |
| Parameters in C API | Yes | Set Interface to C-API |
| Transport layer | Yes | Set Interface to External mode |
| MEX-file arguments | Yes | Set Interface to External mode |
| Static memory allocation | Yes | Set Interface to External mode |
| Static memory buffer size | Yes | Enable Static memory allocation |
A target function library (TFL) is a set of one or more function replacement tables that define the target-specific implementations of math functions and operators to be used in generating code for your Simulink model. The Real-Time Workshop product provides three default TFLs, which you can select from the Target function library drop-down list on the Interface pane of the Configuration Parameters dialog box.
| TFL | Description | Contains tables... |
|---|---|---|
| C89/C90 (ANSI) | Generates calls to the ISO/IEC 9899:1990 C standard math library for floating-point functions. | ansi_tfl_table_tmw.mat |
| C99 (ISO) | Generates calls to the ISO/IEC 9899:1999 C standard math library. | iso_tfl_table_tmw.mat ansi_tfl_table_tmw.mat |
| GNU99 (GNU) | Generates calls to the Free Software Foundation's GNU® gcc math library, which provides C99 extensions as defined by compiler option -std=gnu99. | gnu_tfl_table_tmw.mat iso_tfl_table_tmw.mat ansi_tfl_table_tmw.mat |
TFL tables provide the basis for replacing default math functions and operators in your model code with target-specific code. If you select a library and then hover over the selected library with the cursor, a tool tip is displayed that describes the TFL and lists the function replacement tables it contains. Tables are listed in the order in which they are searched for a function or operator match.

The Real-Time Workshop product allows you to view the content of TFL function replacement tables using the Target Function Library Viewer, as described in Using the Target Function Library Viewer. If you are licensed to use the Real-Time Workshop Embedded Coder product, you additionally can create and register the function replacement tables that make up a TFL.
Each TFL function replacement table contains one or more table entries, with each table entry representing a potential replacement for a single math function or an operator. Each table entry provides a mapping between a conceptual view of the function or operator (similar to the Simulink block view of the function or operator) and a target-specific implementation of that function or operator.
The conceptual view of a function or operator is represented in a TFL table entry by the following elements, which identify the function or operator entry to the code generation process:
A function or operator key (a function name such as 'cos' or an operator ID string such as 'RTW_OP_ADD')
A set of conceptual arguments that observe Simulink naming ('y1', 'u1', 'u2', ...), along with their I/O types (output or input) and data types
Other attributes, such as fixed-point saturation and rounding characteristics for operators, as needed to identify the function or operator to the code generation process as exactly as required for matching purposes
The target-specific implementation of a function or operator is represented in a TFL table entry by the following elements:
The name of an implementation function (such as 'cos_dbl' or 'u8_add_u8_u8')
A set of implementation arguments, along with their I/O types (output or input) and data types
Parameters providing the build information for the implementation function, including header file and source file names and paths as necessary
Additionally, a TFL table entry includes a priority value (0-100, with 0 as the highest priority), which defines the entry's priority relative to other entries in the table.
During code generation for your model, when the code generation process encounters a call site for a math function or operator, it creates and partially populates a TFL entry object, for the purpose of querying the TFL database for a replacement function. The information provided for the TFL query includes the function or operator key and the conceptual argument list. The TFL entry object is then passed to the TFL and, if there is a matching table entry in the TFL, a fully-populated TFL entry, including the implementation function name, argument list, and build information, is returned to the call site and used to generate code.
Within the TFL that is selected for your model, the tables that comprise the TFL are searched in the order in which they are listed (in the left or right pane of the TFL Viewer or in the TFL's Target function library tool tip). Within each table, if multiple matches are found for a TFL entry object, priority level determines the match that is returned. A higher-priority (lower-numbered) entry will be used over a similar entry with a lower priority (higher number).
The Target Function Library Viewer allows you to examine the content of TFL function replacement tables. (For an overview of function replacement tables and the information they contain, see the preceding section.) To launch the Viewer with all currently registered TFLs displayed, issue the following MATLAB command:
>> RTW.viewTfl

Select the name of a TFL in the left pane, and the Viewer displays information about the TFL in the right pane. For example, the tables that make up the TFL are listed in priority order. In the following display, the GNU TFL has been selected.

Click the plus sign (+) next to a TFL name in the left pane to expand its list of tables, and select a table from the list. The Viewer displays all function and operator entries in the selected table in the middle pane, along with abbreviated table entry information for each entry. In the following display, the ANSI table has been selected.

The following fields appear in the abbreviated table entry information provided in the middle pane:
| Field | Description |
|---|---|
| Name | Name of the function or ID of the operator to be replaced (for example, cos or RTW_OP_ADD). |
| Implementation | Name of the implementation function, which can match or differ from Name. |
| NumIn | Number of input arguments. |
| In1Type | Data type of the first conceptual input argument. |
| In2Type | Data type of the second conceptual input argument. |
| OutType | Data type of the conceptual output argument. |
| Priority | The entry's search priority, 0-100, relative to other entries of the same name and conceptual argument list within this table. Highest priority is 0, and lowest priority is 100. The default is 100. If the table provides two implementations for a function or operator, the implementation with the higher priority will shadow the one with the lower priority. |
| UsageCount | Not used. |
Select a function or operator entry in the middle pane. The Viewer displays detailed information from the table entry in the right pane. In the following display, the second entry for the cos function has been selected.

The following fields appear in the detailed table entry information provided in the right pane.
| Field | Description |
|---|---|
| Description | Text description of the table entry (can be empty). |
| Key | Name of the function or ID of the operator to be replaced (for example, cos or RTW_OP_ADD), and the number of conceptual input arguments. |
| Implementation | Name of the implementation function, and the number of implementation input arguments. |
| Implementation type | Type of implementation: FCN_IMPL_FUNCT for function or FCN_IMPL_MACRO for macro. |
| Saturation mode | Saturation mode supported by the implementation function for an operator replacement: RTW_SATURATE_ON_OVERFLOW, RTW_WRAP_ON_OVERFLOW, or RTW_SATURATE_UNSPECIFIED. |
| Rounding mode | Rounding mode supported by the implementation function for an operator replacement: RTW_ROUND_FLOOR, RTW_ROUND_CEILING, RTW_ROUND_ZERO, RTW_ROUND_NEAREST, RTW_ROUND_NEAREST_ML, RTW_ROUND_SIMPLEST, RTW_ROUND_CONV, or RTW_ROUND_UNSPECIFIED. |
| GenCallback file | Not used. |
| Implementation header | Name of the header file that declares the implementation function. |
| Implementation source | Name of the implementation source file. |
| Priority | The entry's search priority, 0-100, relative to other entries of the same name and conceptual argument list within this table. Highest priority is 0, and lowest priority is 100. The default is 100. If the table provides two implementations for a function or operator, the implementation with the higher priority will shadow the one with the lower priority. |
| Total Usage Count | Not used. |
| Conceptual argument(s) | Name, I/O type (RTW_IO_OUTPUT or RTW_IO_INPUT), and data type for each conceptual argument. |
| Implementation | Name, I/O type (RTW_IO_OUTPUT or RTW_IO_INPUT), and data type for each implementation argument. |
If you select an operator entry, an additional tab containing fixed-point setting information is displayed in the right pane. For example:

The following fields appear in the fixed-point setting information provided in the right pane:
| Field | Description |
|---|---|
| Slopes must be the same | Indicates whether TFL replacement request processing must check that the slopes on all arguments (input and output) are equal. Used with fixed-point addition and subtraction replacement to disregard specific slope and bias values and map relative slope and bias values to a replacement function. |
| Must have zero net bias | Indicates whether TFL replacement request processing must check that the net bias on all arguments is zero. Used with fixed-point addition and subtraction replacement to disregard specific slope and bias values and map relative slope and bias values to a replacement function. |
| Relative scaling factor F | Slope adjustment factor (F) part of the relative scaling factor, F2E, for relative scaling TFL entries. Used with fixed-point multiplication and division replacement to map a range of slope and bias values to a replacement function. |
| Relative scaling factor E | Fixed exponent (E) part of the relative scaling factor, F2E, for relative scaling TFL entries. Used with fixed-point multiplication and division replacement to map a range of slope and bias values to a replacement function. |
[a] ANSI is a registered trademark of the American National Standards Institute, Inc.
[b] ISO is a registered trademark of the International Organization for Standardization.
![]() | Adjusting Simulation Configuration Parameters for Code Generation | Configuring Generated Code with TLC | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |