User`s guide

10 Requirements Information in Generated Code
10-4
Generate Code for Models with Requirements Links
To specify that generated code of an ERT target include requirements:
1
Open the rtwdemo_requirements example model.
2
Select Simulation > Model Configuration Parameters.
3
In the Select tree of the Configuration Parameters dialog box, select the Code
Generation node.
The currently configured system target must be an ERT target.
4
Under Code Generation, select Comments.
5
In the Custom comments section on the right, select the Requirements in block
comments check box.
6
Under Code Generation, select Report.
7
On the Report pane, select:
Create code generation report
Open report automatically
8
On the Code Generation main pane, click Build.
9
In the code-generation report, open rtwdemo_requirements.c.
10
Scroll to the code for the Pulse Generator block, clock. The comments for the code
associated with that block include a hyperlink to the requirement linked to that
block.