Target Language Compiler    

Getting Started

  1. If you haven't done so already, first copy the folder tlctutorial/tlcdebug/ to your working directory and cd to it.
  2. Open the model simple_log.mdl in Simulink. The diagram looks like this.

  1. Open the Simulation parameters dialog box and click the Workspace I/O tab. Select the Time and Output boxes under Save to workspace if they are not already selected. This causes model variables to be logged to your MATLAB workspace.
  2. Run the model by selecting Start from the Simulation menu. Variables tout and yout appear in your MATLAB workspace.)
  3. Double-click yout in the Workspace pane of the MATLAB command window. The Array Editor displays the 6x11 array output from simple_log. You will see the following display.

  1. Column 1 contains discrete pulse output for six time steps (1s and 0s), collected at port out1. Columns 2-11 contain the constant values 1:10, collected at port out2.

Next, we'll generate a stand-alone version of simple_log.mdl. We'll execute it and compare its results to the output from Simulink displayed above.


  Debugging Your TLC Code Generate and Run Code from the Model