Main Content

Traceability style

Designation of line-level or comment-based traceability

Since R2020b

Model Configuration Pane: Report

Description

You can use Traceability style to specify whether you want to generate line-level or comment-based hyperlinks in the traceability report.

Dependencies

To specify this setting, select the Generate traceability report check box.

Settings

Line Level (Default) | Comment Based

The options are:

Line Level

By default, HDL Coder™ generates a line-level traceability report that contains hyperlinks from each line of HDL code to the corresponding block in your Simulink® model. The traceability report that is generated by using this style does not contain hyperlinked comments above the HDL code corresponding to a certain block. When you select a certain block and navigate to the HDL code, the code generator highlights all lines of code corresponding to that block.

Comment Based

If you specify generation of a comment-based traceability report, the report contains hyperlinked comments above a block of HDL code. The comments contain a traceability tag that contains a searchable pattern of the format <system>/blockname. <system> is the root model or a Subsystem inside the model, and blockname is the name of the block inside that model or Subsystem.

For example, if you have a model, foo, that has a Subsystem, outer, and a nested Subsystem, Inner, then the <System> tag is:

  • <Root>: foo

  • <S1>: foo/outer

  • <S2>: foo/outer/inner

Tips

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

For example, when you generate a traceability report for the symmetric_fir subsystem inside the sfir_fixed model, specify the TraceabilityStyle by using either of these methods:

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

    makehdl('sfir_fixed/symmetric_fir','Traceability','on',...
                        'TraceabilityStyle','Comment Based')

  • Enable the TraceabilityStyle parameter using hdlset_param, and then use makehdl.

    hdlset_param('sfir_fixed','Traceability','on')
    hdlset_param(gcs,'TraceabilityStyle','Comment Based')
    makehdl('sfir_fixed/symmetric_fir')

Recommended Settings

No recommendations.

Programmatic Use

Parameter: TraceabilityStyle
Type: Character vector
Value: 'Line Level' | 'Comment Based'
Default: 'Line Level'

Version History

Introduced in R2020b