Skip to Main Content Skip to Search
Product Documentation

Format of Traceability Tags

A traceability tag appears in a comment above the corresponding line of generated code. The format of the tags is <system>/block_name, where

The Simulink Coder code generator documents all the tags for a model in the comments section of the generated header file model.h. For example, the following comment appears in the header file for model, foo, that has a subsystem Outer and a nested subsystem Inner:

/* Here is the system hierarchy for this model.
 *
 * <Root> : foo
 * <S1>   : foo/Outer
 * <S2>   : foo/Outer/Inner
 */

Examples of Tagged Code

The following code shows a tag comment adjacent to a line of code. This code is generated from a Gain block at the root level of a source model:

/* Gain: '<Root>/UnDeadGain1' */
rtb_UnDeadGain1_h = dead_gain_U.In1 *
  dead_gain_P.UnDeadGain1_Gain;

The following code shows a tag comment adjacent to a line of code. This code is generated from a Gain block within a subsystem one level below the root level of the source model:

/* Gain: '<S1>/Gain' */
dead_gain_B.temp0 *= (dead_gain_P.s1_Gain_Gain);
  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS