Model-Based Testing and Validation with Reactis®

 
 Reactis User's Guide   Contents  |  Index
 Chapters:  1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20

Chapter 14  Preparing Models for Use with Reactis

To use Reactis on a Simulink / Stateflow model, a user must ensure that the model satisfies certain constraints. This chapter describes what these constraints are. Please note that, while every effort is made to maintain the accuracy of the following list of supported and unsupported features, due to the complexity and continual evolution of the Simulink / Stateflow notation this description may not be complete. For example, some blocks listed as supported do not support all parameters for the block. A block or feature not listed as either supported or unsupported should be assumed to be unsupported.

We encourage all potential customers to take advantage of a free evaluation license for Reactis to determine if the subset of Simulink / Stateflow supported by Reactis is adequate for your models. If not, please let us know what features or blocks are lacking. Reactive Systems uses such feedback to prioritize enhancements to Reactis.

14.1  MATLAB

Reactis can process Simulink / Stateflow models that contain MATLAB code in callbacks or mask initializations, provided that certain conventions are observed. On the one hand, files that define workspace data items referred to in a model must be “connected” to the model appropriately, and certain MATLAB functions should be avoided. The remainder of this section elaborates on these points.

14.1.1  Workspace Data Items

Reactis invokes MATLAB to evaluate many MATLAB expressions, but it does not directly interact with an executing MATLAB session in the same way that Simulink does. For this reason, any workspace data items that a model uses must be included in .m files that are attached to a model using Simulink’s pre-load callback. For the cruise-control example, the file cruise_constants.m defines two workspace variables that are used in cruise.mdl. One attaches cruise_constants.m to cruise.mdl as follows:

  1. Load cruise.mdl into Simulink.
  2. From the Simulink window, select the File -> Model Properties menu item.
  3. In the resulting dialog, select the Callbacks tab.
  4. In the Model pre-load function entry box enter cruise_constants.
  5. Save the model.

In general, using the pre-load callback in this manner is good modeling practice, since once the .m files are attached to a model file, loading the model file into Simulink (and not just Reactis) will automatically load the .m files as well.

14.1.2  Unsupported MATLAB Features

While Reactis supports most of MATLAB , the following exceptions may not be used in Simulink / Stateflow models, e.g. in callbacks or mask initializations.

Expression Evaluation
ASSIGNINAssign variable in workspace.
EVALINEvaluate expression in workspace.
Model Construction/Modification
ADD_BLOCKAdd a block to a Simulink system.
ADD_LINEAdd a line to a Simulink system.
ADD_PARAMAdd a parameter to a Simulink system.
DELETE_BLOCKDelete a block from a Simulink system.
DELETE_LINEDelete a line from a Simulink system.
DELETE_PARAMDeletes a parameter from a Simulink system.
NEW_SYSTEMCreate a new empty Simulink system.
REPLACE_BLOCKReplace blocks in model.
SET_PARAMSet Simulink system and block parameters.

14.2  Simulink

Reactis currently supports Simulink versions 4.0 through 7.5 (MathWorks releases R12 through R2010a). Most features of Simulink are supported. Some notable exceptions are:

  • Simulink signals with more than 2 dimensions are not supported.
  • Reactis does not support the use of complex values (i.e. values with real and imaginary parts) in Simulink signals
  • Models must not contain corresponding DataStoreWrite/DataStoreRead blocks whose execution order is not explicitly defined by either the model logic or priorities.

For the subset of Simulink blocks supported by Reactis please refer to section 14.2.3 and below. For blocks that can be either continuous- or discrete-time, only the discrete-time version is supported. For some blocks identified as supported not all settings are supported.

14.2.1  S-Functions

Reactis supports both C-Coded and M-File S-functions, with some restrictions. For C-Coded S-functions, the following are not supported by Reactis:

  • Port-based sample times.
  • Multiple sample times.
  • Complex number signals.
  • Zero-crossing detection.
  • Output of function-calls.
  • Level 1 S-functions (For a guide on how to convert Level 1 S-functions to Level 2 S-functions — which are supported by Reactis - please consult the Simulink user’s guide)
  • Calling any function from MATLAB’s “mex” library (including mexCallMATLAB, mexEvalString and mexGetVariable) from an S-Function.

For M-File S-functions, the following are not supported by Reactis:

  • Multiple sample times.
  • Complex number signals.
  • Level 2 S-functions.

In addition to the above restrictions, care must be taken about any internal data that is stored by S-functions. In order to work properly, Reactis must be able to retrieve and reset the values of all internal states of any S-function occurring within a model. The best way to make internal states visible to Reactis (and Simulink) is to declare the appropriate number of discrete states in the mdlInitializeSizes() function and then use the state vector that Reactis and Simulink will provide. Reactis will also save and restore memory that an S-function allocates as a result of calling the ssGetNumRWork() and ssGetNumIWork() during mdlInitializeSizes.

Reactis has no way of knowing about any other persistent data that an S-function maintains by other means, such as:

  • global or static variables in C-code;
  • memory allocated by malloc() or mxMalloc() functions in C-code;
  • Use of workspace variables in M-File S-functions.

Reactis will also not save and restore memory requested by ssGetNumPWork(), since otherwise pointers stored in this vector by your S-function might get lost or mangled, resulting in memory leaks or crashes.

If an S-function stores internal states in any of the unsupported ways described above, Reactis will seem to work properly, but the test suites generated by Tester may include wrong outputs. One sign of this can be if you run a test suite in Simulator and get an error message saying “Model fails test”. Another problem of such invalid use of internal states may be invalid outputs after using the “back” buttons in Simulator.

In general, Reactis passes S-Function parameters as fixed values at the time the S-Function is first initialized (i.e. when Tester or Simulator is started). Therefore, if a configuration variable is used as a parameter to an S-Function, the S-Function will not see any changes to the configuration variable unless the S-Function is designed to process such updates. To have an S-Function be updated on changes to its parameters, define a mdlProcessParameters function (see Simulink documentation) within the S-Function code. If this function is present, then Reactis will propagate the parameter changes into the S-Function by calling the S-Function’s mdlProcessParameters function at each step with the new parameter values. In the mdlProcessParameters function the S-Function can then take appropriate actions if any parameters have changed.

14.2.2  Lookup Tables

This section describes the settings for each of the standard Simulink Lookup Table blocks that are supported by Reactis. Some settings might not be relevant depending on the version of MATLAB used. For example, many data type settings for the “Lookup Table (n-D)” block were only introduced in MATLAB R2009b and therefore are not relevant when using Reactis with MATLAB R2009a or earlier.

Lookup Table

All block settings and the following data type combinations are supported. “fixpoint” includes all fixed-point data types as well as built-in integer data types int8, uint8, int16, uint16, int32, and uint32.

Supported Data Type Combinations
Input of LUTOutput of LUT
doubledouble
singledouble
fixpointdouble
singlesingle
fixpointsingle
doublefixpoint
singlefixpoint
fixpointfixpoint
doubleboolean
singleboolean
fixpointboolean

Lookup Table (2-D)

All block settings and the following data type combinations are supported. “fixpoint” includes all fixed-point data types as well as built-in integer data types int8, uint8, int16, uint16, int32 and uint32.

Supported Data Type Combinations
1st Input of LUT2nd Input of LUTOutput of LUT
doubledoubledouble
doublefixpointdouble
doublebooldouble
singlesingledouble
fixpointdoubledouble
fixpointfixpointdouble
booldoubledouble
singlesinglesingle
singlefixpointsingle
singleboolsingle
fixpointsinglesingle
fixpointfixpointsingle
boolsinglesingle
doubledoublefixpoint
singlesinglefixpoint
fixpointfixpointfixpoint
fixpointfixpointbool
doubledoublebool
singlesinglebool

Look-Up Table (n-D)

The following restrictions for data types apply for these tables in Reactis:

  • Input, output, intermediate and fraction data types must be floating-point (double or single).
  • Breakpoint data type must match input data type.
  • Table data type must match output data type.
  • Intermediate results data type must match output data type.
  • If the number of dimensions is 2 or higher then data types of all inputs and outputs must be the same.

Reactis natively supports 1-d and 2-d configurations not using "cubic spline" interpolation. For those configurations Reactis will also track coverage.

All other valid configurations are supported via the sfun_lookupnd.mexw32 S-Function that comes with MATLAB R2007a or earlier. Starting with MATLAB R2007b, this S-Function is no longer included in the MATLAB distribution. However, if a sfun_lookupnd.mexw32 from R2007a or earlier is placed in Reactis’ search path, Reactis can use that S-Function even with R2007b and later.

Direct Lookup Table (n-D)

Only floating-point (double and single) data types are supported.

This table is supported in Reactis via the sfun_nddirectlook.mexw32 S-Function that comes with MATLAB R2009a and earlier. Starting with MATLAB R2009b, this S-Function is no longer included in the MATLAB distribution. However, if a sfun_lookupnd.mexw32 from R2009a or earlier is placed in Reactis’ search path, Reactis can use that S-Function even with R2009b and later.

Look-Up Table Dynamic

All parameters and the data type configurations listed for the “Lookup Table” block above are supported.

Prelookup

All parameters are supported. The following data type restrictions apply:

  • Only floating-point (double and single) input data types are supported.
  • Only “int32” and “uint32” are supported as the data type of the “index” output.
  • Only “single” and “double” are supported as the data type of the “fraction” output.

Interpolation using Prelookup

All parameters are supported. The following data type restrictions apply:

  • Only floating-point (double and single) data types are supported for “fraction” inputs.
  • Data types of all “fraction” inputs must be the same as the output data type.
  • Only “int32” and “uint32” are supported as the data type of the “index” input.
  • Table data type must match output data type
  • Intermediate results data type must match output data type.

14.2.3  MathWorks R12

Sources
Supported: Constant, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (discrete), Ramp, Repeating Sequence, Sine Wave, Step, Signal Generator
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Random Number, Uniform Random Number
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Continuous
Supported:Memory
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Transport Delay, Zero-Pole
Discrete
Supported: Discrete Filter, Discrete State-Space, Discrete-Time Integrator, Discrete Transfer Fcn, Discrete Zero-Pole, Unit Delay, Zero-Order Hold
Unsupported: First-Order Hold
Math
Supported: Abs, Bitwise Logical Operator, Combinatorial Logic, Dot Product, Gain, Logical Operator, Math Function, Matrix Gain, MinMax, Product, Relational Operator, Rounding Function, Sign, Slider Gain, Sum, Trigonometric Function
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Real-Imag to Complex
Functions & Tables
Supported: Direct Lookup Table, Fcn, Interpolation (n-D) using Prelookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Polynomial, PreLookup Index Search, S-function, S-function Builder
Unsupported: MATLAB Fcn
Nonlinear
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone, Multiport Switch, Quantizer, Relay, Saturation, Switch
Unsupported: Manual Switch, Rate Limiter
Signals & Systems
Supported: Assignment, Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Data Type Conversion, Demux, From, Function-Call Generator, Goto, Goto Tag Visibility, Hit Crossing, IC, Matrix Concatenation, Merge, Mux, Probe, Reshape, Selector, Signal Specification, Width
Unsupported: Model Info
Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Subsystem, If Action Subsystem, Subsystem, Switch Case Action Subsystem, Triggered Subsystem, While Iterator Subsystem
Unsupported: 

14.2.4  MathWorks R13

Sources
Supported: Constant, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (sample based), Ramp, Repeating Sequence, Signal Builder, Signal Generator, Sine Wave, Step
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Random Number, Pulse Generator (time based), Uniform Random Number
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Continuous
Supported: 
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Transport Delay, Zero-Pole
Discrete
Supported: Discrete Filter, Discrete State-Space, Discrete-Time Integrator, Discrete Transfer Fcn, Discrete Zero-Pole, Memory, Unit Delay, Zero-Order Hold
Unsupported: First-Order Hold
Math Operations
Supported: Abs, Assignment, Bitwise Logical Operator, Combinatorial Logic, Dot Product, Gain, Logical Operator, Math Function, Matrix Concatenation, Matrix Gain, MinMax, Polynomial, Product, Relational Operator, Reshape, Rounding Function, Sign, Slider Gain, Sum, Trigonometric Function
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Real-Imag to Complex
Signal Routing
Supported: Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Demux, From, Goto, Goto Tag Visibility, Multiport Switch, Mux, Switch
Unsupported: Manual Switch
Signal Attributes
Supported: Data Type Conversion, IC, Probe, Signal Specification, Width, Rate Transition
Unsupported: 
Discontinuities
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone Hit Crossing, Quantizer, Relay, Saturation
Unsupported: Rate Limiter
Lookup Tables
Supported: Direct Lookup Table, Interpolation (n-D) using PreLookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Prelookup Index Search
Unsupported: 
User-Defined Functions
Supported: Fcn, S-function, S-function Builder
Unsupported: MATLAB Fcn
Model Verification
Supported: 
Unsupported: Check Static Lower Bound, Check Static Upper Bound, Check Static Range, Check Static Gap, Check Dynamic Lower Bound, Check Dynamic Upper Bound, Check Dynamic Range, Check Dynamic Gap, Assertion, Check Discrete Gradient, Check Input Resolution
Ports & Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enable Port, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Generator, Function-Call Subsystem, If Action Subsystem, Inport, Outport, Subsystem, Switch Case Action Subsystem, Triggered Subsystem, Trigger Port, While Iterator Subsystem
Unsupported: 
Model-Wide Utilities
Supported: 
Unsupported: DOC, Model Info, Time-Based Linearization, Trigger-Based Linearization
Fixpoint: Data Type Conversion & Propagation
Supported: Conversion, Conversion Inherited, Data Type Propagation, Data Type Duplicate, Gateway In, Gateway Out, Scaling Strip
Unsupported: 
Fixpoint: Delays & Holds
Supported: Unit Delay, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay Enabled, Unit Delay Enabled Resettable, Unit Delay Enabled External IC, Unit Delay Enabled Resettable External IC, Unit Delay With Preview Resettable, Unit Delay With Preview Resettable External RV, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable, Unit Delay With Preview Enabled Resettable External RV, Zero-Order Hold, Tapped Delay, Integer Delay
Unsupported: 
Fixpoint: Logic & Comparison
Supported: Logical Operator, Relational Operator, Compare To Zero, Compare To Constant, Interval Test, Interval Test Dynamic
Unsupported: 
Fixpoint: Select
Supported: Switch, MultiPort Switch, Index Vector
Unsupported: 
Fixpoint: Math
Supported: Sum, Add, Subtract, Sum of Elements, Sum of Elements Negated, Product, Multiply, Divide, Product of Elements, Product of Elements Inverted, Multiply Matrix, Gain, Matrix Gain, Dot Product, Unary Minus, Abs, Increment Real World, Decrement Real World, Increment Stored Integer, Decrement Stored Integer, Decrement To Zero, Decrement Time To Zero, MinMaz, MinMax Running Resettable
Unsupported: 
Fixpoint: Sources
Supported: Constant, Repeating Sequence Stair, Repeating Sequence Interpolated, Counter Free, Counter Limited
Unsupported: 
Fixpoint: Filters
Supported: Filter First Order, Filter Lead or Lag, Filter Real Zero, State-Space
Unsupported: Filter Direct Form I, Filter Direct Form I Time Varying, Filter Direct Form II, Filter Direct Form II Time Varying, FIR
Fixpoint: Nonlinear
Supported: Saturation, Saturation Dynamic, Dead Zone, Dead Zone Dynamic, Rate Limiter, Rate Limiter Dynamic, Relay, Sign, Wrap To Zero
Unsupported: 
Fixpoint: Look-Up Tables
Supported: Look-Up Table, Look-Up Table (2-D), Sine, Cosine, Look-Up Table Dynamic
Unsupported: 
Fixpoint: Calculus
Supported: Accumulator (all variations), Difference, Derivative, Integrator (all variations), Sample Time Math (all variations)
Unsupported: 
Fixpoint: Bits
Supported: Bitwise Operator, Bit Set, Bit Clear, Shift Arithmetic
Unsupported: 
Fixpoint: Edge Detect
Supported: Detect Increase, Detect Decrease, Detect Change, Detect Rise Positive, Detect Rise Nonnegative, Detect Fall Negative, Detect Fall Nonpositive
Unsupported: 

14.2.5  MathWorks R14, R2006a, R2006b

Commonly Used Blocks
Supported: Bus Creator, Bus Selector, Constant, Data-Type Conversion, Demux, Discrete-Time Integrator, Gain, Ground, Inport, Logical Operator, Mux, Outport, Product, Relational Operator, Saturation, Scope, Subsystem, Sum, Switch, Terminator, Unit Delay
Unsupported: Integrator
Continuous
Supported: 
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Transport Delay, Zero-Pole
Discontinuities
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone, Dead Zone Dynamic, Hit Crossing, Quantizer, Rate Limiter Dynamic, Relay, Saturation, Saturation Dynamic, Wrap To Zero
Unsupported: Rate Limiter
Discrete
Supported: Difference, Discrete Derivative, Discrete Filter, Discrete State-Space, Discrete Transfer Fcn, Discrete Zero-Pole, Discrete-Time Integrator, Integer Delay, Memory, Tapped Delay, Transfer Fcn First Order, Transfer Fcn Lead or Lag, Transfer Fcn Real Zero, Unit Delay, Zero-Order Hold
Unsupported: First-Order Hold, Weighted Moving Average
Logic and Bit Operations
Supported: Bit Clear, Bit Set, Bitwise Operator, Combinatorial Logic, Compare To Constant, Compare To Zero, Detect Change, Detect Decrease, Detect Fall Negative, Detect Fall Nonpositive, Detect Increase, Detect Rise Nonnegative, Detect Rise Positive, Extract Bits, Interval Test, Interval Test Dynamic, Logical Operator, Relational Operator, Shift Arithmetic
Unsupported: 
Lookup Tables
Supported: Cosine (output formula cos), Direct Lookup Table (n-D), Interpolation using Prelookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Lookup Table Dynamic, Prelookup (Index Search), Sine (output formula sin)
Unsupported: Cosine (output formulas other than cos), Sine (output formulas other than sin)
Math Operations
Supported: Abs, Add, Assignment, Bias, Divide, Dot Product, Gain, Math Function (except Hermitian), Matrix Concatenate, MinMax, MinMax Running Resettable, Polynomial, Product, Product of Elements, Reshape, Rounding Function, Sign, Sine Wave Function (using simulation time), Slider Gain, Subtract, Sum, Sum of Elements, Trigonometric Function, Unary Minus, Weighted Sample Time Math
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Real-Imag to Complex, Math Function (Hermitian), Permute Dimensions, Sine Wave Function (using external time), Vector Concatenate
Model Verification
Supported: 
Unsupported: Assertion, Check Discrete Gradient, Check Dynamic Gap, Check Dynamic Lower Bound, Check Dynamic Range, Check Dynamic Upper Bound, Check Input Resolution, Check Static Gap, Check Static Lower Bound, Check Static Range, Check Static Upper Bound
Model-Wide Utilities
Supported: DocBlock, Model Info (Reactis will process models containing these blocks but does not display the information stored in them.)
Unsupported: Time-Based Linearization, Trigger-Based Linearization
Ports & Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enable, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Generator, Function-Call Subsystem, If, If Action Subsystem, Inport, Model, Outport, Subsystem, Switch Case, Switch Case Action Subsystem, Trigger, Triggered Subsystem, While Iterator Subsystem
Unsupported: CodeReuseSubsystem
Signal Attributes
Supported: Data Type Conversion, Data Type Conversion Inherited, Data Type Duplicate, Data Type Propagation, Data Type Scaling Strip, IC, Probe, Rate Transition, Signal Conversion, Signal Specification, Weighted Sample Time, Width
Unsupported: 
Signal Routing
Supported: Bus Assignment, Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Demux, Environment Controller, From, Goto, Goto Tag Visibility, Index Vector, Merge, Multiport Switch, Mux, Selector, Switch
Unsupported: Manual Switch
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Sources
Supported: Constant, Counter Free-Running, Counter Limited, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (sample based), Ramp, Repeating Sequence, Repeating Sequence Interpolated, Repeating Sequence Stair, Signal Builder, Signal Generator, Sine Wave, Step
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Pulse Generator (time based), Random Number, Uniform Random Number
User-Defined Functions
Supported: Fcn, S-function, S-function Builder
Unsupported: Embedded MATLAB Function, M-file (level-2) S-Function, MATLAB Fcn
Additional Discrete
Supported: Fixed-Point State-Space, Unit Delay Enabled, Unit Delay Enabled External IC, Unit Delay Enabled Resettable, Unit Delay Enabled Resettable External IC, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable Unit Delay With Preview Resettable External RV, Unit Delay With Preview Resettable, Unit Delay With Preview Enabled Resettable External RV
Unsupported: Transfer Fcn Direct Form II, Transfer FcnDirect Form II Time Varying
Additional Math
Supported: Decrement Real World, Decrement Stored Integer, Decrement Time To Zero, Decrement To Zero, Increment Real World, Increment Stored Integer
Unsupported: 

14.2.6  R2007a

Commonly Used Blocks
Supported: Bus Creator, Bus Selector, Constant, Data-Type Conversion, Demux, Discrete-Time Integrator, Gain, Ground, Inport, Logical Operator, Mux, Outport, Product, Relational Operator, Saturation, Scope, Subsystem, Sum, Switch, Terminator, Unit Delay
Unsupported: Integrator
Continuous
Supported: 
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Transport Delay, Zero-Pole
Discontinuities
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone, Dead Zone Dynamic, Hit Crossing, Quantizer, Rate Limiter Dynamic, Relay, Saturation, Saturation Dynamic, Wrap To Zero
Unsupported: Rate Limiter
Discrete
Supported: Difference, Discrete Derivative, Discrete Filter, Discrete State-Space, Discrete Transfer Fcn, Discrete Zero-Pole, Discrete-Time Integrator, Integer Delay, Memory, Tapped Delay, Transfer Fcn First Order, Transfer Fcn Lead or Lag, Transfer Fcn Real Zero, Unit Delay, Zero-Order Hold
Unsupported: First-Order Hold, Weighted Moving Average
Logic and Bit Operations
Supported: Bit Clear, Bit Set, Bitwise Operator, Combinatorial Logic, Compare To Constant, Compare To Zero, Detect Change, Detect Decrease, Detect Fall Negative, Detect Fall Nonpositive, Detect Increase, Detect Rise Nonnegative, Detect Rise Positive, Extract Bits, Interval Test, Interval Test Dynamic, Logical Operator, Relational Operator, Shift Arithmetic
Unsupported: 
Lookup Tables
Supported: Cosine (output formula cos), Direct Lookup Table (n-D), Interpolation using Prelookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Lookup Table Dynamic, Prelookup (Index Search), Sine (output formula sin)
Unsupported: Cosine (output formulas other than cos), Sine (output formulas other than sin)
Math Operations
Supported: Abs, Add, Assignment, Bias, Divide, Dot Product, Gain, Math Function (except Hermitian), Matrix Concatenate, MinMax, MinMax Running Resettable, Polynomial, Product, Product of Elements, Reshape, Rounding Function, Sign, Sine Wave Function (using simulation time), Slider Gain, Subtract, Sum, Sum of Elements, Trigonometric Function, Unary Minus, Weighted Sample Time Math
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Real-Imag to Complex, Math Function (Hermitian), Permute Dimensions, Sine Wave Function (using external time), Squeeze, Vector Concatenate
Model Verification
Supported: 
Unsupported: Assertion, Check Discrete Gradient, Check Dynamic Gap, Check Dynamic Lower Bound, Check Dynamic Range, Check Dynamic Upper Bound, Check Input Resolution, Check Static Gap, Check Static Lower Bound, Check Static Range, Check Static Upper Bound
Model-Wide Utilities
Supported: DocBlock, Model Info (Reactis will process models containing these blocks but does not display the information stored in them.)
Unsupported: Block Support Table, Time-Based Linearization, Trigger-Based Linearization
Ports & Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enable, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Generator, Function-Call Subsystem, If, If Action Subsystem, Inport, Model, Outport, Subsystem, Switch Case, Switch Case Action Subsystem, Trigger, Triggered Subsystem, While Iterator Subsystem
Unsupported: CodeReuseSubsystem
Signal Attributes
Supported: Data Type Conversion, Data Type Conversion Inherited, Data Type Duplicate, Data Type Propagation, Data Type Scaling Strip, IC, Probe, Rate Transition, Signal Conversion, Signal Specification, Weighted Sample Time, Width
Unsupported: 
Signal Routing
Supported: Bus Assignment, Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Demux, Environment Controller, From, Goto, Goto Tag Visibility, Index Vector, Merge, Multiport Switch, Mux, Selector, Switch
Unsupported: Manual Switch
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Sources
Supported: Constant, Counter Free-Running, Counter Limited, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (sample based), Ramp, Repeating Sequence, Repeating Sequence Interpolated, Repeating Sequence Stair, Signal Builder, Signal Generator, Sine Wave, Step
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Pulse Generator (time based), Random Number, Uniform Random Number
User-Defined Functions
Supported: Fcn, S-function, S-function Builder
Unsupported: Embedded MATLAB Function, M-file (level-2) S-Function, MATLAB Fcn
Additional Discrete
Supported: Fixed-Point State-Space, Unit Delay Enabled, Unit Delay Enabled External IC, Unit Delay Enabled Resettable, Unit Delay Enabled Resettable External IC, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable Unit Delay With Preview Resettable External RV, Unit Delay With Preview Resettable, Unit Delay With Preview Enabled Resettable External RV
Unsupported: Transfer Fcn Direct Form II, Transfer FcnDirect Form II Time Varying
Additional Math
Supported: Decrement Real World, Decrement Stored Integer, Decrement Time To Zero, Decrement To Zero, Increment Real World, Increment Stored Integer
Unsupported: 

14.2.7  R2007b

Commonly Used Blocks
Supported: Bus Creator, Bus Selector, Constant, Data-Type Conversion, Demux, Discrete-Time Integrator, Gain, Ground, Inport, Logical Operator, Mux, Outport, Product, Relational Operator, Saturation, Scope, Subsystem, Sum, Switch, Terminator, Unit Delay
Unsupported: Integrator
Continuous
Supported: 
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Time Delay, Variable Transport Delay, Zero-Pole
Discontinuities
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone, Dead Zone Dynamic, Hit Crossing, Quantizer, Rate Limiter Dynamic, Relay, Saturation, Saturation Dynamic, Wrap To Zero
Unsupported: Rate Limiter
Discrete
Supported: Difference, Discrete Derivative, Discrete Filter, Discrete State-Space, Discrete Transfer Fcn, Discrete Zero-Pole, Discrete-Time Integrator, Integer Delay, Memory, Tapped Delay, Transfer Fcn First Order, Transfer Fcn Lead or Lag, Transfer Fcn Real Zero, Unit Delay, Zero-Order Hold
Unsupported: First-Order Hold, Weighted Moving Average
Logic and Bit Operations
Supported: Bit Clear, Bit Set, Bitwise Operator, Combinatorial Logic, Compare To Constant, Compare To Zero, Detect Change, Detect Decrease, Detect Fall Negative, Detect Fall Nonpositive, Detect Increase, Detect Rise Nonnegative, Detect Rise Positive, Extract Bits, Interval Test, Interval Test Dynamic, Logical Operator, Relational Operator, Shift Arithmetic
Unsupported: 
Lookup Tables
Supported: Cosine (output formula cos), Interpolation using Prelookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Lookup Table Dynamic, Prelookup (Index Search), Sine (output formula sin)
Unsupported: Cosine (output formulas other than cos), Direct Lookup Table (n-D), Sine (output formulas other than sin)
Math Operations
Supported: Abs, Add, Assignment, Bias, Divide, Dot Product, Gain, Math Function (except Hermitian), Matrix Concatenate, MinMax, MinMax Running Resettable, Polynomial, Product, Product of Elements, Reshape, Rounding Function, Sign, Sine Wave Function (using simulation time), Slider Gain, Subtract, Sum, Sum of Elements, Trigonometric Function, Unary Minus, Weighted Sample Time Math
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Real-Imag to Complex, Math Function (Hermitian), Permute Dimensions, Sine Wave Function (using external time), Squeeze, Vector Concatenate
Model Verification
Supported: 
Unsupported: Assertion, Check Discrete Gradient, Check Dynamic Gap, Check Dynamic Lower Bound, Check Dynamic Range, Check Dynamic Upper Bound, Check Input Resolution, Check Static Gap, Check Static Lower Bound, Check Static Range, Check Static Upper Bound
Model-Wide Utilities
Supported: DocBlock, Model Info (Reactis will process models containing these blocks but does not display the information stored in them.)
Unsupported: Block Support Table, Time-Based Linearization, Trigger-Based Linearization
Ports & Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enable, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Generator, Function-Call Subsystem, If, If Action Subsystem, Inport, Model, Outport, Subsystem, Switch Case, Switch Case Action Subsystem, Trigger, Triggered Subsystem, While Iterator Subsystem
Unsupported: CodeReuseSubsystem
Signal Attributes
Supported: Data Type Conversion, Data Type Conversion Inherited, Data Type Duplicate, Data Type Propagation, Data Type Scaling Strip, IC, Probe, Rate Transition, Signal Conversion, Signal Specification, Weighted Sample Time, Width
Unsupported: Bus To Vector
Signal Routing
Supported: Bus Assignment, Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Demux, Environment Controller, From, Goto, Goto Tag Visibility, Index Vector, Merge, Multiport Switch, Mux, Selector, Switch
Unsupported: Manual Switch
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Sources
Supported: Constant, Counter Free-Running, Counter Limited, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (sample based), Ramp, Repeating Sequence, Repeating Sequence Interpolated, Repeating Sequence Stair, Signal Builder, Signal Generator, Sine Wave, Step
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Pulse Generator (time based), Random Number, Uniform Random Number
User-Defined Functions
Supported: Fcn, S-function, S-function Builder
Unsupported: Embedded MATLAB Function, Level-2 M-File S-Function, MATLAB Fcn
Additional Discrete
Supported: Fixed-Point State-Space, Unit Delay Enabled, Unit Delay Enabled External IC, Unit Delay Enabled Resettable, Unit Delay Enabled Resettable External IC, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable Unit Delay With Preview Resettable External RV, Unit Delay With Preview Resettable, Unit Delay With Preview Enabled Resettable External RV
Unsupported: Transfer Fcn Direct Form II, Transfer FcnDirect Form II Time Varying
Additional Math
Supported: Decrement Real World, Decrement Stored Integer, Decrement Time To Zero, Decrement To Zero, Increment Real World, Increment Stored Integer
Unsupported: 

14.2.8  R2008a, R2008b, R2009a, R2009b, R2010a

Commonly Used Blocks
Supported: Bus Creator, Bus Selector, Constant, Data-Type Conversion, Demux, Discrete-Time Integrator, Gain, Ground, Inport, Logical Operator, Mux, Outport, Product, Relational Operator, Saturation, Scope, Subsystem, Sum, Switch, Terminator, Unit Delay
Unsupported: Integrator
Continuous
Supported: 
Unsupported: Derivative, Integrator, State-Space, Transfer Fcn, Transport Delay, Variable Time Delay, Variable Transport Delay, Zero-Pole
Discontinuities
Supported: Backlash, Coulomb & Viscous Friction, Dead Zone, Dead Zone Dynamic, Hit Crossing, Quantizer, Rate Limiter Dynamic, Relay, Saturation, Saturation Dynamic, Wrap To Zero
Unsupported: Rate Limiter
Discrete
Supported: Difference, Discrete Derivative, Discrete Filter, Discrete State-Space, Discrete Transfer Fcn, Discrete Zero-Pole, Discrete-Time Integrator, Integer Delay, Memory, Tapped Delay, Transfer Fcn First Order, Transfer Fcn Lead or Lag, Transfer Fcn Real Zero, Unit Delay, Zero-Order Hold
Unsupported: Discrete FIR Filter, First-Order Hold
Logic and Bit Operations
Supported: Bit Clear, Bit Set, Bitwise Operator, Combinatorial Logic, Compare To Constant, Compare To Zero, Detect Change, Detect Decrease, Detect Fall Negative, Detect Fall Nonpositive, Detect Increase, Detect Rise Nonnegative, Detect Rise Positive, Extract Bits, Interval Test, Interval Test Dynamic, Logical Operator, Relational Operator, Shift Arithmetic
Unsupported: 
Lookup Tables
Supported: Cosine (output formula cos), Interpolation using Prelookup, Lookup Table, Lookup Table (2-D), Lookup Table (n-D), Lookup Table Dynamic, Prelookup, Sine (output formula sin)
Unsupported: Cosine (output formulas other than cos), Direct Lookup Table (n-D), Sine (output formulas other than sin)
Math Operations
Supported: Abs, Add, Assignment, Bias, Divide, Dot Product, Gain, Math Function (except Hermitian), Matrix Concatenate, MinMax, MinMax Running Resettable, Polynomial, Product, Product of Elements, Reshape, Rounding Function, Sign, Sine Wave Function (using simulation time), Slider Gain, Subtract, Sum, Sum of Elements, Trigonometric Function, Unary Minus, Weighted Sample Time Math
Unsupported: Algebraic Constraint, Complex to Magnitude-Angle, Complex to Real-Imag, Magnitude-Angle to Complex, Math Function (Hermitian), Permute Dimensions, Real-Imag to Complex, Sine Wave Function (using external time), Squeeze, Vector Concatenate
Model Verification
Supported: 
Unsupported: Assertion, Check Dynamic Gap, Check Dynamic Range, Check Static Gap, Check Static Range, Check Discrete Gradient, Check Dynamic Lower Bound, Check Dynamic Upper Bound, Check Input Resolution, Check Static Lower Bound, Check Static Upper Bound
Model-Wide Utilities
Supported: DocBlock, Model Info (Reactis will process models containing these blocks but does not display the information stored in them.)
Unsupported: Block Support Table, Time-Based Linearization, Trigger-Based Linearization
Ports & Subsystems
Supported: Atomic Subsystem, Configurable Subsystem, Enable, Enabled Subsystem, Enabled and Triggered Subsystem, For Iterator Subsystem, Function-Call Generator, Function-Call Subsystem, If, If Action Subsystem, Inport, Model, Outport, Subsystem, Switch Case, Switch Case Action Subsystem, Trigger, Triggered Subsystem, While Iterator Subsystem
Unsupported: CodeReuseSubsystem
Signal Attributes
Supported: Data Type Conversion, Data Type Conversion Inherited, Data Type Duplicate, Data Type Propagation, Data Type Scaling Strip, IC, Probe, Rate Transition, Signal Conversion, Signal Specification, Weighted Sample Time, Width
Unsupported: Bus To Vector
Signal Routing
Supported: Bus Assignment, Bus Creator, Bus Selector, Data Store Memory, Data Store Read, Data Store Write, Demux, Environment Controller, From, Goto, Goto Tag Visibility, Index Vector, Merge, Multiport Switch, Mux, Selector, Switch
Unsupported: Manual Switch
Sinks
Supported: Display, Floating Scope, Outport, Scope, Terminator
Unsupported: Stop Simulation, To File, To Workspace, XY Graph
Sources
Supported: Constant, Counter Free-Running, Counter Limited, Digital Clock, From File, From Workspace, Ground, Inport, Pulse Generator (sample based), Ramp, Random Number (in virtual source), Repeating Sequence, Repeating Sequence Interpolated, Repeating Sequence Stair, Signal Builder, Signal Generator, Sine Wave, Step
Unsupported: Band-Limited White Noise, Chirp Signal, Clock, Pulse Generator (time based), Random Number (not in virtual source), Uniform Random Number
User-Defined Functions
Supported: Fcn, S-function, S-function Builder
Unsupported: Embedded MATLAB Function, Level-2 M-File S-Function, MATLAB Fcn
Additional Discrete
Supported: Fixed-Point State-Space, Unit Delay Enabled, Unit Delay Enabled External IC, Unit Delay Enabled Resettable, Unit Delay Enabled Resettable External IC, Unit Delay External IC, Unit Delay Resettable, Unit Delay Resettable External IC, Unit Delay With Preview Enabled, Unit Delay With Preview Enabled Resettable, Unit Delay With Preview Resettable External RV, Unit Delay With Preview Resettable, Unit Delay With Preview Enabled Resettable External RV
Unsupported: Transfer Fcn Direct Form II, Transfer FcnDirect Form II Time Varying
Additional Math
Supported: Decrement Real World, Decrement Stored Integer, Decrement Time To Zero, Decrement To Zero, Increment Real World, Increment Stored Integer
Unsupported: 

14.2.9  Simulink Extras

The following table lists the supported blocks from the “Simulink extras” library which is available in all MATLAB versions:

Additional Discrete
Supported: Discrete Transfer Fcn (with initial outputs), Discrete Transfer Fcn (with initial states), Discrete Zero-Pole (with initial outputs), Discrete Zero-Pole (with initial states), Idealized ADC Quantizer
Unsupported: 
Additional Linear
Supported: 
Unsupported: PID Controller, PID Controller (with Approximate Derivative), State-Space (with initial outputs), Transfer Fcn (with initial outputs), Transfer Fcn (with initial states), Zero-Pole (with initial outputs), Zero-Pole (with initial states)
Additional Sinks
Supported: 
Unsupported: Auto Correlator, Averaging Power Spectral Density, Averaging Spectrum Analyzer, Cross Correlator, Floating Bar Plot, Power Spectral Density, Spectrum Analyzer
Flip Flops
Supported: D Flip-Flop, D Latch, J-K Flip-Flop, S-R Flip-Flop
Unsupported: Clock
Linearization
Supported: 
Unsupported: Switched derivative for linearization, Switched transport delay for linearization
Transformations
Supported: Cartesian to Polar, Cartesian to Spherical, Celsius to Fahrenheit, Degrees to Radians, Fahrenheit to Celsius, Polar to Cartesian, Radians to Degrees, Spherical to Cartesian
Unsupported: 

14.2.10  TargetLink Library Blocks

The following table lists the supported blocks from the dSPACE TargetLink library, if installed:

Main TargetLink Library
Supported: Inport, Outport, Constant, Sum, Gain, Product, Logical Operator, Relational Operator, Fcn, Look-Up Table, Look-up Table (2-D), Direct Look-up Table (n-D), PreLook-Up Index Search, Interpolation (n-D) using PreLook-Up, Saturation, MinMax, Abs, Sign, Relay, Trigonometric Function, Math, Unit Delay, Discrete Transfer Fcn, FIR Filter, Discrete-Time Integrator, Discrete State-Space, Data Store Write, Data Store Memory, Data Store Read, Merge, Sink, Bus Inport, Bus Outport, Switch, Multiport Switch, Unit Delay (Reset Enabled),
Unsupported: Rate Limiter
Non-Linear
Supported: Dead Zone Positive, Dead Zone Negative, Saturation Dynamic, Backlash
Unsupported:Dead Zone, Dead Zone Dynamic
Math
Supported: Rounding Function, Transport Delay
Unsupported: 
Extras
Supported: D Flip-Flop, D Latch, J-K Flip-Flop, S-R Flip-Flop, Preprocessor IF
Unsupported: 
Bit Operations
Supported: U8 Bit Set, U16 Bit Set, U32 Bit Set , U8 Bit Clear, U16 Bit Clear, U32 Bit Clear, Split U16, Split U32, Combine U16, Combine U32, 8Bit Decoder, 8Bit Encoder, 16Bit Decoder, 16Bit Encoder, Bitwise Logical Operator
Unsupported: 

14.3  Stateflow

Reactis supports most of Stateflow. Some exceptions are the following unsupported features:

  • Implicit “enter”, “exit” and “change” events
  • Range limits for variables.
  • “ml.” namespace operator and “ml()” function call.
  • Embedded MATLAB code.
  • When using expressions in the ’size’ field of a Stateflow variable declaration, all references to constants within the expression must refer to constants that are defined in the MATLAB workspace.
  • Using Stateflow keywords as variable names. The Stateflow keywords are: at, after, before, change, du, during, enter, en, entry, every, ex, exit, in, on, ml, send, abs, acos, asin, atan, atan2, ceil, cos, cosh, exp, fabs, floor, fmod, labs, ldexp, log, log10, min, max, pow, rand, rem, sin, sinh, sqrt, tan, tanh, int8, int16, int32, uint8, uint16, uint32, double, boolean.
  • The explicit type cast function (“cast”)
  • The address operator (&) is supported only in calls to external C functions.
  • The pointer operator (*) is supported only inside a literal C code section.
  • Charts without trigger or sample time are supported only if the model has a fixed sample time.
  • In some cases, the detection of inner transitions fails for odd-shaped transitions (for example, single transition segments which leave and reenter a state).
  • Using “bind” actions.
  • The operators hasChanged, hasChangedTo, hasChangedFrom.
  • Graphical functions with multiple outputs.
  • Absolute time in temporal logic operators (i.e. using the sec keyword).
  • The temporalCount operator.
  • Simulink function-call subsystems.
  • Enumerated datatypes.
  • Keywords true and false.