| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop |
| Contents | Index |
| Learn more about Real-Time Workshop |
This table summarizes what's new in V7.4 (R2009b):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | No | Bug
Reports Includes fixes | No |
New features and changes introduced in this version are
Lookup Table (n-D) Block Supports Parameter Data Types Different from Signal Data Types
Enhanced Model Advisor Check Identifies Opportunities to Improve Code Efficiency
Removing Compiler Options Configuration Object in a Future Release
Removing Ignore integer downcasts in folded expressions in Future Release
The Real-Time Workshop User's Guide has been reorganized and consolidated to better support user workflows.
R2009b supports code generation for all Simulink blocks that support variable-size signals. See Simulink Block Support for Variable-Size Signals.
In previous releases, ASAP2 file generation for a model reference hierarchy did not provide any visibility into the signals and states inside referenced models.
Beginning with R2009b, the build process can generate an .a2l file for each referenced model in a model reference hierarchy. In the generated ASAP2 file, MEASUREMENT objects represent signals and states inside the referenced model.
To generate ASAP2 files for referenced models, select ASAP2 file generation for the top model and for each referenced model in the reference hierarchy. To do this, select the value ASAP2 for the Interface parameter on the Interface pane of the Simulink Configuration Parameters dialog box.
In previous releases, the build process supported ASAP2 file generation for Lookup Table (2-D) blocks, but not for other forms of two-dimensional lookup table blocks, such as Lookup Table (n-D) and Interpolation Using Prelookup blocks when table dimensions equal 2.
R2009b supports ASAP2 file generation for Lookup Table (n-D) and Interpolation Using Prelookup blocks when table dimensions equal 2. This provides more consistent generated ASAP2 data across multiple types of two-dimensional lookup table blocks. For example, if you are using ASAP2 data for calibration, you can use either the Lookup Table (2-D) block or the Lookup Table (n-D) block in your models.
R2009b improves the generated code for Rate Transition blocks in the following ways:
Removes redundant code that protects data integrity if the data type is int8 or uint8. The Rate Transition block algorithm assumes that int8 or uint8 access is atomic.
Removes redundant initialization code that executes when the IC (initial signal value) is 0.
Generated code for the grt_malloc.tlc target (Generic Real-Time Target with dynamic memory allocation) has been refactored for consistency with the grt.tlc (Generic Real-Time Target) and ert.tlc (Real-Time Workshop Embedded Coder) targets.
R2009b optimizes the generated code for enabling a subsystem by removing redundant mode-checking logic for the case where the enable signal is single-rate.
The generated code for vector initialization now uses the C standard library function memset instead of a for loop. The configuration parameter, Use memset to initialize floats and doubles to 0.0 on the Optimization pane of the Configuration Parameters dialog box controls whether this optimization is applied to a vector of type float or double. Efficiency improvement for this optimization is dependent on your compiler, target platform, and size of the vector.
The Lookup Table (n-D) block supports breakpoint data types that differ from input data types. This enhancement provides these benefits:
Lower memory requirement for storing breakpoint data that uses a smaller type than the input signal
Sharing of prescaled breakpoint data between two Lookup Table (n-D) blocks with different input data types
Sharing of custom storage breakpoint data in Real-Time Workshop generated code for blocks with different input data types
The Lookup Table (n-D) block supports table data types that differ from output data types. This enhancement provides these benefits:
Lower memory requirement for storing table data that uses a smaller type than the output signal
Sharing of prescaled table data between two Lookup Table (n-D) blocks with different output data types
Sharing of custom storage table data in Real-Time Workshop generated code for blocks with different output data types
The Lookup Table (n-D) block also supports separate data type specification for intermediate results. This enhancement enables use of a higher precision for internal computations than for table data or output data.
For the Prelookup and Lookup Table (n-D) blocks, Real-Time Workshop generated code now stores only the first breakpoint, spacing, and number of breakpoints when:
The breakpoint data is not tunable.
The index search method is Evenly spaced points.
This enhancement reduces memory use and provides faster code execution. Previously, the code stored all breakpoint values in a set, regardless of the tunability or spacing of the breakpoints.
The following enhancements also provide more efficient code for the two blocks:
| Block | Enhancement for Code Efficiency |
|---|---|
| Lookup Table (n-D) | Removal of unnecessary bit shifts for calculating the fraction |
| Prelookup and Lookup Table (n-D) | Use of simple division instead of computationally expensive function calls for calculating the index and fraction |
The Math Function block now supports Real-Time Workshop code generation in these cases:
Complex input and output signals for the pow function, for use with floating-point data types
Fixed-point data types with fractional slope and nonzero bias for the magnitude^2, square, and reciprocal functions
In previous releases, generated code for a Multiport Switch block that uses enumerated data contains the underlying integer for each enumerated value rather than its name. In R2009b, the code contains the name of each enumerated value rather than the underlying integer. This change adds readability and facilitates comparing the code with the model, but has no effect on the behavior of the code.
For more information, see Using Enumerated Data in the Simulink documentation and Enumerated Data Type Considerations in the Real-Time Workshop documentation.
The Real-Time Workshop build process uses a new technique to provide more efficient code for the following blocks:
Benefits include:
Reuse of variables
Dead code elimination
Constant folding
Expression folding
For example, in previous releases, temporary buffers were created to carry concatenated signals for these blocks. In R2009b, the Real-Time Workshop build process eliminates unnecessary temporary buffers and writes the concatenated signal to the downstream global buffer directly. This enhancement reduces the stack size and improves code execution speed.
emlc now generates MEX and C code for variable-size arrays and matrices with known upper bounds. With this capability, you can define inputs, outputs, and local variables in Embedded MATLAB compliant code to represent data that varies in size at runtime.
In simulation, emlc generates code that includes runtime checks and external calls. To reduce the size of the generated code, and potentially improve performance, you can use new C-MEX compilation options to control whether your generated code performs:
Integrity checks that detect violations of memory integrity in the generated code
Responsiveness checks that periodically check for Ctrl+C breaks and refresh graphics
Extrinsic calls to MATLAB functions
For more information, see Automatic C MEX Generation Dialog Box for Embedded MATLAB Coder in the Real-Time Workshop Reference.
emlc now optimizes generated C code by passing a top-level argument by reference without a copy whenever the argument is used as both an input and an output. For example, for [a b c] = foo(x,b,z), argument b will be passed by reference.
You can now control file partitioning when generating C code from Embedded MATLAB compliant code with emlc. Using a new file partition method option, you can specify whether to generate all code in a single C file, or to generate code for each MATLAB file in a corresponding C file. For more information, see How emlc Generates Code in the Real-Time Workshop User's Guide.
New runtime stack to help you determine the source of runtime errors in your Embedded MATLAB functions. The runtime stack provides information about the function that generated the error and the sequence of function calls that led up to the execution of this function. For more information, see Debugging Runtime Errors in the Real-Time Workshop User's Guide.
The Model Advisor Identify questionable fixed-point operations check can:
Provide advice on when to use the new Use integer division to handle net slopes that are reciprocals of integers optimization parameter
For more information, see Use integer division to handle net slopes that are reciprocals of integers in the Simulink Graphical User Interface.
Identify opportunities to improve efficiency of generated code for Lookup Table (n-D) blocks in the following cases:
| Breakpoint Spacing | Index Search Method |
|---|---|
| Uneven | Not Evenly spaced points |
| Even, power of 2 | Not Evenly spaced points |
| Even, not power of 2 | Not Evenly spaced points |
| Evenly spaced points |
For more information, see Identify questionable fixed-point operations in the Real-Time Workshop Reference.
In R2009b, Embedded MATLAB Coder still accepts the Compiler Options configuration object. In future versions of the Real-Time Workshop software, Embedded MATLAB Coder will no longer accept the Compiler Options configuration object.
Compiler options parameters are now available from the C MEX configuration object, the Automatic C MEX Generation dialog box, the Real-Time Workshop configuration object or the Real-Time Workshop dialog box for Embedded MATLAB Coder. To access the Compiler options parameters, use
The C MEX configuration object or the Automatic C MEX Generation dialog box to specify all parameters for C MEX generation using Embedded MATLAB Coder
The Real-Time Workshop configuration object or the Real-Time Workshop dialog box for Embedded MATLAB Coder to specify all parameters for embeddable C code generation using Embedded MATLAB Coder
Changes to General Tab. These parameters now appear on the General tab:
Use BLAS library if possible
Saturate on integer overflow
For more information, see General Tab in the Automatic C MEX Generation Dialog Box for Embedded MATLAB Coder documentation.
New Advanced Tab. These parameters now appear on the Advanced Tab:
Inline Threshold
Inline Threshold Max
Inline Stack Limit
Stack Usage Max
Constant Folding Timeout
For more information, see Advanced Tab in the Automatic C MEX Generation Dialog Box for Embedded MATLAB Coder documentation.
Changes to the General Tab. The Saturate on integer overflow parameter now appears on the General tab.
For more information, see General Tab in the Real-Time Workshop Dialog Box for Embedded MATLAB Coder documentation.
New Advanced Tab. These parameters now appear on the new Advanced Tab:
Inline Threshold
Inline Threshold Max
Inline Stack Limit
Stack Usage Max
Constant Folding Timeout
For more information, see Advanced Tab in the Real-Time Workshop Dialog Box for Embedded MATLAB Coder documentation.
The expression folding option, Ignore integer downcasts in folded expressions, is being removed in a future release. In R2009b, the code generation process continues to evaluate the option.
In R2009b, the Real-Time Workshop software adds the following reserved keywords to the Real-Time Workshop Target Function Library language keywords list.
| ldexpf | muIntScalarMin_sint16 | rt_mod_sint32 |
| muDoubleScalarSinCos | muIntScalarMin_sint32 | rt_mod_uint8 |
| muIntScalarAbs_sint8 | muIntScalarMin_uint8 | rt_mod_uint16 |
| muIntScalarAbs_sint16 | muIntScalarMin_uint16 | rt_mod_uint32 |
| muIntScalarAbs_sint32 | muIntScalarMin_uint32 | rt_mod32 |
| muIntScalarAbs_uint8 | muIntScalarSign_sint8 | rt_rem_boolean |
| muIntScalarAbs_uint16 | muIntScalarSign_sint16 | rt_rem_sint8 |
| muIntScalarAbs_uint32 | muIntScalarSign_sint32 | rt_rem_sint16 |
| muIntScalarMax_sint8 | muIntScalarSign_uint8 | rt_rem_sint32 |
| muIntScalarMax_sint16 | muIntScalarSign_uint16 | rt_rem_uint8 |
| muIntScalarMax_sint32 | muIntScalarSign_uint32 | rt_rem_uint16 |
| muIntScalarMax_uint8 | rt_mod | rt_rem_uint32 |
| muIntScalarMax_uint16 | rt_mod_boolean | rtStopExecution |
| muIntScalarMax_uint32 | rt_mod_sint8 | sf_SREM |
| muIntScalarMin_sint8 | rt_mod_sint16 |
For details, see Reserved Keywords.
![]() | Version 7.5 (R2010a) Real-Time Workshop Software | Version 7.3 (R2009a) Real-Time Workshop Software | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2010- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |