User`s guide
3 Project Generator
Reviewing P rocessor-Specific Target Function Library
Changes in Generated Code
Use one of the following techniques or tools to see the target function library
elements where they appear in the generated code:
• Review the Code Manually.
• Use M odel-to -Code Tracing to navigate from blocks in your model to the
code generated from the block.
• Use a File Differencing Schem e to compare projects that y ou generate
before and after you select a processor-specific target function library.
Reviewing Code Manually
To see where the generated code uses target function library replacements,
review the file
modelname.c . Look for code similar to the following statement
codeopt_tfl_B.Sum6[j] = ldexp((real_T)Sum[j], -11) + ldexp((real_T)
c62x_mul_s32_s32_s32_sr_sat(codeopt_tfl_P.Gain5_Gain, UnitDelay[j], 6),
The function c62x_mul_s32_s32_s32_sr_sat is the m ultiply implementation
function registered in the TI C62x target function library. In this example, the
function performs an optimized multiplication operation. Similar functions
appear for
add,andsub. For more information about the arguments in the
function, refer to “Introduction to Target Function Libraries” in the online
Help system.
Using Model-to-Code Tracing
You can use the model-to-code report o ptions in the configuration parameters
to trace the code generated from any block with target function library. After
you create y our model and select a target function library, follow these steps
to use the report options to trace the generated code:
1 Open the model configuration parameters.
2 Select Report from the Select tree.
3 In the Report pane, select Create code generation report and
Model-to-code, and then save your changes.
3-74