Skip to Main Content Skip to Search
Product Documentation

How TLM Component Generation Works


The algorithm you use to generate the TLM component can be made of any combination of Simulink blocks that can generate C code. These blocks generally belong to a subsystem. Simulink Coder™ software generates ANSI C code from those blocks that HDL Verifier software then customizes with the settings specified using the TLM component generator to create the files that make up the virtual platform model. For an example of how this process works, see the following illustration.

After you obtain the TLM component files generated by HDL Verifier software, you can compile the TLM component and the optional test bench with OSCI SystemC 2.2. libraries and the OSCI TLM 2.0 libraries. To do so, use the makefile supplied by HDL Verifier to create your virtual platform executable (e.g., mysimulation.exe).

The following diagram illustrates the complete set of articles you can generate including the TLM component, the TLM component test bench, and the set of test vectors to be executed by the test bench. Simulink generates these vectors while performing model execution when you verify the TLM component from within Simulink (see Verify TLM Component).

The following general workflow describes the process for creating an OCSI-compatible TLM component representing the Simulink algorithm:

  1. Create Simulink model representing algorithm.

  2. Select required architectural model (i.e., virtual platform model) parameters via the Simulink Configuration Parameters dialog box. See Select Features for Generated TLM Component.

  3. (Optional) If you want, restore any desired configuration sets at this time. Because the topic of configuration sets is outside the scope of this documentation, refer to Managing Model Configurations in the Simulink User's Guide for more information.

  4. Initiate code generation.

  5. Save configuration options with model for future use.

HDL Verifier software generates the following files:

After code generation is complete, you can then use these generated files (outputs) to create the standalone TLM executable. See Export TLM Component to SystemC Environment.

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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