| Simulink® Verification and Validation™ | ![]() |
Once you finish simulating your model and verifying its performance against the requirements, you might want to use it to generate code for an embedded real-time application. The Simulink Verification and Validation software can include the requirements that you assign to Simulink blocks in generated code for Embedded Real-Time (ERT) targets of the Real-Time Workshop® Embedded Coder™ software.
To specify that requirements be included in the generated code of an ERT target, do the following:
From the Simulink Simulation menu, select Configuration Parameters.
In the Select pane of the Configuration Parameters dialog box, select the Real-Time Workshop node.
The currently configured system target must be an ERT target, as shown.

In the Select pane, under Real-Time Workshop, select Comments.
In the Custom comments section on the right, select the Requirements in block comments check box, as shown.

Requirement descriptions are included with generated code in the following locations.
Model Element | Requirement Description Location |
|---|---|
Model | In the main header file <model>.h |
Nonvirtual subsystems | At the call site for the subsystem |
Virtual subsystems | At the call site of the closest nonvirtual parent subsystem. If a virtual subsystem has no nonvirtual parent, requirement descriptions are located in the main header file for the model, <model>.h. |
Nonsubsystem blocks | In the generated code for the block |
![]() | Displaying the System Requirements in a Diagram | Managing Model Requirements with DOORS Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |