Version 6.4 (R2006a) Real-Time Workshop Software

This table summarizes what's new in V6.4 (R2006a):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
Yes—Details labeled as Compatibility Considerations, below. See also Summary.Bug Reports
at Web site
No

New features and changes introduced in this version are

New Build Information Application Program Interface

V6.4 (R2006a) Real-Time Workshop introduces an application program interface (API) for populating and managing all build information associated with a given model in a single source. This feature

The API includes methods for adding, managing, and retrieving:

The API also includes methods for updating file paths, extensions, and separators.

For information on how to use the API, see the demo rtwdemo_buildInfo and Customizing Post Code Generation Build Processing in the Real-Time Workshop documentation. For descriptions of the API methods, see Function Reference and Functions — Alphabetical List.

New Mechanism for Customizing Post Code Generation Build Processing

Starting with V6.4 (R2006a), you can customize the Real-Time Workshop build process to evaluate a post code generation command after generating and writing the model's code to disk and before generating a makefile. A post code generation command is a user-defined M-file that typically calls functions to get data from or add data to the model's build information object.

This feature is useful for applications that need to control various aspects of the build process after code generation. For example, this is necessary when you develop your own target, or you want to apply an analysis tool to the generated code before continuing with the build process.

To use this feature, you program the command as a script or function and then define the command with the new PostCodeGenCommand model configuration parameter.

For more information, see the demo rtwdemo_buildInfo and Customizing Post Code Generation Build Processing in the Real-Time Workshop documentation.

New Model Configuration Option for Suppressing Makefile Generation

V6.4 (R2006a) adds a new option to the Real-Time Workshop pane of the Configuration Parameters dialog box and a corresponding model configuration parameter, GenerateMakefile, which you can use to suppress makefile generation during the build process. For example, you might do this to integrate tools into the build process that are not driven by makefiles.

This option controls whether the Real-Time Workshop build process generates a makefile and is selected by default. If you clear the check box in the graphical user interface or set the parameter to off, the Real-Time Workshop build process does not generate a makefile for the model. When you suppress makefile generation, you must specify any post code generation processing, including compilation and linking, as a command you program and define, using the feature described in New Mechanism for Customizing Post Code Generation Build Processing.

For more information, see Customizing Post Code Generation Build Processing.

New RSim Target Option for Feeding Inport Blocks with MAT-File Data

The RSim target is enhanced with a new -i command line option that allows you to feed an Inport block with input data during simulation from a single MAT-file or you can change the MAT-file from one simulation to the next. The format requirements of the MAT-file data are flexible in that it can be a single time/data matrix, a single structure, or multiple structures.

For details on how to set up a MAT-file for use with an Inport block and specify signal data for an Inport block, see the demo rtwdemo_rsim_i and Creating a MAT-File for an Inport Block and Specifying Signal Data File for an Inport Block in the Real-Time Workshop documentation.

Switch Block Optimization for Wide Control Port Signals

In releases prior to the V6.4 (R2006a), Real-Time Workshop software optimized code generated for a Switch block such that the code for blocks connected to the data input ports executed conditionally. This optimization was limited to Switch blocks with a control port receiving scalar signals. V6.4 (R2006a) enhances Real-Time Workshop software to generate code that performs conditional branch execution whether the Switch block's control port signal is a scalar value, a vector, or a matrix.

For a description of the Switch block, see Switch in the Simulink Reference.

Multiport Switch Block Enhanced to Generate Default Switch Case Statement

In V6.4 (R2006a), the Real-Time Workshop build process is enhanced to generate a default switch case statement for the Mulitport Switch block. For a description of this block, see Multiport Switch in the Simulink Reference.

C++ Language Support Enhancements

The V6.4 (R2006a) Real-Time Workshop software adds support for C++ code generation for Signal Processing Blockset™ and Video and Image Processing Blockset™ products.

Limitations

Support for Simulink Signal Object Initialization

V6.4 (R2006a) introduces the ability to initialize Simulink signal objects with user-defined values for simulation and code generation. Data initialization increases application reliability and is a requirement of safety critical applications. Initializing signals for both simulation and code generation can expedite transitions between phases of Model-Based Design.

For details on using this feature, see the demo rtwdemo_sigobj_iv, Using Signal Objects to Initialize Signals and Discrete States in the Simulink documentation, and Using Signal Objects to Initialize Signals and Discrete States in the Real-Time Workshop documentation.

Compatibility Considerations

In general, if a submodel uses workspace variables and the variables change, the Real-Time Workshop build process rebuilds the submodel. This behavior also occurs if the initial value for a signal object that corresponds to a signal initialized from outside the model, such as a global data store or root input port, changes.

To work around this behavior, specify the signal object's initial value as a tunable parameter. For example:

S = Simulink.Signal;
S.InitialValue = 'K';
K = Simulink.Parameter;
K.Value = 4;
K.RTWInfo.StorageClass = 'ExportedGlobal'; 

You can then use the tunable parameter to change the signal's initial value without triggering a subsystem build.

Identifiers and Model Reference Applications

As or Version 6.4 (R2006a), to avoid name clashes in models that use model referencing, do one of the following:

Support for Simulink Parameter Object Data Type Enhancements

The V6.4 (R2006a) Real-Time Workshop software supports the following Simulink parameter object data type enhancements discussed in Data Type Property of Parameter Objects Now Settable and Range-Checking for Parameter and Signal Object Values in the Simulink Release Notes.

For a discussion on the code generation aspects of this enhancement, see the demo rtwdemo_paramdt and Generated Code for Parameter Data Types in the Real-Time Workshop documentation.

Support for New Simplest Rounding Mode for Fixed-Point Simulink Blocks

The V6.4 (R2006a) Real-Time Workshop software supports the new Simplest rounding mode that is available for the Round integer calculations toward parameter of some fixed-point Simulink blocks. This rounding mode attempts to reduce or eliminate the need for extra rounding code in generated code. The Simplest rounding mode is currently available for the following blocks:

For more information, see Rounding in the Simulink® Fixed Point™ documentation.

Name Change for PrevZC Identifier in Generated Code

In earlier releases, the identifier generated for a data item representing previous zero-crossing signal states (type PrevZCSigStates_model) was named inconsistently. Depending on your target configuration, the identifier could be generated as model_PrevZCSigState or model_PrevZC. In V6.4 (R2006a), the identifier is generated as model_PrevZCSigState across all configurations. For example, the following would appear in generated C code for a model named mydemo (for which zero-crossing data is relevant):

/* Previous zero-crossings (trigger) states */
PrevZCSigStates_mydemo mydemo_PrevZCSigState; 

Format Enhancements for model.rtw File

Starting in V6.4 (R2006a), the Real-Time Workshop software represents data type information in the file model.rtw in a more compact format. This new format omits the fields ComplexSignal, DataTypeIdx , Dimensions, and Width from where they occurred in the following records.

RecordRecord TypeFields Removed
BlockOutputsBlock output portsComplexSignal
DataTypeIdx
Width
DworksBlock DworksComplexSignal
Width
ExternalInputsExternal inputsComplexSignal
DataTypeIdx
Width
ExternalOutputsExternal outputsWidth
ModelParametersModel parametersComplexSignal
DataTypeIdx
Dimensions
Width

The following topics discuss

New Target Language Compiler Library Functions That Support the New File Format

In support of the new file format, V6.4 (R2006a) adds the following new Target Language Compiler (TLC) library functions for gaining access to the ComplexSignal, DataTypeIdx, Dimensions, and Width fields for a given record. You can use the new functions with the new and old file formats.

FunctionDescription
LibGetRecordIsComplex(rec)Returns the value 1 if the specified record is complex, and 0 otherwise.
LibGetRecordDataTypeId(rec)Returns the data type identifier of the specified record as a an integer.
LibGetRecordDimensions(rec)Returns the dimensions of the specified record as a vector of integers.
LibGetRecordWidth(rec)Returns the width of the specified record as an integer.

Compatibility Considerations

The Target Language Compiler (TLC) includes library functions for retrieving data from fields of the model.rtw file. If your application retrieves data from model.rtw directly, that is, without using the documented TLC library functions, the application will be incompatible and will produce incorrect results. In such cases, reprogram your application to use the documented TLC library functions to retrieve data from model.rtw.

The following table lists the fields now omitted from model.rtw and the TLC library functions you can use to gain access to the fields for various types of records.

FieldRecord TypeTLC Functions
ComplexSignalBlock input portLibBlockInputSignalIsComplex
LibGetRecordIsComplex
 Block output portLibBlockOutputSignalIsComplex
LibGetRecordIsComplex
 Block parameterLibBlockParameterIsComplex
LibGetRecordIsComplex
 Block DworkLibBlockDWorkIsComplex
LibGetRecordIsComplex
(Both functions return 1 or 0, which map to the old values 'yes' and 'no', respectively.)
DataTypeIdxBlock input portLibBlockInputSignalDataTypeId
LibGetRecordDataTypeId
 Block output portLibBlockOutputSignalDataTypeId
LibGetRecordDataTypeId
 Block parameterLibBlockParameterDataTypeId
LibGetRecordDataTypeId
 Block DworkLibBlockDWorkDataTypeId
LibGetRecordDataTypeId
DimensionsBlock input portLibBlockInputSignalDimensions
LibGetRecordDimensions
 Block output portLibBlockOutputSignalDimensions
LibGetRecordDimensions
 Block parameterLibBlockParameterDimensions
LibGetRecordDimensions
WidthBlock input portLibBlockInputSignalWidth
LibGetRecordWidth
 Block output portLibBlockOutputSignalWidth
LibGetRecordWidth
 Block parameterLibBlockParameterWidth
LibGetRecordWidth
 Block DworkLibBlockDWorkWidth
LibGetRecordWidth

For descriptions of the new functions LibGetRecordIsComplex, LibGetRecordDataTypeId, LibGetRecordDimensions, and LibGetRecordWidth, see New Target Language Compiler Library Functions That Support the New File Format. For descriptions of other functions listed in the preceding table, see TLC Function Library Reference in the Real-Time Workshop Target Language Compiler documentation.

Changes to TLC Files in matlabroot/rtw/c/tlc

TLC files in the directory matlabroot/rtw/c/tlc have changed.

You should not customize TLC files in this directory even though the capability exists to do so. Such TLC customizations might not be applied during the code generation process and can lead to unpredictable results.

Compatibility Considerations

Customizations to the files in matlabroot/rtw/c/tlc are not compatible across releases. If you have customized TLC files that reside in that directory, you must reapply your customizations when you upgrade.

New and Enhanced Demos

New demos are

Demo... Shows How You Can...
rtwdemo_buildInfoCustomize post code generation build processing by using the new build information API and new post code generation command
rtwdemo_paramdtControl the data type of tunable parameters in code that the Real-Time Workshop software generates
rtwdemo_rsim_iUse the new -i RSim target option to feed Inport blocks with MAT-file data
rtwdemo_sigobj_ivInitialize Simulink signal objects with the new Simulink signal object initialization feature

The following demos have been enhanced:

Documentation Enhancements

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS