Quantcast

Documentation Center

  • Trial Software
  • Product Updates

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.

  11. Click the link Clock period shall be consistent with chirp tolerance to open the HTML requirements document to the associated requirement.

      Note:   When you click a requirements link in the code comments, the software opens the application for the requirements document, except if the requirements document is a DOORS® module. To view a DOORS requirement, start the DOORS software and log in before clicking the hyperlink in the code comments.

Was this topic helpful?