Target Language Compiler    

Building a Model Using the TLC Debugger

Objective: Introduce the TLC debugger. You will learn how to set breakpoints and familiarize yourself with the various commands supported by the TLC debugger.

Preparing the Example

You invoke the TLC debugger while building the model. Use the same model, sfun_x2.mdl, for this example:

The MATLAB command window shows the building process information and stops at the grt.tlc file and displays the following tag in the command window.

Type help to see the list of TLC debugger commands.

Performing the Tasks

  1. Set a breakpoint on line 19 of timestwo.tlc. Type help break to list the various syntaxes for the break command. Use the first form of the break command to set a breakpoint on line 19. Type

    Type continue to instruct the TLC debugger to continue to the next breakpoint. The debugger should advance to line 19 in timestwo.tlc and display the following status information in the MATLAB command window.

  1. Assign a constant value, e.g., 5.0, to the input signal %<u>.
  2. View various entities in the TLC scope. For example,
  3. After familiarizing yourself with the viewing capabilities of TLC, type continue to commence completing code generation.

    Code generation should begin and complete.

  1. Compare the result with the previous one.

For more information about the TLC debugger, see Chapter 6, Debugging TLC.


 Introduction to TLC Token Expansion Explore Variable Names and Loop Rolling