You can use Traceability style to specify whether you want to generate line-level or comment-based hyperlinks in the traceability report.
Default:
Line Level
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
To specify this setting, select the Generate traceability report check box.
Property:
TraceabilityStyle |
Type: character vector |
Value:
'LineLevel' | 'CommentBased' |
Default:
'LineLevel' |
To set this property, use hdlset_param
or makehdl
. To view the property value, use 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
property as an
argument to
makehdl
.
makehdl('sfir_fixed/symmetric_fir','Traceability','on',... 'TraceabilityStyle','CommentBased')
Enable the TraceabilityStyle
property using
hdlset_param
, and then use
makehdl
.
hdlset_param('sfir_fixed','Traceability','on') hdlset_param(gcs,'TraceabilityStyle','CommentBased') makehdl('sfir_fixed/symmetric_fir')