Main Content

Generate traceability report

Generate report with hyperlinks from code to model and model to code

Model Configuration Pane: HDL Code Generation / Report

Description

The Generate traceability report parameter enables or disables the generation of Traceability Report section in an HTML code generation report. The HTML code generation report contains bidirectional traceability, that is, hyperlinks from the code to the model and from the model to the code, which provides line-level traceability for each block in your Simulink® model. When you click the hyperlink next to a line of code in the report, HDL Coder™ highlights the corresponding block in your Simulink model. When you select a block in your model, the report highlights all lines of code that correspond to that block.

Dependencies

To enable this parameter, select Generate HDL code.

Settings

off (Default) | on
on

Create the Traceability Report in the HTML code generation report. The code generation report contains information about the generated code.

This setting enables bidirectional traceability in the code generation report. The code generator links lines of the generated code to the corresponding blocks in the Simulink model when possible. To change the style of traceability from line-level to comment-based, set Traceability style to Comment Based.

To generate the report, on the HDL Code tab in the Simulink toolstrip, click the Generate HDL Code button.

off

Do not create the Traceability Report in the HTML code generation report. This setting disables bidirectional traceability between the generated code and the model.

Tips

To set this property, use the functions hdlset_param or makehdl. To view the property value, use the function hdlget_param.

For example, you can generate a traceability report when generating HDL code for the symmetric_fir subsystem inside the sfir_fixed model using either of these methods.

  • Pass in the Traceability parameter as an argument to makehdl.

    makehdl('sfir_fixed/symmetric_fir','Traceability','on')

  • Enable the Traceability parameter using hdlset_param and then use makehdl.

    hdlset_param('sfir_fixed','Traceability','on')
    makehdl('sfir_fixed/symmetric_fir')

You can use the RequirementComments parameter to generate hyperlinked requirements comments within the HTML code generation report. The requirements comments link to the corresponding requirements documents for your model.

Programmatic Use

Parameter: Traceability
Type: character vector
Value: 'on' | 'off'
Default: 'off'

Version History

Introduced in R2012a