5.2. Building a SystemC component from System Canvas

The following steps describe how to build a SystemC component from a System Canvas system:

  1. If you are not using the SystemC and TLM libraries supplied with the Fast Models package, change the environment variables to point to your copy of these libraries.

    Note

    System Canvas automatically uses the following include path:

    • $(SYSTEMC_HOME)/include

    • $(TLM_HOME)/include/tlm

    The SYSTEMC_HOME and TLM_HOME environment variables are set when the Fast Model package is installed. If you require a different copy of SystemC or TLM, modify the variables before starting System Canvas.

  2. In System Canvas, enable the target option SystemC component under the menu entry Project → Project Settings → Targets.

  3. Add the ports you require on the generated SystemC component as normal Fast Models ports. See Using the generated ports for more information on using ports.

  4. Add the headers and library files specified for your operating system. See Adding header files and libraries for Linux export or Adding header files and libraries for Windows export.

    See one of the makefiles provided with the SystemC Export examples for additional details on how to generate the SystemC component.

  5. Build the SystemC component. The output is:

    • static library sc_sg_wrapper.a in the Linux directory AConfig.

      For Windows, the library is MySystem-sc_sg_wrapper-AConfig.lib.

    • header file sc_sg_wrapper_MySystem.h in the Linux directory AConfig/gen_sc_sg_wrapper_AConfig_Linux.

      For Windows, the header file is located in the directory AConfig/gen_sc_sg_wrapper_AConfig_WIN32.

Copyright © 2007-2009 ARM Limited. All rights reserved.ARM DUI 0370H
Non-Confidential