Main Content

View Requirements Links from Generated Code

For requirements reviews, design reviews, traceability analysis, or project documentation, you can create links to requirements documents from your model with the Requirements Toolbox™ software. If your model has links to requirements documents, you can also view the links from the generated code.

Note

The requirement links must be associated with a model object. If requirements links are associated with the code in a MATLAB® Function block, they do not appear in generated code comments.

To view requirements from generated code:

  1. From your model, create links to requirements documents.

    See, Requirements Management Interface (Requirements Toolbox).

  2. For the subsystem for which you want to generate code, specify the following configuration parameters.

    OptionPurpose
    Include commentsModel information must appear in code comments.
    Generate traceability reportAfter code is generated, a Code Generation Report must be produced.

  3. Generate code.

    The code generation report opens. The links to requirements documents appear in generated code comments. When you view the code in the code generation report, you can open the links from the comments.